Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dark Schneider

Pages: 1 2 3 [4] 5 6 ... 9
46
IDE/Syntax / GETSCREENSIZE change
« on: 2011-Aug-05 »
IMO it could be a good idea that GETSCREENSIZE returns the size of the current screen, not only the backbuffer.
So if we do an USESCREEN other than -1, then GETSCREENSIZE give us the size of that screen (render target).

This could be a good solution to use render targets more efficiently.

47
New version, now the leaderboards shows correctly, when showing achievements it can crash, but I think is because if we show achievements for a "not supported" game (then there are no achievs) the object "*achievements" using the Apple Game Center function can be the problem, and should be tested with a real supported game with real achievements created on iTunesConnect. If the game has no achievements, there is no sense in showing them.
I say this because in the simulator it works fine always.

Now the GCgetLastErrorDomain() is in the form:
Code: GLBasic [Select]
void GCgetLastErrorDomain(char *errorDomain)
the problem is that if we want to return a char*
Code: GLBasic [Select]
char *GCgetLastErrorDomain()
in GLB we must define the function like GCgetLastErrorDomain$() and then we have errors or must use a conditional compilation ?IFDEF for any use, so filling a buffer is better solution IMO.
But I think is not working yet.

48
I think I have solved it, the only thing is that it not hides with animation, it dissaperas instantly, by I think is not much important (player gets the control sooner :D ).

I'll put an updated version soon.

49
I think GCgetLastErrorDomain() is not working, maybe someone could fix it.

At this moment the more important thing is to test if the "report" functions work properly, as the "show" can be made using the Game Center app because if it is recommended to show them in your app, is not required, and more having a multi-task iOS. It could be added in the future.

50
check UIWindow *mow = [[UIApplication sharedApplication]keyWindow]; and from that window on the root view.

Well that worked for an App, but when using from GLB it doesn't work.

Look for updated files in the development post http://www.glbasic.com/forum/index.php?topic=6680.msg53974#msg53974

51
I write here because I think it has more reads, because time is important, here are:

- For development: http://www.glbasic.com/forum/index.php?topic=6680.0
- GLBasic feature request: http://www.glbasic.com/forum/index.php?topic=6681.0

52
I am working on Game Center for GLBasic http://www.glbasic.com/forum/index.php?topic=6680.0, but I can't do the "showLeaderboard" or "showAchievements" functions at this momment because for that we need the current (or root) screen view, we can see it here http://ganbarugames.com/2011/07/cocos2d-game-center/ in the showLeaderboardForCategory function, as we can see in
Quote
// Create an additional UIViewController to attach the GKLeaderboardViewController to
myViewController = [[UIViewController alloc] init];

// Add the temporary UIViewController to the main OpenGL view
[[[CCDirector sharedDirector] openGLView] addSubview:myViewController.view];

 
// Tell UIViewController to present the leaderboard
[myViewController presentModalViewController:leaderboardController animated:YES];

Could you add a function for XCode project for this?, or a global variable? I don't matter the way we only need it for that.

53
Hi, I am currently working on Game Center integration in GLBasic, and some help would be fine.

Inside the ZIP, there are 2 folders:

- GameCenterWrapper: here is the source code for XCode, it is yet incomplete because I want to test before.

- GCTest: a simple GLBaisc project to test it.

I thnk each function is self-descriptive, with a notation about "lastErrorCode", as access to GC is asynchronous, we need a way to know when has been completed in GLB, then I use the lastErrorCode for that, I set it to -1 while working, and when is <>-1 we can see the result (see source code of GCTest). For NO ERROR, lastErrorCode passes from -1 to 0 (0 is NO ERROR). I think there is no error =-1 in Apple documentation, for that I use it, if there is any, simply change it.

With GCisSupported + GCisAuthenticated + GCgetLastErrorDomain + GCgetLastErrorCode IMO there is full to know about if there is success or any error, only looking at Apple documentation. In example, if  GCgetLastErrorDomain="NSURLErrorDomain" this is internet connection problem, look at Apple docs for more info.


Well, after this, what I need are testers, Game Center doesn't works on jailbroken devices for development purposes, so you need an original iOS device with Game Center support.


In the simulator it works perfectly, I have tested on a jailbroken device (it is not mine) and it says "This game is not recognized by Game Center", this is GOOD because it seems that it tries to authenticate, and this is exactly what should be seen on jailbroken devices for developer compilations (including AdHoc ones), but for better results, it would be good that someone with an original device test it.

To use:

- Create a project with Game Center in your iTunesConnect, you can use any name, as they are going to expire, I recommend something like MyDomainGameCenterTest01, so when expires you can use MyDomainGameCenterTest02, etc, etc. Get all needed certificates and blahblah (see at Apple documentation).

- In XCode: once we have our XCode project from GLBasic, simply follow these steps:
1) Add GameKit framework to frameworks. Before this you need to select the "Release" configuration.
2) Add the folder "GameCenterWrapper" to the project, i.e. in "Other Sources" section.
3) Configure you target settings, in "Properties" set the "Identifier" to your APP ID, remember that wildcards doesn't work for Game Center.
4) Build and Run  ;)

IMPORTANT: remember to create a Sanboxed Game Center profile for testing purposes. this can be done by logout with the current profile and then starting the Game Center development app, and click on Create New, use a new e-mail that will be attached to an Apple ID by its own with a verification mail, so there is no need to create an Apple ID for this before, simply a non-used email by other Apple ID.


Comment here if it works (you see the Game Center authentication notification). Modify the GCTest or create your own for deeper tests.

Note: the files to modify are the GameCenterWrapper.h and .m, and maybe the GameCenterWrapperFunctions.m

Update: lastest code in the attached file, including an example project.

54
Looking that it is a device behavior and seems that GLB can do nothing to prevent it, yes, an update in the help file  ;)

Because with the current help it seems that if you specify 640x960 it will run on that resolution on iPad, so an update about this would be good.

55
No, for only support 480x320 simply set in the XCode settings the family device to iPhone ionly.

What I say if that, if you set the family device to Universal, then the iPad always sets to 1024x768, no matter what you set on project settings. Surely the iPad runs it by its own, so you can't set a project on 960x640 and expect the iPad shows it centered.

So when compiling for iPad, it fully depends on you config on XCode family device settings, with only 2 possible results:

- Set to iPhone only: it always uses the small size, 480x320, even if we set the project at 960x640.
- iPad or Universal: it always uses the full screen size, 1024x768.

As I said I suspect that is an iPad behavior by its own, so take in mind this in your developments.

I am surprised Apple doesn't allow to use a Retina graphics setting to have a centered HD 960x640 screen display, because if you compile for iPhone it will always use the small size  :blink:
Another reason to mark iPad (Universal) is that if not your app will not show iPad compatibility on the App Store.
And, if you set Universal it will always use the full 1024x768 screen.
It seems Apple enjoys annoy to developers  :whip:

So take care.

Note:
Yes I have read the help file, I write this precisely for that reason, we read
Quote
You set the project options to the maximum desired size you want to support. The program will run on the device and yield the real resolution with GETSCREENSIZE to the program.

But on iPad this is not in this way.

56
When we set the family devices to iPhone/iPad (Universal), the App always shows the iPad full screen resolution, and completely ignores the project setting but the orientation (that works).

I don't know if it is an iPad limitation or what, but it shows and uses the whole screen for drawing and input always.

It would be good to test the iPhone 4 Retina too with project settings for 480x320 and 960x640, it would not be good if the iPhone 4 shows the low-res projects only in a quarter of the screen  :blink:
I have no iPhone 4 so if someone can check the iPhone retina  :good:

57
It could be like:
found% = FIND$(where$, find$, positions%[])
then use found% if you only are interested about if is contained, and positions%[] are the indexes (first char position in where$ of any appearance of find$) in the string if you need them.

Currently we only have INSTR() that only searches for the 1st one.

58
With OS X Lion on the market, we see that Lion is only compatible with XCode 4, then I'd like to know if the project generated by GLBasic is compatible with XCode 4 and there is no problem at all using it.

Thinking about upgrading the Mac  =D

59
Good, less work to do  :good:

60
The idea is to identify old versions of iPhone/iTouch to set the LIMITFPS 30 on them and 60 on newer ones. Old iDevices have really no speed at all and they are not able to run almost any game at 60 FPS.

Have someone tested if this works?
http://stackoverflow.com/questions/448162/determine-device-iphone-ipod-touch-with-iphone-sdk

So for iPhone1,1 and iPod1,1 we'd use 30 FPS and 60 FPS otherwise.

Pages: 1 2 3 [4] 5 6 ... 9