Page 1 of 26

Nintendo DS port (Alpha 6)

Posted: 13 Dec 2007 14:45
by dominik81
More info about the Nintendo DS port, including a rough roadmap can be found in the OpenTTD Wiki.

The current version of OpenTTD DS is Alpha 6.

Changelog for Alpha 6:
  • based on r12452 (internal rev1926)
  • the NDS port now has a different toolbar, more suitable for the small screen
  • for better access with the touchscreen the toolbars have been moved to the bottom screen
  • a fully customizable on-screen keyboard has been added (click on a text field to open it)
  • a newsticker display on the lower screen has been added
  • some windows have been adapted for the NDS screen (more will follow in future releases):
    • intro menu
    • game creation menu
    • minimap
    • build vehicle window
  • when building depots and stations only one preview image is shown which you can rotate by clicking on it
  • information regarding accepted cargo when building a station is displayed as icons now
  • switching screens (left shoulder button L) now only switches the windows
  • many windows (e.g. confirmation dialogs) are now centered on the bottom screen
  • the amount of free ram (in kb) is displayed in the middle of the status bar. This is only a temporary change to help with tracking down a memory leak
  • additionally you can view some memory information by pressing the B button
  • always use new global pathfinder (NPF). the original TTD pathfinder crashes due to too many recursions
  • fixed loading screen glitch
Known bugs:
  • random crashes when the game runs out of memory
  • graphical glitches (mostly during scrolling) because the nds blitter needs to be rewritten
  • minimap glitches
  • trying to create maps bigger than 256x128 crashes
  • the screen resolution is too small making it impossible to click some windows
Please report any bugs that are not mentioned in this list.

Current screenshots:
Image Image Image

A note to anyone looking at the source code: I didn't clean it up this time. :D And lots of things regarding GUI are hacked into it until I have time to redo it properly.

Re: Nintendo DS port

Posted: 13 Dec 2007 14:57
by belugas
Welcome back dominik81 :)
It sure does look like a very interesting project.

Re: Nintendo DS port

Posted: 13 Dec 2007 18:08
by Wolf01
O M G O_O

you are the MAN
are you planning to return an active OTTD developer?

can you enable swapping or use the cards memory? i use the SuperCard Lite, which have, if i'm not wrong, 32MB of ram
about the interface, why not use the top screen?

Re: Nintendo DS port

Posted: 13 Dec 2007 18:43
by Bilbo
Nice!
Well, now many controls are changed to be compatible even with low (= ~320x200) resolutions, so I am not sure whether is is good to make a complete fork-off.
Optimal way would be to put all the memory-hungry things to be sized according to some constant (like it is with MAX_SCREEN_WIDTH = 2048 now) and for some memory-limited devices you'll just produce version with these constants appropriately lowered. So perhaps put in few patches to similarly "constantize" these thing, so people attempting to port to another device, but similarly memory limited would have easier start.

Although some function (like screenshot) could be probably left out due to limited capabilities of the device.

Re: Nintendo DS port

Posted: 13 Dec 2007 19:04
by Aydan
conditional compiling any one?
You have to compile it for the ARM processor anyway so you could "just" put everything you don't need or change for the DS into compile time conditionals. I know it's not that easy but you wouldn't need to fork off.

Re: Nintendo DS port

Posted: 13 Dec 2007 20:38
by AntBUK
Dual screen implementation needed I think.

The bottom screen could hold all the interface (and a switch screens button obviously) which would free up some room on the top screen and give a better view of what was going off. Switch screens whenever we need to interact with the "world" using whatever tools we have selected at the time.

You thought about adding an option to use a RAM expansion like the one that comes with the Opera browser?

Re: Nintendo DS port

Posted: 13 Dec 2007 22:35
by Rubidium
First of all, getting this far is already a great job, but... I do not think that creating a fork will be benificial for either version of OpenTTD.

In my opinion there can be enough room in OpenTTD to make a compile time configuration option for low memory/small binary size. Also making the current windows useable at very low resolutions is something that I've been working on every now and then in OpenTTD myself to 'aid' people who want to port it to a small device, such as a Nintendo DS or a Windows Mobile or a Symbian. However, the primary reason for not doing the branch is that it becomes easier for other porters to use 'just' standard trunk with 'low memory' mode for their small devices instead of a (maybe) outdated version of the DS port. It will furthermore make keeping the DS port synced with main OpenTTD version much simpler as all kinds of API changes will be done for you by the people who are performing the changes. On the other hand it means that every once in a while someone has to compile a DS binary and test whether it still uses few enough memory.

Another thing that I have seen is that a lot of branches/forks get into big trouble syncing when they changes are scattered around and small.

Re: Nintendo DS port

Posted: 18 Dec 2007 18:59
by Ploes
Zelda and Thrilvill both have points in the game where you need to switch the content's of the top and bottom screens since you catch touch the top screen.

<Enter the quick jobby I did in paint to explain this better than I can with words>

I'd love to see this port become playable. :)

Keep up the wonderful work.

Re: Nintendo DS port

Posted: 18 Dec 2007 19:11
by Slye_Fox
the DS version of The Settlers (which is actuly The Settlers II: Venni Venci Vendi) uses the right sholder button to swtch between screens.

Re: Nintendo DS port

Posted: 18 Dec 2007 21:33
by bobulator
Maybe, instead of using the standard icons it could be a good idea to use smaller icons (~20px) to save space on the screen.
Also, the menus could be re-laid in order to save space.

Re: Nintendo DS port

Posted: 18 Dec 2007 22:04
by Bilbo
Standard icons are 22x22 px large, so smaller icons than 20x20 would be needed, perhaps something like 12x12 px ...

Re: Nintendo DS port

Posted: 19 Dec 2007 14:42
by bobulator
I tried making a test icon (this one is the save-game button) in GIMP at 16x16 resolution.
Is this OK?

Re: Nintendo DS port

Posted: 19 Dec 2007 14:56
by Slye_Fox
What about this one?

Re: Nintendo DS port

Posted: 19 Dec 2007 15:57
by bobulator
Yeah, niiice.

Way better than my one!

I tried resizing the titlebar.
This one is at 16px

Re: Nintendo DS port

Posted: 19 Dec 2007 16:00
by Slye_Fox
That's what i'm doing,
but after the resize, i'm redrawing them to remove the blur

Here's what i've got so far.
DSButtons.png
DSButtons.png (1.49 KiB) Viewed 86862 times

Re: Nintendo DS port

Posted: 19 Dec 2007 16:21
by mrMann
I would seriously like this, however I have no access to a copyable ROM for it.

Re: Nintendo DS port

Posted: 19 Dec 2007 18:14
by Slye_Fox
More buttons
DSButtons.png
DSButtons.png (3.4 KiB) Viewed 86772 times
All Finished
All Done
All Done
DSButtons.png (8.64 KiB) Viewed 86602 times

Re: Nintendo DS port

Posted: 20 Dec 2007 00:14
by athanasios
Well, the guy's face is good for toyland!
:lol:

Re: Nintendo DS port

Posted: 20 Dec 2007 01:23
by Gonozal_VIII
Fixed the poor guy's eyes...
edit: i thought some lines in the industry roof and in the zoom buttons were too blurry...

Re: Nintendo DS port

Posted: 20 Dec 2007 01:53
by Slye_Fox
That looks much better

<edit>
Yeah, the magnifying glases look better with out the glass efect from the bigger versions.

And the darker roof fits better too