Platform Game Questions: Organization/Optimization
Before anyone says anything about me wanting somebody to code my game for me. That is not what I am looking for. I feel it's easier to talk things out with people when I am having troubles with something. I am really looking for different ways to think more than actual code. I am willing to do what it takes to make my platform engine as smooth and efficient as possible.
Okay so obviously I have like a million questions to ask. These are a little different. It more about organization with my code. So I am making a platform game. I liked the PMO because it was easy to understand, but I've realized to do what I want to do I going to have to make the movement totally custom. I want to make a more efficient engine that runs smoother than my current one. I am going to list the movements I want my player to have just to give you a better idea of what I am making.
Stand
Crouch
Run
Crawl
Sprint
Roll
Jump
Edge Grab
Wall Slide
Wall Jump
Push
Slide (Angles Larger than 45 Degrees)
(I've made all of these using the PMO except the slide but it seemed a little sloppy.)
1. Should I really scrap my PMO engine and go all custom?
2. Should I make each movement Independent from each other?
i.e.
Group - Run
>>If This group is Activated
-Players Animation is running
>>Player presses Left
-Move player left
>>Player presses Right
-Move player right
Group - Crawl
>>If This group is Activated
-Players Animation is crawling
>>Player presses Left
-Move player left
>>Player presses Right
-Move player right
Or should there be one All encompassing left and right movement with different events dictating whether or not the player is in a certain movement
i.e.
Group - Move
>>Player presses Left
-Move player left
>>Player presses Right
-Move player right
Group - Run
*CHANGE PROPERTIES OF PLAYERS MOVEMENT*
Group - Crawl
*CHANGE PROPERTIES OF PLAYERS MOVEMENT*
The first example I would say is easier to deal with but in the long run you will be creating more repeated events which could slow down the game.
3. Physics. I want to add simple physics to the game (I totally sound like a noob now.) But for the sake of organization should I code each individual object with physics or make one system that uses multiple objects? Right now I have "Muz's Guide to Making a Realistic Physics Engine" open. I was wondering if there another place I should be looking to deal with making the physics.
4. Fast loops. I am familiar with them, but I am not comfortable with them. Are they the "Ultimate Answer" to making a custom platform engine? I want my engine to run smooth as some of the examples I have seen. i.e. Orphanage/Noitu Love/Tormishire. (Before bashing me, remember that I am here more for direction)
5. What is the best why to contain variables? I have used Alterable Values mostly but I want to get familiar with arrays and Global Values. For a platform game with multiple frames per level, Global Values seem to be a no brainer, but how should I go about organizing things?
6. I recently downloaded and played "Kyntt Stories" It has a feature that is going to be in my game so I wanted to ask some questions about it. In KS is the game made up of one big frame with camera focus moving between each scene? Or is the game made up of multiple frames? If the latter is true, then how would I go about transitioning the players coordinates between the frames?
7. Scaling. I see that most Click games utilize smaller screens/resolutions. Why is that? I have not seen many games that use 640x480 or larger. I am going to upload a copy of my current engine. I want to know whether or not you feel like the character is too large compared to the world.
8. Programming. I have seen extensions and objects such as: E++/If,Else/etc. that remind me of actually typing out code. Are the better click games using things like that to make their games? Should I be looking into all those objects and extensions to make my platformer?
9. Extensions. For my platform engine, what extensions do you feel are necessary/nice to have/stay away from?
10. HWA. Is it worth it at this point. Or should I not even deal with that until release?
I think that is all of the questions I have for now. I would like to thank anyone for even reading it. And like always, any advice would be helpful and appreciated.
http://www.sendspace.com/file/lfnbuu
Re: Platform Game Questions: Organization/Optimization
Quote:
Originally Posted by Logiq121
Or should there be one All encompassing left and right movement with different events dictating whether or not the player is in a certain movement
I would use variables to branch off of a single set of movement controls. Much less duplication that way. You can have a variable for the player's speed for instance, and if the run button is held down, the speed value is doubled, and if the player is crawling, it's halved. You could set the animations manually based on those states as well.
Quote:
Originally Posted by Logiq121
3. Physics. I want to add simple physics to the game (I totally sound like a noob now.) But for the sake of organization should I code each individual object with physics or make one system that uses multiple objects? Right now I have "Muz's Guide to Making a Realistic Physics Engine" open. I was wondering if there another place I should be looking to deal with making the physics.
Look around on the forums. The Chipmonk physics engine has an extension for MMF.
Quote:
Originally Posted by Logiq121
4. Fast loops. I am familiar with them, but I am not comfortable with them. Are they the "Ultimate Answer" to making a custom platform engine? I want my engine to run smooth as some of the examples I have seen. i.e. Orphanage/Noitu Love/Tormishire. (Before bashing me, remember that I am here more for direction)
They're the ultimate answer to processing data faster than 60 times per second. If you need to make more than one pass on your data per frame, they are crucial, but if your events are simple, they aren't needed.
Quote:
Originally Posted by Logiq121
5. What is the best why to contain variables? I have used Alterable Values mostly but I want to get familiar with arrays and Global Values. For a platform game with multiple frames per level, Global Values seem to be a no brainer, but how should I go about organizing things?
That's sort of up to personal preference. I like global arrays (check the different array extensions, one of them at least does global arrays) because you can use the second and third dimensions of the array to store related values.
Quote:
Originally Posted by Logiq121
6. I recently downloaded and played "Kyntt Stories" It has a feature that is going to be in my game so I wanted to ask some questions about it. In KS is the game made up of one big frame with camera focus moving between each scene? Or is the game made up of multiple frames? If the latter is true, then how would I go about transitioning the players coordinates between the frames?
I don't know anything about Kyntt Stories, but it's pretty simple. Set some global value to the coordinates that the player is meant to arrive at, and have each frame check those coordinates on frame load and place the player there.
For example:
The player enters a door. The door's event sets the destination coordinates to 3246, 782, and chages to frame 5.
Frame 5 starts, and on frame start it sets the player's position to equal the value of the coordinates.
Quote:
Originally Posted by Logiq121
7. Scaling. I see that most Click games utilize smaller screens/resolutions. Why is that? I have not seen many games that use 640x480 or larger. I am going to upload a copy of my current engine. I want to know whether or not you feel like the character is too large compared to the world.
Pre HWA the engine had serious problems maintaining acceptable framerates at resolutions above 640x480 on average hardware.
Quote:
Originally Posted by Logiq121
8. Programming. I have seen extensions and objects such as: E++/If,Else/etc. that remind me of actually typing out code. Are the better click games using things like that to make their games? Should I be looking into all those objects and extensions to make my platformer?
Probably. Extension like that add valuable logic to the event editor necessary for doing more complicated events.
Quote:
Originally Posted by Logiq121
9. Extensions. For my platform engine, what extensions do you feel are necessary/nice to have/stay away from?
I haven't investigated extensions for platform games.
Quote:
Originally Posted by Logiq121
10. HWA. Is it worth it at this point. Or should I not even deal with that until release?
Experiment with it, but wait for release to do anything serious. It may or may remain compatible with previous betas. It also has some glitches which will be fixed, so anything that works or doesn't on the basis of those will change.
Re: Platform Game Questions: Organization/Optimization
Wonderful to see people are finally typing out short posts ;)
Quote:
6. I recently downloaded and played "Kyntt Stories" It has a feature that is going to be in my game so I wanted to ask some questions about it. In KS is the game made up of one big frame with camera focus moving between each scene? Or is the game made up of multiple frames? If the latter is true, then how would I go about transitioning the players coordinates between the frames?
Knytt Stories is almost all in one frame.
Re: Platform Game Questions: Organization/Optimization
I would highly recommend getting the Advanced platform movement extension. It is basically a customizable CPM with ridiculously simple logic instead of using coordinates and values.
Re: Platform Game Questions: Organization/Optimiza
Sure, the gameplay in Knytt Stores takes place in a single frame, but there's no scrolling. Whenever you enter a screen, the scenery is rendered according to the map file content of that screen, and the previous one is discarded from memory completely. This allows levels to be infinitely large (well, technically there's sooner or later not going to be enough space, but KS could at least handle a level with 100,000 screens without any major problems).
However, to pull something like that off, you can't design the levels in MMF2's own frame editor, you'll have to create a custom level editor.
Re: Platform Game Questions: Organization/Optimiza
Quote:
Originally Posted by Nifflas
Sure, the gameplay in Knytt Stores takes place in a single frame, but there's no scrolling. Whenever you enter a screen, the scenery is rendered according to the map file content of that screen, and the previous one is discarded from memory completely. This allows levels to be infinitely large (well, technically there's sooner or later not going to be enough space, but KS could at least handle a level with 100,000 screens without any major problems).
However, to pull something like that off, you can't design the levels in MMF2's own frame editor, you'll have to create a custom level editor.
Okay then... maybe it's not exactly what I'm looking to do. I'm trying to pull off something more along the lines of the 2D metroid series. Where each room is on it's own frame but you still have a scrolling frame when the room is big enough.