Sign in to follow this  
  • entries
    8
  • comments
    27
  • views
    4073

Learning...

Sign in to follow this  
darkpanda

255 views

... that's what it's all about !

In the news of the day, I am proud to announce that 2 of the 3 steps mentioned in the last post are achieved, nameley collision detection and user input.

To this latter extent, by the way, I must humbly grant significant insight-triggering to darookie: besides being the only active IRC chatter on #gamedev to share the same 3 first nickname letters with me, he has indeed be the source of unsuspected neuronal re-organization in my brain around the more or less well defined concept of "it's all about interfaces".

To make it short, I was simply amazed at the simple - yet profoundly impacting - following function signature:

GameEvent updateEvent(PlayerEvent event, Output &output);

I don't want to write much more about how thinking in an interface-oriented way has modified my approach to coding, since I am no expert at it... yet :)

Instead, here's what the Tetris is at:
- Collision detection works; block movement and rotation are limited to the appropriate area
- Player input is roughly implemented; in other words, it works, but I need to change the direct referencing to game logic functions according to the afore mentioned enlightenment :)
- Lines wiping also works perfectly, although I'm not sure I am already counting the wiped lines (wrote that code some time ago actually :P)

So basically, it is playable except for one noticeable unimplemented feature: falling. Yes, actually, the blocks are just hanging in the air waiting for the user to press the down arrow to move them down, or spacebar to 'drop' them (i.e. move them all the way down, wipe lines and insert new piece). It shouldn't really be a big issue, but since I want the falling speed to match the music tempo, I will be very careful as to how implement it.

Now, for the basic Tetris to be fairly enjoyable, it needs a scoring system, maybe some tuning on block rotation, and also tuning on user input (I would like the blocks to keep moving when a user keeps a key pressed).

Regarding graphics, the render classes I implemented so far are rather ill-designed, so that to finish with the core game engine, I especially wrote a single rendering class (called SimpleTetrisGridRenderObject...) before going on to deepen the graphics.

During my upcoming coding sessions, I will most probably start toying with audio, with OpenAL probably, though I didn't investigate any other sound libraries so far.

According to day-to-day mood, I might also start a real usable design document, since I will inevitably need one when it will come to add artistic content on a big scale.

Bye for now, with a shot of what it's up to, as usual:



EDIT: the current 'score' text is fake, obviously
Sign in to follow this  


1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now