How To

A tile based planet x2 like engine

2

Wild William 2021-09-30 07:33

I’m looking to make a survival rpg on a fixed tile grid with no sprites, I haven’t been able to figure out both scrolling and tile memory (the game remembers the tile beneath “sprites” and replaces it when it moves off it) any help or engines would be appreciated!


Timo 2021-09-30 07:45

For scrolling you need to move the backgrounds AND the sprites. Keep in mind that in NX the SPRITE command does not draw on the background, but just sets the sprite settings. Sprites are actual objects floating on top of the background.


Timo 2021-09-30 07:50

Maybe I got the question wrong… you mean the game from the 8 bit guy?

If no smooth scrolling is required, but only grid based: the easiest thing is to just BG COPY the current part of your map to screen with the correct source position.
You can then use the CELL command to draw your objects.


was8bit 2021-09-30 07:54

The easiest thing to do is to settle for all piece to move like checkers.. that is, they jump from cell to cell without the smooth pixel level movements...

Gameplay can be just as exciting if you are clever with the design of the game :)

Now, along the idea of keeping things very simple, you can use BG 1 for your stationary things, like walls and floors and items lying on the floor... then use BG 0 for things like the player, enemies, and other things that can move about the maze...


was8bit 2021-09-30 08:00

Now, lets say you make thins more complicated by having more than one type of floor, say a solid normal floor, then a muddy floor... if you allow for items to be found or dropped on any floor, you will need to create a tile to represent an item on each type if floor... so you would need a set for all items on a normal floor, then another set of all items on the muddy floor...

Using only one kind of floor, OR only allowing items to be placed on a normal floor, would simplify things a lot... simplier is better code-wise ;)


was8bit 2021-09-30 08:05

Lastly, do you plan on using ARRAYS like MAP0(100,100), MAP1(100,100) to store what is where on each BG level? It would be the easiest way to do it...

Keeping enemies stationary until the player gets close to them would also simplify things....

Remember, the more things going on at the same time means the more code you have to write to keep track of all possibilities... proper planning now before you start will help considerably :)


was8bit 2021-09-30 08:06 (Edited)

I would also encourage you to look thru what is already posted, and look thru the code of interesting games... you can get some good ideas this way ::


CreatorJo 2021-09-30 19:51

Wait, you watch The 8-Bit Guy too?


Timo 2021-10-02 07:56

I watched his channel a lot some time ago, but I got a little bit bored of all the retro computing videos. I guess because there is nothing new anymore ;)


Log in to reply.