Yesterday was the 25th anniversary of the release of the Game Boy in the US.
To participate in the festivities I'm showing a small test ROM for 波摩(HAMA).
HAMA is a sound engine for Game Boy video games I'm developing to use in "Fa'el - Beyond The Edge -"
The song was made by Surasshu for うたいたガールUTACO~「ＩＩコンは世界を救う？！」and he let me use it for testing purposes (Thanks!)
Currently HAMA only works on the two square waves channels, so, noise, triangle and samples from the original song are lacking.
You can download the test ROM here, or directly watch a video quickly recorded from my gameboy:
Today I'd like to write a little bit about the inner workings of the game:
The main objective when planning for the visual style of Fa'el was to make something visually stunning, but, at the same time, something that would allow me to create content and tweak it with the least possible amount of effort.
For that reason I have chosen to use the workflow of a 2d platformer: The maps are created with a 2d tile editor, using 2d tilesheets. The sprites are also 2d spritesheets. All the logic of the game is also coded as in a 2d platformer (There are helper functions that help to map points between the 2d map-space and 3d space for special purposes, but those are only used when needed).
The trick then lies on hints that are created for the sprites, the tilemaps and the maps themselves. Those hints tell the engine how to extrude the pixel data and what kind of material properties each part of the pixel data has. There are also hints for the tilemap, to tell the engine how every tileblock should be assembled in 3d. And finally there are hints for warping whole sections of the map. That is essentially the mechanism that allows to give volume to the world; to create bending passages, staircases, etc.
Here is a simple room made for this post (By the way, I'm using Tiled to create the tilemaps):
And this is how this room is rendered ingame:
Finally I can add, for example, a curvature to this section of the map to give it a cylindrical shape:
It may not be obvious at a simple glance, but the amount of polygons created from the pixel data for a map is huge. The hard edges are also a disadvantage for vertex storage (corner vertices cannot be shared between triangles because they have different normals). For a map of medium size, 153600000 vertices are used in average. With 32 bytes of data per vertex, that is 4.577 GB of vertex data. Certainly that is not an amount that can fit in most consumer GPU memories.
For somebody paying attention, the solution is obvious. Tilemaps were created to conserve memory, so the same principle can be used here. We store only instances of every extruded tile in the GPU, and then we build the visible part of the map each frame.
There is only a little detail left: By shaping the world, we are creating several new models for the tiles that lie in the transition parts. Those meshes are different from the original not deformed meshes and as such, they need more memory space for each, greatly lessening the advantage won by using instances.
The solution again is not very surprising. We store the multiplied matrices for the stack of transformations that affects every area, and then using a vertex shader we interpolate those matrices and apply them on every vertex before rendering. In a word, we are generating the deformed meshes inside the GPU on the fly.
Now we reduced our big maps to a small set of small meshes with a very small overall memory footprint. However as they say, nothing ever comes for free and what we just did is trading memory for more processing power. We still have the problem of having lots of small polygons to render every frame. Spatial subdivision and LOD come to the rescue at this point. The specific implementations for this game may be a topic of a future post.
It took me quite a while to fully announce the existence of Fa'el - Beyond The Gate - out to the public. Maybe too much. But here we are now.
I think that there are quite a lot of things about the development of Fa'el to the point it is today that may be interesting to share. I will try to retro-post all those things that happened (stuff about ideas, technology, etc) now and then, so keep around.
For now, I will just give thanks to all of you for being here reading this, and share some little info:
I know the whole game feels like shrouded in mystery by now. And I can give a reason for that. It's easy to show how the game looks and sounds with a video, because it's a medium that translates quite directly those experiences to your senses. But gameplay? It's hard to show gameplay / to talk about gameplay. It's easy to play gameplay. I want people to play it to experience it when it's ready. That is what I don't want to talk much about it, nor the plot and background history. I want the game to be a constant surprise, it is one of my main objectives with Fa'el, so I want to keep most of it undercover until then to be delivered in a big blast. I'm kinda confident in that you will like the things I'm making for it.
That being said, here are a list of items that will shed a little more light over the Game Boy companion game:
Mainly as a way to pay a little debt with myself from the past, when I was just a kid hooked on the Game Boy for hours. A little box of plastic contained a complete game and inserting it in the console turned it alive. I could not even imagine in my wildest dreams in those years to be able to make one. Now I can. But coding for consoles so limited is now something from the past. So that train has passed. I'm taking a handcart.
No. It will not even be from the same genre. It will feature a part of the history concurrent with the events in Fa'el - Beyond The Gate -, and with gameplay suitable for a portable game. The password system is also something I thought was very cool at the time when not everything was so easily interconected. You progressed on a game on the go, and then you came to your house, turn on the home console, and transfer that progress so it reflected in some aspect of the "big" game. It may not sound impressive now, but at the time, it blew my head.
The game rom image will be freely available for everyone to enjoy as they want. Probably I will also release versions adapted for the most popular mobile platforms ready to go, so you can experience the on the go feeling. And... a very limited batch of physical cartridges will be produced, boxed and with a manual, the way we were used to buy games. I'm pretty sure they will be something really cool to possess. Stay tuned for more info about this.
Welcome to Fa'el's devlog. News and stuff about Fa'el's development will be posted here, hopefully frequently.
As an inaugural post, I'll talk about the blog itself: I wanted something very, very simple, just a place where to quickly post tidbits and maybe pics related to Fa'el without too much hassle.
The first thing that came to mind was to use just a plain html file and update it as new stuff was added. A quick and dirty solution but, just dealing with html tags to define each paragraph, is a great determent to keep the blog updated (I'm very lazy).
To keep the story short: I compromised on just a little bit more of complexity. I keep the blog posts on text files in a folder with an special naming scheme, and with a couple of templates I wrote, a bash script consisting mainly of sed invocations puts everything together to generate the pages you are now reading.
It's not pretty. I'm even pretty sure that it shouldn't work but somehow it does. So until it becomes an impediment for something I will probably keep using it. It takes care of sorting the posts, putting them together using the html+css templates, adding paragraph tags to each paragraph, and also does some basic substitution to easily embed pictures and files into the posts.
It's inflexible and not useful in general, but anyway I'm putting it for download in case it piqued someone's curiosity of seeing a quoting mess of bash script.