Problem with Easy Block Dropping Game!

Thank You
Last edited on
Is this kinda like dr mario or, if the blocks are not stuck together, some snes puzzle I think I remember (it had like stars are hearts for blocks).

That is a pretty difficult game to create, and you are NOWHERE close to completing it, and there are too many things that I can criticize for a comprehensible post.

The actual game logic for this kind of project is complicated enough that getting a graphical interface set up is a better learning experience, more rewarding and overall a better use of time. I think you will like LazyFoo's tutorials because he has a similar C style as you do (but take his code with a grain of salt, its a good foundation which allows you to expand with your own code). Or maybe look at some open source example of how this could be done.

For the problem at hand, in "drop" you are mixing up the x and y of the parameters, you incremented the x value, not the y value. But the even larger problem at hand is that you you are not doing range checks to see if the tile reached the edge, because you will get very weird results and segment faults, and you need to range check the block too because its not 1 tile big (if you are doing something like dr mario), or you need to keep a list of moving blocks and a flag to see which part of the block is moving.

And don't get me started on animation, combo's, matching blocks, rotating blocks, resizing the board, physics, and all the bugs that could possibly surface.

Try something like tetris first, or anything to teach you simple game logic.

I also don't get what you mean by When three or more blocks are connected, they will be merged towards the bottom-left direction.

Also read the sticky on beginners and re copy and paste your code with spaces and click the <> button when you edit.
Last edited on
Topic archived. No new replies allowed.