levels by xoxos - free bouncing game win32

Started by
-1 comments, last by xoxos 8 years, 11 months ago

http://xoxos.net/software/levels.zip

tl;dr free bouncing game for win32

thought i'd better do a simple game before starting anything complex, so made this for the experience.

proposed: an elementary venue for the dynamics and dramas of event. content has been meticulously minimised so as not to interfere with dynamic smile.png i'd like to make a few games with minimal graphics and emphasis on play..

the environment (procedural) makes one "brick" per screen width (position from white noise generator) which means the gameplay will be different for any given monitor width. gameplay consists of navigating a bouncing player to win collisions (ala "joust") and reach pickup points for a gun and two items which counteract gravity (effectively turning the game into a top-down view).

made 4 levels which are just "harder with different colours" - tapping keys 1-4 instantly starts that level. how exciting!

i'm an audio coder so had fun experimenting for the first time with simple bitwise sound effects - except the bouncing sound which is synthesized with six oscillators. but overall the quality is kind of knock-together functional.. enough to constitute the rudiments of a playable experience, nowt more.

the characters are drawn using an aa circle algorithm, so again no effort .. "fancy" effects (explosions) are done by fast animations, so a single screenshot isn't very interesting.

what did i learn here...

i had to calculate the proximity of enemies to amplify the "enemies are close" sounds. apart from these cases, collision checks use rectangular bounds.. i wanted to do this "simply" but i would chuck it and do the whole thing in floats and trig for future projects (still worth doing once for conceptual simplicity, works here with the orthogonal movement). if it wasn't for the bouncing and need for hi-res vector, i'd probably go INTs for character position.


game has a very simple windows message loop and an audio routine, haven't coded any multithread apps yet. discovered that the length of the audio buffer affected the "response" of game sounds, eg. when the gun is automatically firing at intervals, it would miss the sound effect where the rate caught the end of the block or something.. resulting in some shots missing the sound... (i "fixed" this by adding a check in the audio routine when the sound ends, if the button is still held, begin sound again.. this results in an occasional extra "fire" sound which is better than missed sounds..

my old netbook is too slow to run 16384 and i thought 32768 samples was unresponsive for the audio buffer, so i compromised and was surprised that my system didn't balk at a non pow2 buffer length...

other problems i had were with key responsivity.. using a general windows message loop, occasionally the game freezes for a short moment at the time when holding a key turns into repeat key presses.. not bad but i wonder if the length of my audio buffer was affecting key responsivity.. occasionally "i swear i hit the key first" but no reaction smile.png guessing windows message loop is not the way to correctly handle a responsive game???

maybe there's a way to turn key repeats off when gaming.. probably a simple search...... the game of course uses state flags to negate the auto key repeat, it jsut bumps my processor.

...the other thing i "learned" as i'm more C than OO...... i copied the "big function my game is in" for each level.. which needs a switch statement when the timer is called.. and i'm thinking, i could avoid this switch statement if there is such a thing as a pointer to a function. and so far i'm too lazy to see if i can do that, so obviously not graced with lots of OO coding experience.......

might as well attach it here as well -

neither a follower nor a leader behttp://www.xoxos.net

This topic is closed to new replies.

Advertisement