Wednesday, August 18, 2010

Programming stuff.

As my first post, I just want to briefly cover some topics related to our programming:

What do we have so far?

At a first look we have OpenGL rendering, with a 2D sprite layer for UI on the bottom screen. On the top screen we have a 2D Background with sprites layered ontop for a UI.

We have a background being drawn in the OpenGL layer, with a map infront of that. The units are able to path around the map.

What problems have we had working on the NDS?

Because I personally am handling all of the "engine" work, that is anything you see on the screen I have had to learn to work within the bounds of the NDS hardware, and the API that the community has right now.

That said, there haven't been so many problems but I have certainly had a learning curve coming into development on the NDS.

The biggest and most obvious difference between working on a similar project on a PC, is the limitations of the NDS hardware, the NDS has a tiny amount of memory available to use (4MB of system memory, and 656KB of video memory, where as a PC might have upwards of 1000MB available system memory, and 128MB+ video memory, depending on your target system)

What the memory limit really means is that we cannot simply go "OK lets add 50 1024x1024 32bit textures to our game" instead we have to have to carefully map our texture memory usage, and stream resources as much as possible.

Furthermore, I minimized our texture usage by using a 8bit texture format which uses 3bits for the alpha information, and 5bits for color - this is for the OpenGL layer, both me and Tom worked out how many colors he needed, and how many potential textures would be in use at once, the a3i5 format came up as the best possible solution while keeping within the bounds of memory.

Also, with these strict texture formats in mind, Tom has done a great job learning the correct pipeline and how to correctly set up textures, keeping my hands doing programming and not stuffing about fixing up artwork.

The NDS also does not have hardware floating point computation, which requires programmers to use fixed number math as much as humanly possible to maximize performance.

The NDS also doesn't come packaged with a i7 processor, so we have to be more careful about our algorithm efficiency than normal.

Enough of this anyway,

What else are you going to do from now?

- Animations
- Sound
- Networking!
- Dynamic UI field creation
- Debugging
- Testing

Anyway, I will post up another time with more information on the programming side of things.




No comments:

Post a Comment