itch.io is community of indie game creators and players

Devlogs

v0.1.0

Side-Exit
A browser game made in HTML5

Since I worked on this for a month I suppose it's time to do a little reflection.

What is this project?

This idea for an exploration game involving an elevator is something Megabyte Magician and I cooked up a while ago. It started with a story I started writing inspired by Arai-san mansion and other psychological horror things that have accumulated in my skull. Not gonna reveal anything yet but eventually I'd like to create a wild-west kind of world for the characters to inhabit. You either know the rules or get sucked into the maelstrom that takes you deeper until its just you and the eye.

But first I'd have to make some sort of core gameplay loop. My current idea is that you find yourself in a strange apartment building with no exit, and in order to have a safe place to stay the landlord tells you that you can get a room for a grand total of 5 dollars. So you enter strange worlds through the elevator, scrape spare change out of vending machines and trying not to get lost along the way.

Since the game is focused on exploration I'd like to take a 3D approach instead of doing some sort of 2D platformer. Maybe something like Paper Mario where you're moving around as a billboarded character with static Silent Hill 1-like camera angles. Suffice it to say I've got some design work ahead of me

Why are you using Odin and Raylib for this project?

Simply because low level programming interests me. If I'm not learning new concepts along the way I quickly find myself getting demotivated. That, and I absolutely hate it when a Game Engine does something quirky and abstract that I'll have no way to properly understand. I'd rather just write some extra code and take it from there. Raylib lets me do that. I've included it in my repository as a submodule of my own fork. Meaning I can customize it as I like as well as debug it directly when it does something I don't understand. The "fail fast" methodology of modern game development says I'm doing everything wrong, and that if I had used Unity or Godot then this version of the game would have been finished in 3 days instead of 4 weeks. True as that might be then I wouldn't have learned anything except non-reusable Godot-specific knowledge.



So what did you learn doing this then?

  • Audio processing

In order for the sound to become muffled when the elevator doors close I need to apply a low-pass-filter to the playing music. miniaudio's (the underlying audio library of the Raylib audio module) pipeline allows you to insert middleware for when new audio data is requested, allowing you to generate the soundwave as you go. Check the Raylib raw audio example.

  • Modifying and debugging the Raylib source

It took learning a bit about how Makefile works, and Odin's compile time constants, but the scripts I have added to the project let me easily rebuild Raylib for web and desktop in case I need to make changes to the underlying source. And since Raylib is simple as pie to understand this can easily be done. It's not much, but I already did it in order to be able to loop sound effects loaded from wav files.

  • Writing shader includes

This is something I consider crucial if you're to write any substantial amount of shader code. e.g. Most of my 3d shaders are going to be lit, and in the future also support normal maps and possibly more. So having to copypaste the implementation all the time would be rough. This is not in by default in Raylib, but its like 20 lines of code to do it. So that's super easy to add! And so powerful once you've added it in.

More things that I'm not going to go into

  • Manual memory management using arenas
  • Memory debugging techniques such as logging on allocation
  • Writing a custom game loop with game objects that have events
  • Basic 3d modeling

There's a lot of exciting opportunities on the horizon. With Karl Zylinski making good Odin+Raylib resources, I feel like I have a guide on this difficult path. Things like generating texture pages, or hot reloading are probably things I'm going to be implementing in the near future.

Source code is available here: https://github.com/Synthasmagoria/side-exit-v0.1.x And it should be pretty easy to build if you're on Linux or just Odin+Raylib savy.

See you in v0.2.0

Files

  • game.zip 17 MB
    5 days ago
Leave a comment