ToME 2.x running on Qt

Everything about ToME 2.x.x. No spoilers, please

Moderator: Moderator

Post Reply
Message
Author
AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

ToME 2.x running on Qt

#1 Post by AnonymousHero »

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 6183 times

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2.x running on Qt

#2 Post by AnonymousHero »

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.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2.x running on Qt

#3 Post by AnonymousHero »

... and now a little more colourful! :)
Attachments
snapshot2.png
snapshot2.png (17.02 KiB) Viewed 6170 times

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2.x running on Qt

#4 Post by AnonymousHero »

... and the intro animation now works properly.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2.x running on Qt

#5 Post by AnonymousHero »

... and now Arrow keys are working properly! Took a while figure out the completely insane pref system, but I think I got it now...

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2.x running on Qt

#6 Post by Lord Estraven »

And in time for Christmas too! :mrgreen: Thanks for putting in the effort on this, the T2 code base was a Byzantine horror.

Yottle
Reaper
Posts: 1753
Joined: Sun Jan 26, 2003 11:49 pm
Location: West Virginia

Re: ToME 2.x running on Qt

#7 Post by Yottle »

Cool!

Post Reply