A game I'm working on

I’m making some kind of tile based platformer game. Code wise I have the basics for making new tiles and tiles that can display differently depending on surrounding tiles along with some stuff related to the grid(s) that the tiles go in. I also plan on making some kind of editor to create levels for the game once I work a bit more on it.

You can press G to toggle the grid to see how the tiles are aligned and currently it’s only one type of tile. If you fall out of the map you can just reload the page.

preview.html (2.1 MB)

Any suggestions are welcome since I don’t have any exact ideas on what the goal would be for most levels.

2 Likes

I made a little test with building

You can now press F to swap between building or breaking. Then hold the mouse down to either build or break accordingly.

preview (2).html (2.1 MB)

Some tweaks to the above file: preview (3).html (2.1 MB)

1 Like

Nice work keep up the great work

can I get the wick file I wanna try to make it a bit less laggy

So far the most laggy thing is probably when it has to reload an area since it does a for loop through each tile but will still get rid of and recreate each tile even if some tiles didn’t change. There are also some other optimizations that I plan to do later but this is my current wick file.

PixelGame1-10-2022_10-18-15.wick (31.4 KB)

Added

  • New tile, wooden platform
  • Proper walking animations
  • Save and load code system
  • Fall off map respawn

Controls

  • A to move left
  • D to move right
  • Space to jump
  • G to toggle the grid on or off
  • F to swap from building to breaking and vice versa
  • 1 to select the rock tile as your building tile
  • 2 to select the wooden platform tile as your building tile
  • O to get the code to load the level (copy it)
  • I to paste your code and load the level

preview (4).html (2.1 MB)

This is one level you can try (just copy the code below and paste it in when you press “i” in game)
The goal is to get to the wooden platform near the top left of the screen

0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,2,2,0,0,0,0,0,0,2,2,2,2,0,0,2,2,0,0,0,0,0,0,0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,2,0,0,0,1,1,1,1/empty|rock|wooden_platform

2 Likes

I’ve got it now working with multiple areas (so large overall level area) and a bit of camera movement to stay with the character.

preview(5).html (2.1 MB)

Same controls as before but there is no saving and loading for now

Go below the layer of tiles you start on to reach another layer of tiles.

1 Like

It is nice, but for some reason the walk animation flashes at my end… like if there is a missing frame or something…

I think it is from the image swapping and occasionally the image takes a bit longer to load. Right now it’s just one image with the source being changed, but I am going to try have an image for each frame and use paper’s visible to have only the active one shown but the other frame should end up not having to take extra time to load hopefully.