Tuesday, August 11, 2009

A framework!

I don't like procedural programming at all. It's chaotic. So I have spent a bunch of free hours to encapsulate some libnds' functions on a OO framework. I have thrown away something like 12 units full of spaghetti-code and now I have only 3 classes in an unit: TNDSApplication, TNDSScreen and TNDSBackground. I can attach backgrounds to screens and screens to application now, freeing things to release unused memory and switching from a screen to a completely different one in a single line of code :)

Thursday, August 6, 2009

Quick updates

Haven't worked on the entry at all, because a lot of work to do before my 15 days of vacations. However, I have solved some problems I had with VRAM overlapping, but I'm in stuck with sprites now. I hope I'll be able to fix the sprite handling code in this week-end.

Sunday, July 19, 2009

Level editor

I have spent some time to make a simple level editor for Sweep. All levels will be hard-coded inside the game, because I can't waste time to arrange loading files from fat. More, my game will be tested by the judges with an emulator, and fat loading isn't emulated at all, As I have said, the editor is pretty simple and it do not check if a level is solvable or not. A screenshot will follow soon (soon?) :P

Friday, July 17, 2009

Done!



Font fixed ^_^

Little problems and new stuff

Small update :)
I have rewritten the console output unit and now it should be more flexible. Rewriting it, I have noticed a bug on the font's palette handling, that should be fixed now. In the meanwhile, in order to test the console unit, I have worked on the high scores unit. I have decided to arrange them as an "old school style" arcade (hey, it is an arcade compo, after all!), so there will be only 5 chars for the name and a max of 8 scores. The scores are arranged in an array of packed record and each record stores two fields:

type
TBestScore = record // 72 bits = 9 bytes
name: array [0..4] of char; // 5 * 8 = 40 bits
// 40 bits = 5 bytes
score: integer; // 32 bits = 4 bytes
end;

var
Scores: array [0..7] of TBestScore;
// 8*72 = 576 bits
// 576 bits = 72 bytes

The whole score tab takes 72 bytes, that fits nicely in 72/4=18 words longints. That's good, because the nds' architecture is more performing if operates on 4 byte aligned values.

I'm a bit unsatisfied about the font and I would like to change it, because it is unreadable when displayed over a colored background. A solution could be to make a black border around the chars, but we are talking about 8x8 pixels wide fonts and 1 pixel for the border is problematic to arrange nicely. I'm open to suggestions :)

Wednesday, July 15, 2009

First screen shots

Some progress here! Today I have to show some screenshots of Sweep.



The splash screen fades in and out, then the game starts and, just like an ol'school coin-op, it requires a quarter to play. Touching the hole on the coin box will increase the credits. I have spent alot of time making tiles, sprites and sound effects for the game (from the pics you can't hear the dling played when a coin is inserted :P), so i'm a bit late with the code... :/
Well, That's all for now ^_^

Monday, July 13, 2009

Pixel fonts

Just to give to my entry a more arcade-ish flavour, I'll use a pixel font (AKA bitmap font, or raster font) taken from arcade games:

http://bmf.wz.cz/
http://pinocchio.jk0.org/nes/8x8s.png
http://qtchicks.hp.infoseek.co.jp/fonts.html
http://orangetide.com/nesdev/gamefonts/

Just check these sites and you will find a font that fits your game for sure.
About copyright issues, I have found that, at least in the USA, typefaces are not copyrightable and scalable fonts are copyrightable. Because a pixel font is considered a typeface of a scalable font, then it is not copyrightable. More infos here.