ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sun Aug 20, 2017 5:19 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: ToME 2.x running on Qt
PostPosted: Tue Dec 17, 2013 7:41 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 480
OK, so after a weekend of hacking, here's a screenshot of ToME 2.x running on top of Qt 5.x. Many things don't really work yet:
  • keyboard input is sketchy; no arrow keys yet (which means it's not really playable, so I think this is probably highest priority)
  • no colors yet, but that should be pretty trivial to get working
  • the intro animation goes by way too fast, so you don't actually really notice it. I think this is due to the way the game engine just blasts updates at the front-end without really waiting properly for the updates to show. It's not really a big deal for now, but it could mean that the in-game animated projectiles don't work properly (don't know yet as I can't actually play without arrow keys!)
  • almost all of the code is one giant hack

I don't see any of the above as huge obstactles, just things that will take a little time.

What is working very satisfactorily and which wasn't in previous attempts at new GUI ports (SDL 2.x, SFML, Allegro) is speed. A really dumb Qt Scene Graph with 80x24 QSimpleTextGraphicsItem instances seems to be performing really well with basically no optimization effort on my part, so that's a very positive sign.

I'm not sure yet, but I may end up having to remove all(!) other frontends and integrate this slightly closer with the game engine to get it working really well. I don't think it'll be any great loss since the Qt-based frontend should perform vastly better than the X11 front end and support multiple desktop windows (unlike the SDL one). And Qt is cross-platform and so should work perfectly on both Mac OS and Windows. (Compiling on Windows, I don't know about, but presumably people are managing to compile Qt Apps on Windows, so...) The only current frontend which cannot be replaced with a Qt-based one is the Curses one. I'm not sure anyone cares about that.

As usual I can't really put any deadlines on when this will be done, but watch this space...


Attachments:
snapshot1.png
snapshot1.png [ 35.11 KiB | Viewed 1387 times ]
Top
 Profile  
 
PostPosted: Tue Dec 17, 2013 8:02 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 480
Oh, and as you can see the font is rendered pretty weirdly -- a symptom of me not really knowing my way around QFont. I just asked it to load "Terminus" and hardcoded some glyph heights/widths because I don't know how to query them from the font itself :).


Last edited by AnonymousHero on Tue Dec 17, 2013 8:22 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Dec 17, 2013 8:21 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 480
... and now a little more colourful! :)


Attachments:
snapshot2.png
snapshot2.png [ 17.02 KiB | Viewed 1374 times ]
Top
 Profile  
 
PostPosted: Tue Dec 17, 2013 8:30 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 480
... and the intro animation now works properly.


Top
 Profile  
 
PostPosted: Mon Dec 23, 2013 9:45 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 480
... and now Arrow keys are working properly! Took a while figure out the completely insane pref system, but I think I got it now...


Top
 Profile  
 
PostPosted: Tue Dec 24, 2013 6:59 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 702
And in time for Christmas too! :mrgreen: Thanks for putting in the effort on this, the T2 code base was a Byzantine horror.

_________________
"These aren't the hobbits you're looking for."


Top
 Profile  
 
PostPosted: Wed Dec 25, 2013 4:17 am 
Offline
Reaper

Joined: Sun Jan 26, 2003 11:49 pm
Posts: 1714
Location: West Virginia
Cool!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group