Menu

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.

Show posts Menu

Topics - Dark Schneider

#1
The new iPhone 5 has a resolution of 640x1136  :blink:

We know that each new SDK ALWAYS shows the screen at its native resolution (no auto-zoom), so what is going to happen? How can Retina graphics be used for that reslution? We know if we don't use integer zooms (x2, x3) we have bad stretching  :blink:

It seems Apple likes to tease developers  :rant:
#2
If you use the latest Xcode and want that your app works on 3.x devices, you should read http://stackoverflow.com/questions/4198676/warning-iphone-apps-should-include-an-armv6-architecture-even-with-build-config and http://theunemployedprogrammer.blogspot.com.es/2011/11/dyld-symbol-not-found.html (ignore de comment).

So you have to set manually the armv6 in architectures (project settings) and add '-weak_library /usr/lib/libSystem.B.dylib' to Build Settings->Linking->Other Link Flags.

The problem is that it doesn't warn you at compile time, it compiles fine (so happily), but is in runtime when it crashes. So be careful.
#3
I always have an error result 'EXC_BAD_ACCESS' and it doesn't launch, I thought it could be because the complexity of the project I was compiling, but I tested using a basic test project (attached) and the same result. Using the same project compiled with an older GLBasic version and runs fine.

here is the console output:
Code (glbasic) Select

[Session started at 2011-10-19 17:59:34 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1516) (Fri Feb 11 06:19:43 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
Loading program into debuggerÉ
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-2629-32
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running:
[Switching to thread 11779]
[Switching to thread 11779]
sharedlibrary apply-load-rules all
continue
Program received signal:  'EXC_BAD_ACCESS'.
(gdb)


[attachment deleted by admin]
#4
I hace received this report from iTunes Connect:
QuoteWe found that your app crashed on iPad 2 and iPhone 4 running iOS 4.3.5, which is not in compliance with the App Store Review Guidelines.

Your app crashed when we:

1. Launch the app
2. The app crashes

I have 3 crash reports, all 3 with this part in common:

iPhone 4:
Quote
Thread 4 Crashed:
0   libsystem_kernel.dylib           0x31d1ea1c __pthread_kill + 8
1   libsystem_c.dylib                0x32ae53b4 pthread_kill + 52
2   libsystem_c.dylib                0x32addbf8 abort + 72
3   Rapids Rider                     0x0004aafc 0x1000 + 301820

Thread 4 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
    r4: 0x007e7000    r5: 0x00000006      r6: 0x008f6a00      r7: 0x007e5644
    r8: 0x0000b290    r9: 0x00000000     r10: 0x00289c34     r11: 0x007e5738
    ip: 0x00000148    sp: 0x007e5638      lr: 0x341a03bb      pc: 0x34166a1c
  cpsr: 0x00000010

iPad 2:
report 1:
Quote
Thread 5 Crashed:
0   libsystem_kernel.dylib           0x31d1ea1c __pthread_kill + 8
1   libsystem_c.dylib                0x32ae53b4 pthread_kill + 52
2   libsystem_c.dylib                0x32addbf8 abort + 72
3   Rapids Rider                     0x0004aafc 0x1000 + 301820

Thread 5 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
    r4: 0x007e4000    r5: 0x00000006      r6: 0x01178000      r7: 0x007e2644
    r8: 0x0000b290    r9: 0x00000000     r10: 0x004503f4     r11: 0x007e2738
    ip: 0x00000148    sp: 0x007e2638      lr: 0x31cb43bb      pc: 0x35bc2a1c
  cpsr: 0x00000010

report 2:
Quote
Thread 5 Crashed:
0   libsystem_kernel.dylib           0x31d1ea1c __pthread_kill + 8
1   libsystem_c.dylib                0x32ae53b4 pthread_kill + 52
2   libsystem_c.dylib                0x32addbf8 abort + 72
3   Rapids Rider                     0x0004aafc 0x1000 + 301820

Thread 5 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
    r4: 0x007e4000    r5: 0x00000006      r6: 0x02375200      r7: 0x007e2644
    r8: 0x0000b290    r9: 0x00000000     r10: 0x0040fa14     r11: 0x007e2738
    ip: 0x00000148    sp: 0x007e2638      lr: 0x31cb43bb      pc: 0x35bc2a1c
  cpsr: 0x00000010

How it can be only on these devices?

I am going to look at the .dSYM file but I have not much idea about this.

Update: attached the crash files with symbolication.

[attachment deleted by admin]
#5
I am using the lastest GLB and there is no PAUSEMUSIC command, it is in help but not in the editor.
#6
I had this problem too, a code that works fine in Windows on iOS crash with the output in console:
Code (glbasic) Select
wrt-request: fopen("", "wb") failed
I follow the code and saw that while loading binary data from a file, I called a function that open another file, and then it crashes on iOS.
The code is something like:

Code (glbasic) Select

LOCAL l_file%=GENFILE()
IF OPENFILE(l_file, g_SaveDir$+"stages.sav",1)
//version
LOCAL l_version%, l_count%
READULONG l_file, l_version
//stages info
LOCAL l_stage_info AS TStageInfo
READLONG l_file, l_count
FOR i%=0 TO l_count-1
l_stage_info.LoadFromFile(l_file)
StagesInfoSetData(stages_info[], l_stage_info, FALSE, FALSE, FALSE, FALSE)
NEXT
CLOSEFILE l_file
ENDIF


And the function StagesInfoSetData(stages_info[], l_stage_info, FALSE, FALSE, FALSE, FALSE) opens a file because when I set data for stages it saves another file for sending data. Now I added the last boolean that if you se it is set as FALSE, if FALSE then it doesn't save this file, because in the inital load it should not be created.

Then, I think on iOS only 1 file can be open at the same time.
#7
SOUNDPLAYING() always return 0 on iPhone, on PC and with GLBasic v8 this work well. I noticed because when updated to GLBasic 9, I used SOUNDPLAYING() for sound cycling, and that sound now is a continous re-loop each frame, and is annoying (or crazy).
#8
Hi, I have installed XCode 4, then I am confused with one setting. When we choose the target iPhone, in the Summary screen we see a Supported Device Orientations setting, should we set any of them? They are all unchecked by default with the project generated by GLBasic, so I don't know if I should mark any of them.

In the other hand, there is another confusing thing, the degub/release build and where are stored the build files (preferences -> Locations), in summary, "what must I do to submit the App to the App Store?", if you have this question, I have seen for that, take a look at this http://www.weston-fl.com/blog/?p=2442
The new way, if works  :whistle:, is much more easy IMO than the old one, as is only 3 steps: Archive -> Validate -> Submit.
IMPORTANT: remember to set the release setting in the Archive option for the scheme, and set the Archive Name, that is different than Product Name, the name shown in App Store is the last one (Product Name), but IMO is not much elegant to send files to Apple with the name iPhone.app  ;/
#9
If use POLYVECTOR with any color, it runs very slow on the iPad, it is curious because on an iPod 1G it runs fine. But they have different GPUs.

I say this because if you are planning to use POLYVECTORS to change colors of sprites and others (like fonts) take in mind this if you want to release it on iPad.
:giveup:
#10
Before upgrading to GLBasic v10 I'd like to know if it has support for JPG.

Maybe many think that is not important for games, but it is, because is used for "screens" (like the menus ones) and for backgrounds (that scrolling cyclic sky with mountains). So JPG helps to reduce the application size, particularly for hi-res devices, and image in 2048x1024 (cyclic background in hi-res) uses so much disk space in PNG format, and in JPG can be reduced up to 1/4 of the PNG file size.

Multiply that size by the number of screens and backgrounds...¡are many megabytes!  :noggin:
#11
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.
#12
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
#13
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.
#14
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.

[attachment deleted by admin]
#15
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:
#16
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.
#17
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
#18
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.
#19
This is not really a bug, when compiling for iOS, the new iOS SDK gives many (hundreds in a complex project) warnings of type CPU_SUBTYPE_ARM_ALL deprecated. It woud be great if GLBasic was updated to use the new definition, becasue so many warnings difficults to find real warnings.
The other reason is because usually the state after deprecated is obsolete (maybe in iOS 5 SDK?), and then this will be errors not warnings.
#20
Adjusting all the graphics only by a few pixels...is possible to set the project resolution to Retina for using on iPad?, how is it drawn? (margins, stretch?).