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

Messages - Qube

#121
Has anyone tried the above example yet and confirmed 3D slowness on iPad :whistle: - Or you can even stick a few spinning boxes on the iPad and frame rate drops :rant:

p.s. Happy New Year  :booze:
#122
I'll not be using shaders, no, but the example was the easiest one to come up with from the GLB examples folder and shows that compiling for iPad runs slow but compiling for iPhone and running on iPad (or iPhone) runs full speed.

#123
As stated in my first post  :P I am running the latest version of GLB & Xcode & iOS :)

Yes, 2D runs fine and I have no problems with speed. It's just the 3D side that is slow and there seems to be something wrong especially as I can compile for iPhone and run it on the iPad at full speed (even x2 mode).
#124
Well, even the cellshadding 3d example (modified code below) runs slow in the iPad yet when compiled for iPhone and ran on the iPad it runs full frame rate.

Now you can't seriously say that the ipad can't handle a simple thing like this?  :S

Code (glbasic) Select


SETSCREEN 1024, 768, 1
CreateTorus(1, 5, 10, 22, 22, 2, 2)
LOADSPRITE      "image.bmp", 0

DIMDATA cheap[], .5, 1
DIMDATA nice[], .3, .6, .6, .6, .6, .6, .6, .7, 1, 1, 1, 1, 1, 1, 1, 1

WHILE TRUE
phi=phi+GETTIMER()/30
X_SETCELSHADES cheap[]
Render(phi)


dtime = GETTIMER()
fps = ((1000.0/dtime)+fps)/2
delay=delay+dtime
IF delay>1000 // 1/2 sec
delay=0
ShowFPS=fps
ENDIF
X_MAKE2D
PRINT "FPS: "+FORMAT$(0,1,ShowFPS), 100, 0 // + dtime, 0,0

SHOWSCREEN
WEND


// ------------------------------------------------------------- //
// Zeichnet einen Donut
// Renders a Donut
// ------------------------------------------------------------- //
FUNCTION Render: phi
X_MAKE3D 1, 250, 45
X_CAMERA 0, 10, 50, 0,0,0
// Licht Nr. -2 is Cel-Shading Postition / Light no -1 is cel shading position
X_SPOT_LT -2, 0, 0,0,100, 0,0,0,90
X_CULLMODE 1 // niemals 0 verwenden bei toons / Never use 0 with toon shading
X_SETTEXTURE 0, -1 // 0=Tex
X_ROTATION 80, 1,0,0
X_ROTATION phi, 0, 1, 0.1
X_DRAWOBJ 1, 0
ENDFUNCTION


// ------------------------------------------------------------- //
// -=#  CREATETORUS  #=-
// Donut Objekt machen / Make a donut object
//
// By Samuel R. Buss
// http://math.ucsd.edu/~sbuss/MathCG
// ------------------------------------------------------------- //
FUNCTION CreateTorus: num, MinorRadius, MajorRadius, NumWraps, NumPerWrap, TextureWrapVert, TextureWrapHoriz
LOCAL i, di, j, wrapFrac, wrapFracTex, phi, thetaFrac, thetaFracTex, theta
LOCAL x, y, z, r

X_AUTONORMALS 2 // smooth
X_OBJSTART num
FOR di=0 TO NumWraps-1
FOR j=0 TO NumPerWrap
FOR i=di+1 TO di STEP -1
wrapFrac = MOD(j, NumPerWrap)/NumPerWrap
wrapFracTex = j/NumPerWrap
phi = 360*wrapFrac
thetaFrac = (MOD(i, NumWraps)+wrapFracTex)/NumWraps
thetaFracTex = (i+wrapFracTex)/NumWraps
theta = 360*thetaFrac
r = MajorRadius + MinorRadius*COS(phi)
x = SIN(theta)*r
z = COS(theta)*r
y = MinorRadius*SIN(phi)
X_OBJADDVERTEX x,y,z,  thetaFracTex*TextureWrapVert, 1-wrapFracTex*TextureWrapHoriz, _
RGB(0xff,0xff,0xff)
NEXT
NEXT
X_OBJNEWGROUP
NEXT
X_OBJEND
ENDFUNCTION // y
#125
I cant even get 3 cubes to spin at anything above 37fps on the iPad which is just silly :/ - Something must be wrong :'(
#126
GLBasic - en / iPad 3D Speed
2010-Dec-29
Is there anything that can be done to speed up the 3D speed on the iPad? - Even using a simple 1500 polygon model and no background the frame rate is a mere 37fps - However if I compile for iPhone only then the same app runs at 60fps on the iPad.

There are a lot of 3D apps on the AppStore which run at higher frame rates with much more complicated scenes, like Galaxy of Fire II for example.

Is anyone else experiencing slow frame rates with 3D on the iPad (even with simple objects)? - If not then perhaps you could provide an example to compare?

*note* I have the latest GLB + iOS 4.2 + latest XCode
#127
Can confirm that libpng-gf.a is only 8 bytes in size. I guess this must be the problem when compiling for ipad?
#128
Quote from: KidNovak on 2010-Oct-22
I had all of the background "DRAWSPRITE's" in the main loop.  :S
So, I removed the "DRAWSPRITE's" from the loop and now, back to 60FPS.

If your background is going to be static then drawsprite / polyvector is overkill and will suck down your FPS.

Instead use the LOADBMP command for static backgrounds (each showscreen keeps the image loaded) and you'll find your FPS will be back up to 60fps  :good: - For example

Code (glbasic) Select

LOADBMP "background.png"

WHILE True
   // Draw my wonderful graphics - No need to worry about the background
   
  SHOWSCREEN
WEND


Simples  =D
#129
I've been using parallels with GLB since coming across GLB and love it (both parallels and GLB).

I don't use coherence mode though as I find full screen mode switching doesn't play too well in that mode, I prefer to toggle between two virtual desktops with CMD+1 & 2. It's pretty good flicking between XP and OSX with a couple of key presses  :)

#130
Quote
Don't know if it'll be helpfull but somebody might give it a try to let us all know?

Already tried that (see my 1st post) and found that (via polyvector) splitting it into 256x256 chunks worked quicker than 4 512x384 chunks which worked the best for those using cocos2d iPhone.

I hope there's some tweaking Kitty can come up with to aid in both 2D and 3D side of GLB  :good:
#131
That'll be great, Kitty, any speed boosting tips & code most appreciated  =D

I also found out tonight that the ipads GPU is the same as the iPhone 3GS which helps to explain a lot of speed issues considering the iPad has to fill 5x the amount of pixels for full screen.

With that I revisited my 3d code, set it for 30 fps and added some nice little time stepping code  :good: so now it runs very well at 30 fps and in busy busy scenes adjusts accordingly to keep things flowing well. I should of done this from the beginning but I expected the iPad to out perform the iPhone 3GS, which it does but I miss calculated the huge difference in pixel real-estate the iPad has to do. 
#132
Been having some fun with the new v8 beta while developing my latest game for the iPad. Howver, I've come across some serious speed issues with the iPad side of things :(

3D slowness

A simple 1500 poly object rotating around all 3 axis, one ambient light, one camera, basically the bear essentials. On the iPhone this runs at 60 fps solid, but change resolution to 1024x768 and install for iPad the framerate drops to 37.

2D slowness

I wouldn't say the 2D side is slow on the iPad but there is an issue when it comes to fullscreen goodness. Using polyvector only there appears to be no way to do 60 fps with a full resolution background and 20+ small sprites.

Using the same methods on the iPhone you are able to shunt around dozens and dozens of sprites (with polyvector) with a fullscreen image no problems.

I've tried splitting the background draw into 2, 4, 8, 16 quads but no drastic increase in speed. I have managed to get full screen with 10 sprites at 60 fps but that's the max limit before the fps drops.

My thoughts are the iPad has to draw a hell of a lot of data compared to the iPhone so for 2D is there anything that can be done to speed up fullscreen background drawing?

My main concern is the 3D side of things though. Has anyone else used the latest v8 beta with the iPad and found speed issues?
#133
I updated my 3GS today with iOS 4.0, downloaded 2.3gb work of Apple iOS SDK, compiled a few older projects and all worked as expected, yipee :D

However.... With the event of iOS 4 we now have the joyous benefit of running more than one app at once and pressing the home button now pauses an iOS 4 app rather than quits it. I'm guessing GLB 7.x doesn't fully support this method yet? - I added the command AUTOPAUSE TRUE (I think that was it) but pressing the home button, then double tapping the home button, selecting the GLB app and it re-starts from fresh.

Will GLB 7.x be updated to support the pause / resuming of iOS 4 or is that going to be a feature of GLB 8.x? - Unless of course I'm missing something obvious  O_O
#134
Hi, Shawnus,

Very strange problems. I'll happily look at what's causing your issue if you want to email over the project :) - email address is dave@puzzlebox-games.co.uk
#135
GLBasic - en / Re: Mac IDE
2010-May-07
I'd love to give it a test :) - macbook with snow leopard (10.6.3, 4gb etc, blah blah) with iPhone SDK.

My 3rd game will be finished this weekend and I'd happily put the finishing touches to it via the MAC IDE  =D