Hey Panda3D forums,
After realising that I have absolutely no idea about how a framework for a game should be constructed (thanks to everyone who listened and replied to my questions on IRC, much appreciated), I’d like to ask this forum for their suggestions on how a 2.5D sidescroller engine (2D sprites, 3D backgrounds - a little like Valkyrie Profile, but not with parallax backgrounds (of course parallax backgrounds can be easily achieved by superimposing textured cards over other textured cards, so I’m not particularly picky about that)) should be written for Panda3D (a mentor would be nice, but that might be too much to ask for ) in a Panda3D-specific way.
I’d like to see examples of anyone implementing such a behemoth, or just suggestions about this from anyone. I’d just like to point out that know my way around Python relatively well, but this is probably my first time delving into 3D graphics (I originally used absolute positioning for event triggers, soon realising that there was such a thing as a Z-axis! This has, consequently, made me rethink my entire approach on this).
I’m just completely lost on making a framework that’s easily maintainable (mine is currently spaghetti junction) and extensible.
Elaboration on Valkyrie Profile: 3D overworld, platformer-style gameplay with mobs visible on the platform – upon encountering a mob, the gameplay shifts to more of a turn-based style battle system (such as most Final Fantasy games).
I think key point here is how your map is structured. Is it tile based or free form polygon mesh? That has big impact on how the rest of your game logic will flow.
When getting stuck like this i suggest unit tests. They help you write your code in a neat manner. Also separate the logic from game logic. Then it becomes a two way process instead of all at once, write game logic, write code to display it.
Responding to your questions:
The map is freeform mesh due to variable terrain heights, and as for the separation of game logic with core logic, I have done so but it’s turned into a bit of a mess, as I’m not sure of the best way to represent locations on the map, i.e. for an event trigger or for a NPC spawn point; or the best way to handle collisions; level design – more or less, I’ve hit a brick wall on how to most effectively create a structured and easily maintainable engine architecture.
I recently made a snippet to show how to play with 2.5D,
you may download it here - you find your code of interest in the step2.py and map in windmill.blend - hope it helps
That’s a nice demo with a lot of useful comments.
I especially like how you made the level in blender and included the blend file.
In particular I like step2.py game. The camera is not in orthographic mode I see. Do you just use the default viewing angle?
Also - where do you actually move the camera to follow the avatar?
Thanks - do you have any more demos/lessons that you made?
well that’s not an option I’m afraid, that’s actually the more productive way to make levels in panda, at least until the guys working on the WIP panda editor finish their job.
just look into the helper file named snipstuff.py
right now just regarding panda3D collisions - maybe in the future I will do, regarding other subjects - actually I’m planning to make a new one regarding ODE physics but that’s depend mainly on my spare time.
Um?? I said that I LIKE how you did that! Because all the examples in panda samples only have the .egg files - which I can’t open!
ah ok - well that’s not entirely true cos you can import the eggs with console programs like egg2flt included the panda3d bundle - as an example I managed to reverse the ball-in-maze tutorial but you’re right: I hadn’t spent that time if there already was a .blend ready to go.