Scaling and Rotation on GP2X

Previous topic - Next topic

Billamu

Does the GP2X do ok when you do rotations and zooms on a sprite? I want to make a game that uses those commands. If it doesn't work then I'll use different sized and rotated sprites.
I'm an Aries. I have lots of Ram.

saboteur

Works OK for me.

The only problem i've had is using BIG images - must work out a way to use a tiled map :)

Billamu

Thanks for the response Saboteur.

Define "big". Are we talking larger than 320x240? And how many rotating sprites before the frame rate suffers?
I'm an Aries. I have lots of Ram.

Kitty Hello

It works. Even POLYVECTOR works now. However, rotations might be slow.
You can easily do 5 rotospritex with 32x32.
But a fullscreen alphamode stretchsprite + level drawing before (20x10 blocks) = 30 fps.

saboteur

Quote from: WillamuThanks for the response Saboteur.

Define "big". Are we talking larger than 320x240? And how many rotating sprites before the frame rate suffers?
Oh my image was nearly 2500*2000 ( it was a scan of an actual street map ) and whilst  on the pc it scrolled and rotated just fine - it was way to slow and jerky on the 2x.

Weirdly FENIX on the 2x was able to scroll and rotate the image just as fast as the  PC.

Ian Price

I'm surprised that a pc could scroll and rotate an image of that size (2500x2000) tbh - that's huge!
I came. I saw. I played.

Kitty Hello

2500x2500 won't even work on a PC, propably. That's a design flaw. Make your map from tiles.

saboteur

I don't really get how to tile an image that is so big.

I guess you would break it into tiles of say 320,240 ( for example ) but then would i dynamiclay load the next tile into memory dependant on the direction the screen is moving or do you load all the tiles in at once.

Ian Price

I'd suggest tiles of no bigger than 64x64 (ideally even smaller  16x16 or 32x32), then create a tile engine that allows you to only display a region that is the same size as (or one tile larger than) the screen - no point in taking up valuable CPU time drawing stuff that can;t be seen. Load all your tiles in in one go, rather than streaming - this prevents cache problems and sluggish scrolling.
I came. I saw. I played.

PeeJay

saboteur - why not have a look at my scrolling tilemap code posted here - http://www.glbasic.com/forum/viewtopic.php?id=1336 - and hopefully you'll get a better of idea to use tiles in games to free up resources.
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

saboteur

cheers peejay.

Before  i re-invent the wheel, anyone know an automated way if dividing an image into tiles ??

cheers

Ian Price

Yep - I use this neat little utility - http://www.iprice.remakes.org/stuff/maprecon.rar

It's programmed to be used with BlitzBasic, but you can alter the code easily to suit pretty much any language. It spits out tiles, example source code and the level data so that they can be used easily and quickly. And the utility itself is very, very fast.
I came. I saw. I played.