Sprite Mapping

Started by
1 comment, last by MyLastGamble 9 years, 5 months ago

Hey everyone! I've taken some advice I've received on this forum and not only have I decided to not use a game engine for my first few games but also I have decided to start with a Tetris-Style game for my first game. I've worked out a lot of the behind the scenes logic and have created a single block sprite to use as I figure I would need to make all of the shape images out of 4 block sprites that way I can get rid of part of a shape and leave the remaining blocks if need be.

Upon doing some research I was able to figure out that some of the older games, such as the tile-based RPG's, use a multi-dimensional array to represent the mapping logic and then link each array digit to a tile set. I figure I could do a similar thing to my Teteris game, using an array of 1's and 0's. This would give me full control of the mechanics as I can just play around with the arrays to get the desired results I need. The problem I'm having is all the research I'm doing to figure out how to link my sprites to my array-map link to how-to's on using game engines or frameworks where a lot of the code is built in already.

Does anyone know of a good resource I can use to help me learn how to code, from scratch, linking my block sprite to my array? Any help is appreciated!

Advertisement

Multidimensional arrays can be painful at times. Just use a one dimensional one.

http://www.cplusplus.com/forum/articles/17108/

http://lazyfoo.net/tutorials/SDL/39_tiling/index.php

Thanks I'll check those out. I also found this this morning: http://msdn.microsoft.com/en-us/library/ff634505.aspx. I'll probably go through this first as I love MSDN and I'm coding in a Microsoft language, but I will check them out as users out there have nice tips that you just don't get with "official documentation".

This topic is closed to new replies.

Advertisement