Game Development Community

Porting Torque to "constrained" devices

by Manoel Neto · in Torque Game Engine · 03/01/2005 (1:17 pm) · 6 replies

I'd like to ask the GG staff, and anyone who got involved in porting Torque to other platforms, or who only happens to know too much o it's internals:

Woud it be feasible to port Torque to a device as constrained as, let's say, the Nintendo DS? Or would it be better to chew the SDK samples and hack something together from the ground up?

The DS, as example, gives you only 4MB of work RAM, and a total of 1MB of video RAM (split in many spetialized areas).

Since my bare-metal programming experience is moot, I would start creating a bare-core Torque, that would just output something to tell me it initialized OK under Windows, and keep building the DS platform layer, using the libraries provided with the SDK, until I got it to intialize OK in the DS itself. Then I would proceed to modify re-insert the classes and subsystems we need for the game, and keep expanding the platform layer to support them.

Since I haven't tinkered much with Torque's real guts, I'm totally uncertain how long that would take, and keep wondering if a quick (but almost un-reusable) hack would do better.

Performance is also a problem, and I am sure just using low poly models wouldn't be enough: probably all of the rendering and geometry processing code would need to be modifyed. I doubt TGE's terrain would be feasible on low-ram envronments.

I could also hack something together and make it somewhat Torque-friendly, so that it becomes easier to re-use Torque parts in it (it would be very nice if our art workflow could be kept the same: exporting DTS, DSQ and DIF files).

Any comments? Suggestions? Flames XD?

#1
03/01/2005 (1:23 pm)
Ah i love my DS, that would be cool to have torque on it but i dont think thats possible. The carts for DS can hold 256mb from what i understand. I sure hope Nintendo brings the DS online soon like they are hinting.
#2
03/01/2005 (1:28 pm)
Huh? DS "ROMs" can be 128MB in size. That far more than most downloadable games avaliable here in the GG site.

All I want to know is getting Torque to run on a device with such small RAM is worth the trouble.
#3
03/01/2005 (1:45 pm)
Check out extremeai.com
They are working on a scaled down Torque engine called Punk! that is supposed to do exactly what you want to do. There isn't much information about it yet but it sounds like very exciting stuff, if it ever gets off the ground.
#4
03/01/2005 (2:23 pm)
4MB of RAM? Man that would be rough. Anything is possible, but I really am not sure that, with 4mb of RAM, you would want to devote any of that to some of the things Torque does.

I guess it depends on what you are asking. Can a competent person / team get a Torque game on the Nintendo DS? Yes. Can we create a general-purpose version of Torque for the Nintendo DS...that is pretty up in the air.
#5
03/01/2005 (2:30 pm)
Im sure that when the DS comes out there will be many people like myself who mod the system with more RAM, faster clocks, etc. Big audience? Nope probably not worth developing for. Also remember that Nintendo carts can not only contain ROM, but also RAM, so you could have 128MB of RAM on a cart if you were so inclined, useless but possible. However, the access rate for cart RAM is slower than system RAM.

My honest opinion, if the DS follows in its predecessors tracks, your biggest concern will be system speed.

Also, you could theroretically have as much RAM as you can fit onto a cart, 256, 512, etc. with the proper memory management subroutines and cart hardware to multiplex RAM banks for access. Ive used methods similar to this for many a 8-bit system with a 64k addressing limit - to use RAM banks as large as 4GB. However, the more RAM you have, the more power you eat up to manage it in most cases.

And if youre really skippy about doing something like this, I can design/build carts with on-board MMUs that work with the DS CPU and your code, along with cart RAM/ROM banks. But you must remember that Nintendo would be (excuse my language) bitching (end excuse my language - very hateful of fees for hardware/software development) about licensing fees for a cart design. Also unless you plan to make carts in mass quantities its not worth the tooling expenses (a single board can cost $200 - 300 due to tooling costs, the cost per board drops dramatically with large quantities). In doing about 10 minutes or research about the guts of the DS, it may be more expense than its worth to do this. But I'm always open to making some cash, especially when it concerns hardware design and ASM programming.
#6
03/02/2005 (5:30 am)
@Pat

A general purpose version surely would be a PITA to do. Starting from a bare bones Torque core and then adding/re-creating the features required by each game sounds more reasonable.

What I'd like to know is how much RAM Torque would eat if it were stripped to the bare minimum core (all the TS, lighting Interior and Terrain stuff removed), capable of play showing a GUI and executing scripts.