Tile Engine

    • About

  • Explosion feature

    Jun 15, 2024

    —

    by

    preston
    in Uncategorized

    Bombs explode!!! and I drew the explosion!!!

    https://tile-engine.xyz/wp-content/uploads/2024/06/simplescreenrecorder-2024-06-14_23.17.07.mp4

    Lots of code changes under the hood to get everything plumbed for what you see here. One of the big ones was moving the object pathing from C++ to Lua. It’s cool that I can add new objects to my game now by editing the Lua only.


  • They plant us the bomb

    May 28, 2024

    —

    by

    preston
    in Progress Updates

    Now you can plant bombs. Also I drew that bomb.

    https://tile-engine.xyz/wp-content/uploads/2024/05/simplescreenrecorder-2024-05-27_22.01.25.mp4

    I added the ability for a client to perform a Tile Action, which is an action done on a tile as opposed to an Object Action. As I’m writing this I just realized I forgot to include in the network protocol the originating object ID for the Tile Action. Also the list of object actions in the previous videos was all smoke & mirrors, now they’re actually implemented server-side and networked properly.


  • Lua Balls

    May 12, 2024

    —

    by

    preston
    in Progress Updates

    The game is getting really good now. There’s a command I can enter in that will create blue balls that bounce around the map.

    https://tile-engine.xyz/wp-content/uploads/2024/05/simplescreenrecorder-2024-05-12_15.22.45.mp4

    Lots of under-the-hood changes for the server’s Lua integration.

    • Clients can use a “/rcon” command to run arbitrary Lua commands on the server (this will be protected by password later)
    • Lua is in full control of object movements and creation
    • Lua is in control of which objects and tiles each client can see
      • This is for large game worlds where it’s too much data to send to all clients
      • Can also have hidden objects that clients don’t know about
      • Engine code automatically informs clients of updates to objects that they know about
    • Lots of refactor of C++ classes

  • Good game graphics

    Apr 27, 2024

    —

    by

    preston
    in Progress Updates

    Now the game can load images for graphics. Also the right click menu action “Examine” is hooked up to the server scripts and as a test they can create an object, which is a purple square at 0,0.

    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-27_15.15.35.mp4

    Every game asset has a json file that describes it. I created an AssetManager class that loops through all the json files and loads their sprite (only sprites for now). The server tells the client what “model” (a string) an object/tile is using, and then the client looks that model up in the AssetManager.

    Contents of mario.json:

    {
        "mario":
        {
            "sprite": "mario.png"
        }
    }
    

     


  • Hello from Lua

    Apr 26, 2024

    —

    by

    preston
    in Progress Updates

    This update is a little more technical behind-the-scenes stuff. I’ve hooked up the Lua interpreter to the game and when you right-click examine an object then the Lua script on the server handles it. Also you can now chat with the text box.

    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-21_15.18.19.mp4

  • The mysterious portal

    Apr 26, 2024

    —

    by

    preston
    in Progress Updates

    Incredible progress check this out

    • added a text console in the bottom left where you will be able to chat and type commands
    • got rid of the grid and made it shade the tile under your mouse cursor
    • there’s a blue portal in the wall and when you pass through it you get a message from the server
    • made it so you can’t pass diagonally through a solid tile
    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-12_10.45.00.mp4

  • Green fields! With black walls around them

    Apr 26, 2024

    —

    by

    preston
    in Progress Updates

    This is a big update. Changes:

    • movement of the player object is now smooth instead of teleporting between tiles
    • there’s now solid tiles and not-solid tiles and you can’t walk through solid tiles
      • except there’s a bug where you can move diagonally through solid tiles, it happens at the end of the video
    • you can right-click on any object and follow it with your camera
    • when a player disconnects, their yellow square disappears from other players screens
    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-09_22.52.18.mp4

    The smooth movement is done on the client-side with linear interpolation between server ticks. I think it’s surprisingly smooth for how simple it is, but I haven’t tested it across the network, just locally on my machine. The object is always behind its true position but that’s how it is in Runescape too and everyone seems to be fine with that.


  • Powerful menu functionality

    Apr 26, 2024

    —

    by

    preston
    in Progress Updates

    Now you can right click on a tile and there’s a menu and one of the options in the menu is to walk there. And everyone gets their own menu!

    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-08_13.07.49.mp4

    I included imgui and am using rlImGui to hook it up to raylib. It was super easy to get going once I figured out the CMake stuff.


  • Yellow squares can see each other

    Apr 26, 2024

    —

    by

    preston
    in Progress Updates

    Now more than one player can connect to the server and then the players can see each other. As yellow squares. Of course each player can command their yellow square around and independently move/zoom their camera.

    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-06_23.05.47.mp4

    Under the hood the code is pretty slapped together. I’m not taking the time to refactor anything and most of the code is just sitting in the server/client’s main file. Global variables and every class member is public for maximum productivity.


  • First progress video

    Apr 26, 2024

    —

    by

    preston
    in Progress Updates

    You’re a yellow square and when you click on a grid space then the yellow square walks there. You can also move the camera around and zoom in and out.

    https://tile-engine.xyz/wp-content/uploads/2024/04/simplescreenrecorder-2024-04-05_20.29.48.mp4

    Behind the scenes there’s a server program and client program. The server can handle multiple clients (players) but they can’t see each other. I’m using C++/CMake with raylib and nbnet. There’s also a Lua interpreter in the build but it’s not doing anything yet.

1 2
Next Page→