I have been Experimenting with the Audio Context web API as of late. It lets you create sounds in JavaScript programs using sound wave primitives. This combined with a basic piano keyboard layout means I have made a pretty basic synthesizer.
Friday, 29 April 2016
Saturday, 23 April 2016
Just Bloggin'
Bit of a humdrum week here. Got started on an entry for Ludum Dare last weekend; created a sound system and a particle system. Both neat things to add to future projects. Couldn't really get into creating a game there and then. The theme: Shapeshift was neat and I saw some people create some really nice games with it, I just didn't have the energy and motivation to work on all the other parts of a game once I finished the engine :/
I miss being able to work in a group on a programming project and let people work to their strengths. I love getting stuck into low level code but am not that enthused with asset creation. Hence the whole fascination with procedural content generation :P I suppose I'll have to look for a group of like-minded individuals to work with for better luck in the future.
Pictured, faaar too many particles to be able to run efficiently in anyone's browser. Quite pretty tho'
I miss being able to work in a group on a programming project and let people work to their strengths. I love getting stuck into low level code but am not that enthused with asset creation. Hence the whole fascination with procedural content generation :P I suppose I'll have to look for a group of like-minded individuals to work with for better luck in the future.
Pictured, faaar too many particles to be able to run efficiently in anyone's browser. Quite pretty tho'
Friday, 15 April 2016
Ludum Dare 35
Tomorrow the 35th Ludum Dare will be taking place. Seeing as I didn't get too far with the last one I've decided to keep things small and manageable this time. I've got some neat sound generation code that I would like to make into a simple interactive demo. Won't know for certain what the theme is until tomorrow; the voting rounds so far make me suspect the theme will be Shapeshift. :)
Sunday, 10 April 2016
Procedural Pokedex
I believe I mentioned this project some weeks ago and a recent foray into Cascading Style Sheets seemed like a good time to pretty this project up in order to post it. I have mixed feelings about using CSS to do styling. Sure it is going to work correctly on more browsers and is probably more efficient but I enjoy doing everything with JavaScript; that way I can pretend to be coding a native executable instead of a web app :P
Friday, 1 April 2016
Gameboy Tileset Viewer
Continuing on from my experiment last week to load and display the byte values of binary data as coloured dots, this week I've created a picture viewer. My dataset of choice continues to be from the Pokemon Blue Gameboy cartridge. Mostly for nostalgia's sake and also because at less than a Megabyte in size there is a chance to get an overview of it in its entirety onscreen at once.
The original gameboy had a black and white screen which could display 4 colours; black, dark grey, light grey and white. (Although due to the LCD used they tended to be a bit greenish. This meant a pixel's colour could be defined by 2 bits. The Gameboy used a tiling method to display images with each tile composed of 8 by 8 pixels. Essentially this means each tile is 16 bytes in memory. (for a more in depth description see here )
It took me a while to get my JavaScript code to view each part of the input data as being 8-bits but once I got it to stop defaulting to 16-bit it was easy to iterate over an entire bank of the cartridge to get this:
On the left is a rough overview of the 25th, 16KB block of rom. On the right is that same binary data converted into Gameboy tiles. It's so cool to see recognizable tiles from the game! There are grass, flower and tree tiles. Some tiles used for interiors, even the entire ship the SS Anne : 3
What really intrigues me is the tiles which stand out as being identifiable as real tile data, as opposed to some other kind of binary data are visible within the overview on the left. Generally tile data is higher byte values, hence lighter. I expect you could do some neat statistical analysis to automate identification of tile data.
Anyway I'll continue my foray into nostalgia driven disassembly; I've had a look for text encodings and have tried to work out the basic formatting and scripting functions which Pokemon Blue had. ie. printing the players name, playing 'item get' noises and clearing the textbox. Perhaps more usefully I've been looking at the instruction set of the Gameboy's processor, the Z80 (or some variation) I might end up decompiling machine code into actual assembly! :D
The original gameboy had a black and white screen which could display 4 colours; black, dark grey, light grey and white. (Although due to the LCD used they tended to be a bit greenish. This meant a pixel's colour could be defined by 2 bits. The Gameboy used a tiling method to display images with each tile composed of 8 by 8 pixels. Essentially this means each tile is 16 bytes in memory. (for a more in depth description see here )
It took me a while to get my JavaScript code to view each part of the input data as being 8-bits but once I got it to stop defaulting to 16-bit it was easy to iterate over an entire bank of the cartridge to get this:
On the left is a rough overview of the 25th, 16KB block of rom. On the right is that same binary data converted into Gameboy tiles. It's so cool to see recognizable tiles from the game! There are grass, flower and tree tiles. Some tiles used for interiors, even the entire ship the SS Anne : 3
What really intrigues me is the tiles which stand out as being identifiable as real tile data, as opposed to some other kind of binary data are visible within the overview on the left. Generally tile data is higher byte values, hence lighter. I expect you could do some neat statistical analysis to automate identification of tile data.
Anyway I'll continue my foray into nostalgia driven disassembly; I've had a look for text encodings and have tried to work out the basic formatting and scripting functions which Pokemon Blue had. ie. printing the players name, playing 'item get' noises and clearing the textbox. Perhaps more usefully I've been looking at the instruction set of the Gameboy's processor, the Z80 (or some variation) I might end up decompiling machine code into actual assembly! :D
Friday, 25 March 2016
Binary Visualiser
Inspired by the Binary Visualiser explained and demo'ed at the other end of that link I messed around making a quick version myself:

In the above image blue denotes text byte values, green any other positive byte values and black zero. I will leave what the file could be up to your imagination :P (not that the whole file's data is visualised here, only about half) This particular file exhibits some interesting striping and the last quarter of the file is mainly text.
I doubt this will be of much interest to people who aren't as fascinated by data visualisation as I am. Ideally I would find a way to divide a binary executable into likely; logic, audio, graphical and text data. This topic would probably descend into disassembly though, which is sadly a bit of a legal grey area :/ A pity as it is wonderful to see computer code at the level of bits and bytes.

In the above image blue denotes text byte values, green any other positive byte values and black zero. I will leave what the file could be up to your imagination :P (not that the whole file's data is visualised here, only about half) This particular file exhibits some interesting striping and the last quarter of the file is mainly text.
I doubt this will be of much interest to people who aren't as fascinated by data visualisation as I am. Ideally I would find a way to divide a binary executable into likely; logic, audio, graphical and text data. This topic would probably descend into disassembly though, which is sadly a bit of a legal grey area :/ A pity as it is wonderful to see computer code at the level of bits and bytes.
Friday, 18 March 2016
RPG Maker and Pokemon
Hobby-project wise I spent some time exploring RPG maker VX Ace (goodness what a mouthful of a name) It has a good organisation of the different resources that make up a game; tilesets, sprites, sound, animations etc. The default resources are pretty generic but you could add your own content and use the Ruby scripting engine to create a complex game with it.
Currently I've been studying the data which made up the very first Pokemon games, they hold a special place in my heart due to being the very first gameboy games I owned. It is impressive how much fitted onto half a Megabyte of memory! Many people have developed resources to make Pokemon-like games with RPG Maker so I've been giving them a look.
If I do end up making a monster catching game it will of course have to involve procedural generation :P Pokemon Randomizers are available for practically all the official games; changing the location and stats of all the Pokemon. I don't know of any fangames which create completely random monsters or maps though.
Alas the little script I wrote to make a completely random Pokedex isn't polished enough to post :/ Too much time spent doing productive coding and reading clearly!
Currently I've been studying the data which made up the very first Pokemon games, they hold a special place in my heart due to being the very first gameboy games I owned. It is impressive how much fitted onto half a Megabyte of memory! Many people have developed resources to make Pokemon-like games with RPG Maker so I've been giving them a look.
If I do end up making a monster catching game it will of course have to involve procedural generation :P Pokemon Randomizers are available for practically all the official games; changing the location and stats of all the Pokemon. I don't know of any fangames which create completely random monsters or maps though.
Alas the little script I wrote to make a completely random Pokedex isn't polished enough to post :/ Too much time spent doing productive coding and reading clearly!
Subscribe to:
Posts (Atom)


