Tilemap with polyvector strips

Previous topic - Next topic

Leginus

Thats good to know with the RND. thanks

Wampus

For my part I've just come to accept that anything 3GS upwards I can expect an average 60FPS unless I'm doing something very CPU intensive. For 3G and below its better, in my estimation, to cap the refresh at 30FPS because even the slowest iDevices I've tested on can manage that for the routines I've been using.

As I see it GLBasic isn't best suited to graphically fast & intense games on older iPhones/iPods. The biggest advantage of GLBasic is cross-compatibility and quick development time for whatever you create, which is very significant thing. If you want highly efficient code and fast rendering you'd do better going native but then you lose the flexibility and easiness of something like GLBasic.

Ian Price

QuoteFor my part I've just come to accept that anything 3GS upwards I can expect an average 60FPS unless I'm doing something very CPU intensive.
Never assume anything. I've seen my iPod struggling to do things that my supposedly less powerful GP2X can do with ease. It's about manipulating the code so that it fits the machine - there's usually ways to achieve the same results, but they often take longer to get to them. I've been constantly surprised about how poor the iPhone really is in terms of real raw power.
I came. I saw. I played.

Dark Schneider

Quote32px tiles = 150 tiles on screen :  58 fps
You should not use smaller ones, that is the size 32-bit consoles (Saturn, PSX) uses for 2D games.

QuoteSure, but when I'll add four or five animated sprites and the frame rate will go below 30 fps, it'll be the same problem.
I can assure you that below 30 fps never happens, I have drawn some tile layers with animated sprites, and NEVER goes below 30 fps. The 30 fps limit gives us fresh air, for that is much used in these small devices.

Let's do one benchmark, draw the layer twice, the same layer, I mean, when you draw with the 6 POLYVECTORs, do it inside a:
Code (glbasic) Select

for i%=0 to 1
   //6 POLYVECTORs calls
next


This doesn't consume CPU, because those vertices are in cache, and iPhone is able to handle more than those vertices by far, but this can help to detect if it is problem of GPU (pixel rate). If you get lower FPS, it can be because some reasons:

- GPU pixel rate: think that in those games made with the iPhone SDK, uses a front-to-back drawing way, for that I asked for it if was possible http://www.glbasic.com/forum/index.php?topic=4665.0, using z-buffer those games draws only 1 time the pixel of the screen.

- CPU: because GLBasic compiles in a generic way, using the GCC, and maybe for each POLYVECTORs group or inside the generating OpenGL VBO, many OpenGL commands are inserted, and you know, API calls are CPU expensive, but this is the price for using an upper programming layer, in the other hand, you have portable code (compiles for many platforms) and is much easier to use (faster game creation).

Besides, many of the more important games on iPhone (Angry Birds) runs at 30 FPS and people is not "angry" for that.

TomG

Quote from: Dark Schneider on 2011-Jan-16Besides, many of the more important games on iPhone (Angry Birds) runs at 30 FPS and people is not "angry" for that.
I lol'd =D

BTW, the very small tilesize was just for fun.

Well then, I think I get it. I guess this topic is solved, thanks for the answers !

Hatonastick

Quote from: Ian Price on 2011-Jan-16
I've been constantly surprised about how poor the iPhone really is in terms of real raw power.

Don't let Steve Jobs hear you say that, he may send his highly trained "iHit Squad 2.0" after you!
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Leginus


Ian Price

QuoteDon't let Steve Jobs hear you say that, he may send his highly trained "iHit Squad 2.0" after you!
Steve Jobs already knows how poor (power-wise) the iPhone is. And he's laughing all the way to the bank. Don;t get me wrong, it's a lovely machine with a nice OS, but it seriously lacks oomph. And by the sounds of things, so does the iPad. But I'm not a rich git and can't comment on that from personal experience! :P
I came. I saw. I played.

doimus

iPhone is certainly powerful enough. Much more powerful than other gaming handhelds anyway. Problem is, other handhelds (PSP, DS) have hardware accelerated 2D graphics, while iPhone does not.

But there has to be a workaround for this, as there are many tile-based games on iPhone.
One possible solution would be to design the map as one 3d object and use UV map for tile placement. That way, the entire map would be drawn in one draw-call, I guess.



Kitty Hello

Yes. many 2D engines use the 2D core to make stuff and then upload the final image as one texture and draw one quad.

Is it really that slow? I mean, with polyvector I've been able to draw quite some stuff. Especially on the newer devices.

Leginus

Not had any problems myself yet.  I suppose I have just jinxed myself  :x

Wampus

A while ago I wrote a little app to test how much my 3GS would cope with tiling sprites of different sizes from 160 x 160 to 20 x 20. You can change how many are shown on screen, their scaling, etc. If its any use to anyone, for instance TomG you might find it interesting how the different draw methods and alphamodes compare on a 2G phone, then I've attached it to this post.

If you use it then its a better measure of speed if you take out the slow background drawing from 109 to 111:-

ALPHAMODE 0

DRAWSPRITE 5, 0, 0

[attachment deleted by admin]