OK. Here is a background (without the floor or anything) for Rumblebee, made by gamma correcting the HONEY.BMP background from Windows 3.x, converting it to 4 colors, and tiling it. The image is sized 384*224, like the VB’s display. If you want it to be longer (for scrolling backgrounds), tell me.
It’s intentionally dark so it doesn’t attract too much attention and lets the player concentrate on the characters.
Nice. Will there be any character stats shown in the character select screen? The characters could differ in attacks, speed, jump height, etc.
For example, one character could be an offensive one, having strong attacks, but wouldn’t be very fast and couldn’t jump over the opponent, while a defensive character would be the exact opposite. Just a suggestion.
And maybe there could be a dedicated jump button. Using “up” to jump is annoying.
Now you need to implement gravity. Maybe this could be done like this: if a character’s Y position (at their legs) is higher than the ground level, decrement it until they’re equal. Then jumping could be done like… I don’t know, let’s demonstrate it with some code: (NOTE: not tested, and I might have forgotten something, this is just a very rough draft. ALSO, under no circumstances use those variable names – replace them with something more descriptive!)
// jump & gravity idea, by HorvatM, 12/31/2009
// if code is too fast, use timers for delaying w/o affecting the rest of the game
// variables for jumping & gravity
// NOTE: their value is not defined - define it yourself
char y; // character's Y position
char j; // flag: is the character in the middle of a jump, and in what position?
char p; // jump power - how many pixels the character travels in one go - must be at least 2, otherwise it won't work b/c of gravity
char m; // character's max. Y position - how much can the character jump
const char g; // ground level constant
while(1) // main loop
{
if(vbReadPad() & K_A & y==g & j=0) // begin jump if A is pressed and we aren't already in the middle of a jump and if we are on ground level
{
j++; // j becomes 1, which means true
}
if(j) // if j is true, i.e. more than 0, which means we are in the middle of a jump
{
if(jg) y--; // gravity
// code for movement, AI, etc. goes here
}
Of course these are all just my suggestions. I don’t want to annoy you in developing your game.
This reply was modified 15 years, 6 months ago by HorvatM.
It’s an operator that returns the remainder of a division, and it’s represented by the % sign in C and usually by MOD in BASIC. For example, 10 % 3 equals 1.
It works now. The only remaining problem is that it disappears when you zoom in, but I don’t think this is going to decrease usability.
EDIT: Oh right, that’s what the Z index is supposed to do.