Making a new GP2X game


alxm

Still making GP2X and Pandora games, stay tuned!
Joined
Jul 11, 2013
Messages
193
Website
www.alxm.org
Hey there,

I thought I'd post this to keep myself motivated and see if there's still any interest in the old GameParks :) Some of you may have seen old (really old) screenshots of this, it has been a testbed for my game dev work for a long time now. I recently did some work to improve performance on low-end targets, so it runs better than I hoped even on this old hardware.

The GP2X release will be a mini version of the full game, which will come out for desktop Linux and Windows later on.

2019-preview-gp2x-wiz.jpg


:gp2x: :wiz: :caanoo: :p&|a: <3
 
sweet graphics. I like the fact you can rotate your view in a free angle.
How many layers? 4? (ground-grass-npc/player-roof/foliage)
 
sweet graphics. I like the fact you can rotate your view in a free angle.
How many layers? 4? (ground-grass-npc/player-roof/foliage)
Thanks!

Each terrain type has its own unique layer: water, sand, grass, rock, etc. Tiles are pre-rendered when the game loads, and terrain layers are used to draw tile borders in the correct order and in ways that make sense (a rock tile overflows on a neighboring grass tile, but not the other way around, etc.)

Real-time rendering layers are lightweight, so I use as many as I need:

Code:
typedef enum {
    U_LAYER_INVALID = -1,
    U_LAYER_MAP,
    U_LAYER_UNDERLIGHTS,
    U_LAYER_SHADOWS,
    U_LAYER_ITEMS,
    U_LAYER_ACTORS,
    U_LAYER_PLAYER,
    U_LAYER_PROJECTILES,
    U_LAYER_PARTICLES,
    U_LAYER_BUTTERFLIES,
    U_LAYER_HUD,
    U_LAYER_NUM
} UGraphicsLayer;
 
So many layers! In my time I had to lower the layers to get at least 15fps... (Pirotic Gigas Engine, now defunct)
Flattened layers, I see. Ah, so there are no tiles above the player? You can't walk under a tree?
Why particles under Butterflies? I could see a glow effect that should also affect the butterflies.
Sepate num and hud. I once used only one. Have the numbers printed over the template hud, then use that new image to be printed. This way, only when numbers change you need a new hud+num image, and save on rendering in all the other cycles. But I guess that takes more RAM, instead of printing separate each frame (200Mhz should be fast enough).

Have you added AI (pathfinding, predefined movements for NPC's?


My current RPG on-hold is in Sphere (or miniSphere). They use C bindings to Javascript to allow for all the intelligence, instead of doing all logic inside C. I loved https://duktape.org/ while used in minSphere.
I fell in the hole that made me polish the engine and never finish the game. Be careful with that one.
 
So many layers! In my time I had to lower the layers to get at least 15fps... (Pirotic Gigas Engine, now defunct)
Flattened layers, I see. Ah, so there are no tiles above the player? You can't walk under a tree?
There is only one tiles layer right now, but I might add another, or weather effects in the future. "Walking under a tree" is tricky to make look good because of the fully-top-down 2D view and camera that rotates with the player instead of being fixed. Vines that obscure the view might look good though, I just made a note of that in the project tracker. Anyway, the focus right now is to wrap up what I have into a release - lots of design lessons already learned :D

Why particles under Butterflies? I could see a glow effect that should also affect the butterflies.
Those are ground-level particles, like when you fire a weapon or shoot a rock. Effects aren't limited by layers, the layers are just what made sense to me and it's always easy and fast to add more. You can't shoot the butterflies, by the way :oops:

Sepate num and hud. I once used only one. Have the numbers printed over the template hud, then use that new image to be printed. This way, only when numbers change you need a new hud+num image, and save on rendering in all the other cycles. But I guess that takes more RAM, instead of printing separate each frame (200Mhz should be fast enough).
U_LAYER_NUM isn't a layer, it's the total number of layers declared in the enum. I use a similar technique for drawing the HUD, but I redraw all the data over the template every frame because it's not a bottleneck.

I agree about the pitfalls of focusing too much on the engine and tech instead of the actual game. It's never clear-cut though, and a lot of essential things genuinely take time and that's not always a bad thing. Back to work now :)
 
@alxm That's quite fast action paced. Looks very interesting. Good job on using the controls in that way (backing up while rotating and shooting)!
 
The library it uses it based on C, and is cross platform. I'm not sure how much code there is for this outside of that library; I suspect relatively little given they're both written by the same author, so offloading different functions to different CPUs might be quite hard to pull off.
 
Thanks everyone!

P.S: looking forward to playing it on the Pandora through GINGE and / or on the Pyra, since I gave both my GP2X F100 and F200 away years ago...
I'm building it for Pandora too! Mine has the purple screen of death though, so I only turn it on to test things occasionally. Thankfully I already coded all the Pandora-specific things I needed.

are you using the HW-accel SDL (squidge hack?).
another possibility is the second cpu, if you can offload anything.
I'm using the HW SDL from Open2x, but I don't think that makes a huge difference since I use my own software routines for scaled and rotated graphics. I forgot to drop mmuhack.o in there though, I bet I'll get some extra FPS from it, thanks :)
 
it should help by using the hw blitter, you have to use SDL_HWSURFACE and the surface had to optimized based on the screen format. Id have to go back and did around for some old code, but i can if you like to see it.
 
Hi all,

@alxm : if you're looking for some beta testers like in the good ol' gp32x.com days, you know where to find me ;)

Cheers, Magic Sam
 
Back
Top