Advice. What should I do now/how do I organize this?
Posted: Sun Aug 26, 2012 12:35 am
Hello All,
I'm working on a fullscale* game in LÖVE, and I've reached a point where I'm unsure what do next. I'm also unsure who to turn too to help me, but I'm guessing many of you will have experience both with LÖVE/Lua and game programming in general, so, if you could please guide me, I'd be very grateful.
* Fullscale as in more complex than a simple arcade/demo style thing.
Now, before I discuss my concerns, let me give you some background on my game, and what I have developed so far.
The game is a 1-4 player fighting game. It features a variety of characters that are distinct and have special abilities, as well as stages that will have unique properties. (What I'm trying to get at, is that it's gonna call for quite a bit of custom code in each part.)
Now, so far I have implemented and more-or-less tested thoroughly:
(NOTE: I think that's everything, but I don't have the source code in front of me, so I might have forgotten something...)
Also, all of these modules are more or less independent of each other (which is a good thing.)
Now, my problem is how I'm gonna get all of this to work, namely what direction I need to go with levels, and implementing the various entities in my game. Although I have a lot of general programming experience, I've never worked on a big game, and so I'm afraid I'm gonna screw up the design and end up with a hacky monster that will go down in flames before the world ever gets to see it.
I'm looking for few things really: 1) A tried and tested design that is clean & elegant, as well as flexible and able to be extended. Surprisingly very little of this is taught in game programming books (at least the few that I've read), generally due to breivity, so I know it's a lot to ask, but if you could share your experiences, and designs, especially if you've designed similar games. What were some of your best decisions when it came to interfacing different parts of your game, and why? Are there any more developed frameworks that run on top of LÖVE that I could study or modify? 2) Organizational tips. This will of course be part of the design, but how should I divide and organize all of this code, without it becoming a big sludgeball? (NOTE: I'm not used to Lua--being a C guy myself--and so I feel I might get too relaxed or something...) 3) Advice on how I should implement specific parts of my game. These are the main points that come to mind:
Well, that's just about everything. I really hope I made myself clear, since even I'm having a hard time explaining it to myself. (Don't hesitate to ask me to clear something up!) Anyways, I don't want someone holding my hand at every step, but at the same time I'm so overwhelmed I can't even take a step yet. I'm sure, a more experienced developer is snickering over how simple all of this truly is, but when one's never done it before, it just tends to be daunting, if ya catch my drift.
Thank you all in advance. I will be very grateful for any help at all.
I'm working on a fullscale* game in LÖVE, and I've reached a point where I'm unsure what do next. I'm also unsure who to turn too to help me, but I'm guessing many of you will have experience both with LÖVE/Lua and game programming in general, so, if you could please guide me, I'd be very grateful.
* Fullscale as in more complex than a simple arcade/demo style thing.
Now, before I discuss my concerns, let me give you some background on my game, and what I have developed so far.
The game is a 1-4 player fighting game. It features a variety of characters that are distinct and have special abilities, as well as stages that will have unique properties. (What I'm trying to get at, is that it's gonna call for quite a bit of custom code in each part.)
Now, so far I have implemented and more-or-less tested thoroughly:
- - a state manager (similar to the one in the HUMP library, but has stack capabilities, to allow multiple states to run at once.)
- a screen/resolution manager (allows my game to run at any resolution, and automatically adds letterbox bars.)
- a simple animation library (Not grid-based (to support unequal sized sprites), handles updating animations globally so they don't need each need an update method, compatible with love.graphics.draw())
- A simple camera (supports zooming in/out, and parallax scrolling)
(NOTE: I think that's everything, but I don't have the source code in front of me, so I might have forgotten something...)
Also, all of these modules are more or less independent of each other (which is a good thing.)
Now, my problem is how I'm gonna get all of this to work, namely what direction I need to go with levels, and implementing the various entities in my game. Although I have a lot of general programming experience, I've never worked on a big game, and so I'm afraid I'm gonna screw up the design and end up with a hacky monster that will go down in flames before the world ever gets to see it.
I'm looking for few things really: 1) A tried and tested design that is clean & elegant, as well as flexible and able to be extended. Surprisingly very little of this is taught in game programming books (at least the few that I've read), generally due to breivity, so I know it's a lot to ask, but if you could share your experiences, and designs, especially if you've designed similar games. What were some of your best decisions when it came to interfacing different parts of your game, and why? Are there any more developed frameworks that run on top of LÖVE that I could study or modify? 2) Organizational tips. This will of course be part of the design, but how should I divide and organize all of this code, without it becoming a big sludgeball? (NOTE: I'm not used to Lua--being a C guy myself--and so I feel I might get too relaxed or something...) 3) Advice on how I should implement specific parts of my game. These are the main points that come to mind:
- - How to represent levels. Should I use a level editor? Levels will be fairly simple (e.g. a ground, & perhaps one or two solid platforms), they don't scroll much.
- Depending on how I manage my levels, how should I load all of the data (e.g. What system will I use to know when to load Level A, and when to load Level B? How much information should be passed to the level loader?)
- I was planning on using several gamestates at once to divide things up. Example: In a typical stage I might have a background state that just draws the static background (which would be an array of 100 256x180 images), a medium background state that perhaps would be animated (e.g. birds flying by, traffic, background stuff that depends on context.), a player state that controls and renders the players' sprites, AI states that control the CPUs. I'd also needs states for platforms, score keeping, etc. Anyways, is this a reasonable system? It makes each state fairly simple, but IDK...
- How do I get all of these states to communicate? (e.g. player-state hit CPU-state, CPU-state needs to lower HP-state, and increase score-state, etc.) My state manager has basic global messages (e.g. setGlobalData()/getGlobalData()), but even this is messy. Is there a better way?
- Like I mentioned above, this is going to call for a lot of custom code, for each character, level, etc.,. For example, Character A might be have combos X, Y, Z, but Character B might have combos A, B, C. Every character is playable by both the player and the computer (at different difficulties), so code-reuse is optimal here. How would I manage all of these things?
- I plan on using a slightly enhanced version of the AI method described here: http://gamedev.stackexchange.com/a/33576 It seems fairly straightforward, but would I make it a general module, or would I need character specific AI to choose the right moves.
Well, that's just about everything. I really hope I made myself clear, since even I'm having a hard time explaining it to myself. (Don't hesitate to ask me to clear something up!) Anyways, I don't want someone holding my hand at every step, but at the same time I'm so overwhelmed I can't even take a step yet. I'm sure, a more experienced developer is snickering over how simple all of this truly is, but when one's never done it before, it just tends to be daunting, if ya catch my drift.
Thank you all in advance. I will be very grateful for any help at all.