Author Topic: OpenTTD on the Dingoo  (Read 11923 times)

joepie91 (OP)

  • Posts: 179
OpenTTD on the Dingoo
« on: October 20, 2009, 02:54:34 pm »
Someone already posted a topic about this on the TTDForums, asking if someone could make an OpenTTD port for the Dingoo A320. I'm not going to ask anyone to do it, I might just try it myself when I get a little better at C++ (which I currently suck at), but my question is: would it be realistically possible? I read somewhere that if Dingux has SDL, it would be easy to port it, but of course there is no mouse, so that means you should be able to control the mouse with the D-pad or something. I don't even know if Dingux has SDL.

Well, in short, would it ever be possible to port OpenTTD to the Dingoo?

eule

  • * Former Staff
  • Posts: 889
Re: OpenTTD on the Dingoo
« Reply #1 on: October 20, 2009, 03:57:45 pm »
SDL is available. :)
If you should really try it, you?d be my personal hero. ;D I just love this game, dunno if it?s good at 320x240 though.

Yongary

  • Guest
Re: OpenTTD on the Dingoo
« Reply #2 on: October 20, 2009, 10:58:55 pm »
There's a GP2X  port (http://wiki.gp2x.org/wiki/OpenTTD), so I'd say that it's probably possible to control with a D-pad.

BTW, is there any way to add text to a hyperlink?

trooper

  • Guest
Re: OpenTTD on the Dingoo
« Reply #3 on: October 21, 2009, 05:22:09 am »
There's a GP2X  port (http://wiki.gp2x.org/wiki/OpenTTD), so I'd say that it's probably possible to control with a D-pad.

BTW, is there any way to add text to a hyperlink?


Yes, Edit the hyper link so it looks like this:

Code: [Select]
[url=http://wiki.gp2x.org/wiki/OpenTTD]MY TEXT HERE[/url]
Looks like this ?
                     V
MY TEXT HERE

Trooper

Kronus

  • * Former Staff
  • Posts: 160
Re: OpenTTD on the Dingoo
« Reply #4 on: October 21, 2009, 10:23:34 am »
Well, I must say this will be a darn good idea, but as just eule says if it's if it?s good at 320x240 though, but if there is a GP2X port already then someone should really work on this. There's nothing bad about using the D-pad as an alternative mouse cursor.

 :)
"I'm happy to serve the Dingoo Community!"

zear

  • * Moderator
  • Posts: 2381
Re: OpenTTD on the Dingoo
« Reply #5 on: October 21, 2009, 10:33:33 am »
Having experience with the gp2x version, I must say, that 320x240 is totally UNplayable. The view area is just too small to enojy the game. And with game windows taking almost the whole screen it's even harder to play.
But that doesn't of course mean I don't want that game to be ported :) I'd like to see it running on the dingoo. Just saying it won't be THAT playable.
Anyway, good luck porting it :)

joepie91 (OP)

  • Posts: 179
Re: OpenTTD on the Dingoo
« Reply #6 on: October 21, 2009, 11:21:01 am »
Having experience with the gp2x version, I must say, that 320x240 is totally UNplayable. The view area is just too small to enojy the game. And with game windows taking almost the whole screen it's even harder to play.
But that doesn't of course mean I don't want that game to be ported :) I'd like to see it running on the dingoo. Just saying it won't be THAT playable.
Anyway, good luck porting it :)
Well, it seems to play well enough on the Nintendo DS (which has a lower resolution than the Dingoo A320, actually), if you look at the screen size only. But the DS version has modified (smaller) toolbars etc. and a button to move a window from one to the other screen. Maybe something similar can be implemented in OpenTTD (for example, pressing R makes the windows invisible or something, and pressing R again makes them visible again). Also, the A320 sure has a HUGE advantage on the Nintendo DS regarding processor speed and memory.

Kronus

  • * Former Staff
  • Posts: 160
Re: OpenTTD on the Dingoo
« Reply #7 on: October 27, 2009, 09:48:41 am »
Trust me, it will be playable.

 ;)
"I'm happy to serve the Dingoo Community!"

Brasaral

  • Guest
Re: OpenTTD on the Dingoo
« Reply #8 on: January 08, 2011, 06:46:14 pm »
It is possible. I have been playing with OpenTTD on Dingoo recently and have it compiled (that is fairly easy). I have even started a game and built a train station and a vehicle depot :)
But there is one problem, OpenTTD uses 8bit per pixel graphics, or 32bit and Dingoo uses 16bit, so the colors were all wrong and only the left half of the screen was used (with 8bit). Probably writing a 16bit blitter for OpenTTD would help.

zear

  • * Moderator
  • Posts: 2381
Re: OpenTTD on the Dingoo
« Reply #9 on: January 08, 2011, 07:03:54 pm »
It is possible. I have been playing with OpenTTD on Dingoo recently and have it compiled (that is fairly easy). I have even started a game and built a train station and a vehicle depot :)
But there is one problem, OpenTTD uses 8bit per pixel graphics, or 32bit and Dingoo uses 16bit, so the colors were all wrong and only the left half of the screen was used (with 8bit). Probably writing a 16bit blitter for OpenTTD would help.
Try a newer rootfs, dingoo can handle 8 and 32 bit graphics already.
« Last Edit: January 08, 2011, 11:26:33 pm by zear »

Brasaral

  • Guest
Re: OpenTTD on the Dingoo
« Reply #10 on: January 08, 2011, 10:52:42 pm »
Thank you zear, now the graphics work as charm in 32bit! It looks nice. Few chages to the controls and it should be playable :)
Even 512x512 map works.

mrkingoo

  • Posts: 258
Re: OpenTTD on the Dingoo
« Reply #11 on: January 09, 2011, 07:42:44 am »
Nice work. OpenTTD would be a great addition to the Dingoo library

Brasaral

  • Guest
Re: OpenTTD on the Dingoo
« Reply #12 on: January 18, 2011, 11:18:00 am »
Well, I've been playing with it some more. It is true that at 320x240 it is almost unplayable. Almost all of the windows take up the entire screen and some are even larger (Main menu, Financial report, Settings, etc.). So, I've set the resolution to 640x480 and then resampled the output to 320x240 using simple averaging of the four pixels into one. This makes all texts unreadable, but that can be circumvented by using a larger font (this also enlarges the windows).
It works quite fast and with a few optimizations, it will be even better. Now I am trying some fonts to find the best one. Darker text colors also look better, so maybe changing the white/yellow text into blue/black will do. Also I'm working on the controls, but soon it will be playable.
Some screenshots of the game, but it looks much better on a Dingoo display:


EDIT:
Nevermind, I forgot to turn on antialiasing of the text. It looks MUCH better now.
« Last Edit: January 18, 2011, 11:36:31 am by Brasaral »

mrkingoo

  • Posts: 258
Re: OpenTTD on the Dingoo
« Reply #13 on: January 18, 2011, 01:11:21 pm »
Cool. Looking forward to trying it :)

campusten

  • Guest
Re: OpenTTD on the Dingoo
« Reply #14 on: January 19, 2011, 05:41:42 pm »
That looks great...definitely post it once you've finished with it.

flaming_goat

  • Guest
Re: OpenTTD on the Dingoo
« Reply #15 on: January 19, 2011, 06:50:39 pm »
I love this game ;D. Plz can u post a beta release so we can give it a go?

clach04

  • Posts: 256
Re: OpenTTD on the Dingoo
« Reply #16 on: January 20, 2011, 01:43:31 am »
Well, I've been playing with it some more. It is true that at 320x240 it is almost unplayable. Almost all of the windows take up the entire screen and some are even larger (Main menu, Financial report, Settings, etc.). So, I've set the resolution to 640x480 and then resampled the output to 320x240 using simple averaging of the four pixels into one.

Screen shots look very nice! :)

You may be interested in the post below for another full screen scalar that does a decent job too (and is fairly fast). It is by nigel and was used for Aleph One.

http://boards.dingoonity.org/dingux-games-and-homebrew/aleph-one/msg23418/#msg23418


pcercuei

  • Posts: 1689
    • My devblog
Re: OpenTTD on the Dingoo
« Reply #17 on: January 20, 2011, 07:35:21 am »
Nigel's scaler is interesting in case you have some small text. If you have a rather big font, you could just use the "keep 1 drop 3" approach; it would be at least three times faster and look as good.

Brasaral

  • Guest
Re: OpenTTD on the Dingoo
« Reply #18 on: January 20, 2011, 09:40:08 am »
I do it the same way as nigel, only in 32bit and for each color separately. (Sum all four nieghbouring pixels and shift right by two). It runs at about 15fps even if I redraw the whole screen every time, but fortunately Openttd uses the dirty rectangle method, so I recompute only the parts that have changed. This makes the game lightning-fast. Selecting only one of the four pixels looks terrible. I hope that I will have time to release today, but don't know when I will get home from work...

Brasaral

  • Guest
Re: OpenTTD on the Dingoo
« Reply #19 on: January 20, 2011, 09:50:52 am »
It is tricky with the fonts. The best way would be to have fonts where every pixel is actually a quad of pixels. Like "A" would be
Code: [Select]
OOOOOOXXOOOOOOOO
OOOOOOXXOOOOOOOO
OOOOXXOOXXOOOOOO
OOOOXXOOXXOOOOOO
OOXXOOOOOOXXOOOO
OOXXOOOOOOXXOOOO
OOXXXXXXXXXXXOOOO
OOXXXXXXXXXXXOOOO
OOXXOOOOOOXXOOOO
OOXXOOOOOOXXOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOO
If positioned to even x and y positions, those would scale down nicely. But I don't think that I have the time to redraw the whole charset :)
So I will stick to the truetype fonts, those have to be a little larger to be nicely readable (and antialiased), but it works.
« Last Edit: January 20, 2011, 09:58:06 am by Brasaral »

 

Post a new topic
Post a new topic