I’m not a game developer, I haven’t used my own sprites yet, and my JS code is a mess, but look at this HTML and CSS code—isn’t it beautiful?

My next step is to understand how to implement a proper collision system, and I have absolutely no idea how to do that  

#GameDev #HTML #CSS #RPG

@timotheegoguely
I like to use a 2-dimensional array to store whether each tile is a wall or empty-space.

This is basically an array containing arrays. A list of lists. Which can be used as a grid.

collisionArray[x][y] = collisionValue

Now if you know the pixel-size of your tiles, you can make each tile correspond with a different array position.

Before allowing the player to walk in a direction, check the collision value of the tile in that direction.

#Programming #GameDev

@timotheegoguely Take a look at the first couple "Ten Minute Physics" tutorials, there's a basic pinball machine and a bunch of circles bouncing off eachother (all in plain JavaScript). Not the most sophisticated collision system, but might be a place to get started!

@timotheegoguely This is really cool!

How are you rendering the background? Is it one big image, or do you have some way of combining sprites together?