http://i.imgur.com/pkZhTCJ.jpg
The screens are positioned correctly next to each other.
----
Are you writing this in assembly?!
I'd love to hear more about this if anybody knows and feels like telling about it...
https://github.com/BonsaiDen/Tuff.gb/blob/master/src/core/co...
Nice.
I've got some rough sketches for the final world as well as the powerup placement, since there are no text boxes in the game, everything will be explained through level design or other hints like enemies or neutral creatures performing certain maneuvers for the player to imitate.
The GBA actually has a 32 bit ARM CPU, although a very slow one (16 Mhz) so perhaps it would be possible to build a very minimal Ruby VM for that. I wonder if it would be possible to optimize by building a JIT compiler and JITing on an emulator before installing on the cartridge?
The people who might be able to and the people who would want to do so are mutually exclusive groups.
if the latter three, why not write in those languages and use an API to interface to the drivers for those peripherals?
I submit this bug: https://code.google.com/p/chromium/issues/detail?id=403907&t...
Funny, the sound became all 8-bit like, so it fitted the game quite nicely. :)
I'll also submit the above as a comment on the bug report.
In addition to that, getting the compiler up to speed (takes < 90ms on my old core i5) was a nice exercise in getting more familiar with v8's performance analysis tools :)
Ah, a feeling many of us know too well.
(emphasis mine) IANAL, but my understanding is that at least in the US, it is the expression of the idea (the software and code, the graphics, and the other things mentioned on that line) that are subject to copyright, not the idea. See https://en.wikipedia.org/wiki/Idea-expression_divide.
[1] - http://nifflas.ni2.se/
- http://gameboy.mongenel.com/dmg/gbspec.txt (html version http://problemkaputt.de/pandocs.htm#soundcontroller ) - http://www.otakunozoku.com/nintendo-gameboy-cribsheet/ - http://realboyemulator.files.wordpress.com/2013/01/gbcpuman.... - http://students.washington.edu/fidelp/galp/megaguides/GameBo... (The original Manual)
There are more, but I can't seem to find the links right now :O
You can also grab the RGASM project from the OtakuNoZoku website. I think Carsten (Surfsmurf) may have revived it on his github. I think I also pushed my source trees to github too. There is a GBC emulator that is both a COM component, and works inside of Visual Studio (at least, VS from around year 2000). Bunch of docs too kicking around. I have copies of most of them still.
I wrote programmer docs, assembler (before switching to extending RGBASM), linker, patcher, emulators, games, visual studio plugins, debugger, cartridge downloader, serial port driver, bunch of libraries, etc. Ah... the good old days.
Here's a picture of the whole world for reference: https://dl.dropboxusercontent.com/u/2332843/tuff.map.png
I am very interested in this type of work and have been hacking at trying to build a game for the SNES. All I've been able to do so far is to collect all relevant documentation for developing it: https://github.com/bttf/snes_dev
I'll start with the graphics part, since that's the easier part of the two.
Since the original GameBoy has only 4 shades of gray, all "bitmaps" are 2 bits per pixel so you can squeeze a total of 4 pixels into 1 byte, the graphics are converted from PNG files via some JavaScript routines which can be found in the convert.js file in the repository.
The GameBoy uses 8x8 pixel hardware tiles on a scrollable "background" and supports up to 40 sprites which can be either 8x8 or 8x16 pixels in size.
There are 2 tile buffers in VRAM which partly overlap and only the lower one can be used for sprites, which gives you 128, 8x8 tiles for use with sprites and 256 for use with backgrounds.
Sprites can be mirrored, so this somewhat reduces the amount of graphics needed for the player character.
In order to reduce the map data, each room uses 80 16x16 blocks which are served from a meta table in memory, where each index maps to 4 8x8 tile definitions of the block. When drawing the screen the code resolves the individual 8x8 tiles and sets their value into the current VRAM buffer for the screen (there are two, which are swapped, to minimize draw artefacts).
Since the meta table is limited to 256 16x16 blocks too (due to the fact that the map format only uses 1 byte per block tile) there is some additional pre-computation magic going on when creating the map data. Basically, the block tiles are split into 4 x 8 rows, each screen then maps onto 4 of these "rows". By then packing often uses block tiles together, you can have more details for certain rooms since they don't need to use all of the different rows available and can basically swap some of them out.
Also, all graphics and map data are additionally compressed with a custom LT Type compression routing and are decompressed on the fly. Except for player graphics, which are stored into a RAM buffer at start in order to avoid graphic glichtes when switching out the sprite tile reference indexes and the graphics at the same time.
Overall, the timing is really important since you don't have too much time during the VBlank period (yes, it emulates a vblank!)
Now as for the sound, right now I'm really just setting the sound channel register values pretty much "Per hand", meaning, that I pick some decent values (tested in some GBA sound test ROM for gameboy sound channels I found somehwere - yes the GBA still has the original GameBoys 4 channels, since it's backwards compatible).
The sound data is stored in some kind of JSON format for easier editing, all the bit field stuff is than generated at compile time and baked into the ROM.
I've also gotten a prototype of a music engine running (not yet in the repository) where you'd play pre-defined sound "patterns" on virtual channels and "mix" them down. The sound / music stuff really is a whole story of its own, especially since there are nearly no references to find, except for some old, undocumented ASM sources of some Rare Ware GameBoy ports of Banjo / Jet Force Gemini which apparently got uploaded by one of the Sound Engineers at Rare.
-----
really cool and impressive that you developed an published a game on such a platform, that's still easily playable via a browser
I got stuck really early on, oops: http://i.imgur.com/pqAblgU.png
When the bunny dies , there is a sound for its micro-explosion. I remember "Dangerous Dave" died with the same sound :) Are a lot of these interchangeably used ? Are these just system sounds ? How do these work ?
That's true, but I'm really trying to shake it off! And looking for contributors, should you be interested :)
I really like your project page as well, very concise, extremely informative, and covers exactly the things that someone wanting to make their own would need. Bookmarked!