I would like to get your ideas about tile maps vs normal single screen games.
My plus points for tile maps are:
- you can make a game that is bigger than one screen;
- have the camera follow a sprite;
- easily place tiles and sprites over the entire map, and with extensions such as ‘Colour-coded Tilemap’ even easier
- that you have certain physics built in, such as walls and bouncing off them or that stop the sprite
A few minus points for me are:
- Assuming I have enemies or projectiles moving along the x axis. If I want an enemy or a projectile to leave the screen, it can only go so far as hitting the inside edge of the tile map. I can set the sprite to be a ghost when it is at a wall, but then it can no longer overlap the player. If it is not a ghost and self destructs at the wall, it gives the appearance that it suddenly disappears and does leave the screen. Also a player just below or above, can move into that position just after it explodes, making it easier to move there. Is there a more obvious way to achieve this?
So related to my point above, I like with a screen game that projectiles auto-destroy themselves when leaving the screen. You can also have a sprite stay within the screen.
I haven’t found an easy way to design the ‘background’ of the game (so similar to placing a tile). Is there a way to places sprites on a screen game, similar to the way a tilemap works, without having to create each sprite and set it’s location? So like the colour-coded tilemap extension, you place markers within the screen, and then replace all instances with a sprite. The sprites would also act a tile and have a z order lower than the player.
I guess what I am looking for, are two things:
- Using a tilemap but have sprites leave the screen (without doing too many workarounds), that still overlap the player.
- Designing a screen game by placing sprites similar to how you place tiles in a tile map.
I look forward to your ideas and appreciate your feedback.
There are usually mazes and shooting games when they are in a maze. Then there are parkour games which is what everyone does.
this happens already when a projectile “leaves” the screen. It auto destroys when it hits a wall.
I sprites don’t destroy on wall unless of you take some of those flags and you set the sprite that if it hits a wall, it will be destroyed.
Thanks for your reply. I am starting to understand how a sprite works, and it very similar to how Touch Develop worked. I am really more interested in:
- knowing if we can make screen games, similar to how a tile map is laid out, and
- when using a tile map, whether a sprite can still overlap the player, but move through walls
My points may sound unrelated, but for me, I want to decide whether to create a screen game or a tile game. They both offer different game types, but I guess I am also wondering whether we can have ‘the best of both worlds’.
Are screen games more usually like those one room games? If so, then those would be easy to make with a 10x8 tilemap because it fits the whole screen. You don’t always have to use tilemaps for them though. You can use background images and place sprites all around the screen and when you overlap them, it will ask you something and maybe it’s like a new quest now. I looked up on what touch develop is and it is really nice. There are these
set camera follow sprite kind of things which you mentioned in your first post of this topic, and those blocks are really useful when you want a camera for them to follow.
Yow can always let the sprite overlap a tile on the tilemap and let them “teleport” into a new tilemap and you can use the block
place mySprite on col _ row _. But place that block after the new tilemap you are using or else it will result an error or teleport you into a tile in your previous tilemap and then teleport you to your new one and your
sprite will spawn where you don’t want it to spawn.
I believe that this topic is really well thought out and you have everything laid out and thought out before hand.
When I say ‘screen game’, I mean not using a tile map. That way the game is only as big as the screen. You can decide to walk off it or stay within the screen; it’s up to you.
When not using a tile map, I am looking for a simple way to decorate the background, similar to how tiles are placed.
When using a tile map, it would be nice to set a sprite as an enemy (i.e. it overlaps), but still can move through walls. A block to set a sprite flag such as:
set sprite 'moves through wall' true
There is a sprite flag to get the sprite to stay in screen but I don’t know what would happen if you attach the stay in screen and a camera follow block?
Well, you can set the background color and picture with these blocks:
You can also get the
and many more properties about the screen.
And you can modify the image from code using the picture functions here. Note that modifying any image via code and not drawing it will keep the image in memory. (Each pixel is half a byte I think, so a full screen image is 9600 bytes)
It would be great if you could decorate a screen, similar to how the colour-coded-tilemap extension works. That way sprites can leave the screen, and you can have them destroy themselves.
When using a tile map in this game, there are four sprites where sprites 1, 3, 4 can overlap (i.e kill the player) and sprite 2. cannot.
Top to bottom
- can overlap, but cannot leave screen.
- is a ghost, so it does not overlap, but CAN leave the screen
- is set destroy outside screen, but stays there until the player moves left
- can overlap, but when it destroys itself, it is within the boundaries of the game.
It is not a big deal, but you might notice that the ghost sprite leaves outside the game, while the bottom sprite leaves within the game.
For a tile map, I would be great if a sprite, that is set to ‘auto destroy’ itself (i.e. outside the realm of the screen), that might occur when it hits the boundary of the tile map. I understand when @jwunderl mentions in Enemy Defeat how this works.