PDA

View Full Version : New Video Game: Confusion



mhoover
5th July 2009, 20:59
The release candidate for Confusion is now available for Windows and OS X:

You can download the game at:

http://www.confusionthegame.com/downloads.html

I am very grateful to the folks here who fielded my questions and helped me get this going.

Please post any suggestions or comments you have. I hope you all enjoy it!

mhoover
5th July 2009, 21:07
A couple things I learned about deploying an application:

1) The design part is very easy (and fun) compared to the work involved in actually implementing it. Qt makes this about as painless as it can be, but I've used it for four years and it was still a lot of work!

2) In making a video game, it's very common to spend more time on resources than on source code.

3) Deploying this video game took me about as much time as making it (website, porting it to the Mac version, etc.). Maybe it's a stretch to call porting part of "deployment".

4) Even a simple design and modest feature scope can require a lot of time and energy!

5) Porting to the Mac is not as painless as I thought. Designer layouts aren't exactly the same on both platforms. Containers were squished a little more on the Mac side. This didn't take long to correct, but my .ui files are forked between the two versions. It didn't take too long to do all the porting. The qt Mac deployment tool REALLY speeds things up. It would be great to have something like that on the PC side where it just grabs all the libraries and stores them together.

Lykurg
5th July 2009, 22:23
Please post any suggestions or comments you have.
I just had a quick look at your source, and I doubt if your main.cpp is really "part of the example classes of the Qt Toolkit";) Also inside your package there is a lack of any copyright informations. Tomorrow I may have a look at the game, but since I use Linux this might be a problem since all images are hardcoded and not included. Also using
QIcon(QPixmap("C:....")) is a little bit heavy since you could direct use
QIcon("C:....").

mhoover
6th July 2009, 02:46
Thanks for pointing that out, Lykurg.

I will try to put the images in the source code tarball soon.

I suppose I should put the copyright info right in the package, but it's hard for me to see how to do that since the qttomac deployment tool puts the application right into the .dmg file.

The Windows installer puts the terms in there.

The Windows path is absolute / hardcoded because my installer (Inno setup) said applications on the Windows side can be started from anywhere and that becomes the path (so you have to hard code it). Not sure if that's true, but I couldn't find any other way around that.

Also, thanks for the QIcon / QPixmap tip.

nish
6th July 2009, 04:20
The Windows path is absolute / hardcoded because my installer (Inno setup) said applications on the Windows side can be started from anywhere and that becomes the path (so you have to hard code it). Not sure if that's true, but I couldn't find any other way around that.


thats why you should not hardcode paths..

mhoover
6th July 2009, 08:14
thats why you should not hardcode paths..

This is something I don't understand very well, but I've tried several different approaches and been unable to use relative paths in a reliable way on Windows (I have on found a way to do it on OS X btw).

So let me ask ...

If someone starts up the application from a shortcut on the desktop and the incoming Application sees the current directory as C:/Documents and Settings/mhoover/Desktop instead of the place where the application is really installed, how can the application use relative path names to find resources?

nish
6th July 2009, 08:22
in qt you can use QCoreApplication::applicationFilePath (), so it will give you the exact location of the exe. you can build all your paths relative to this.

mhoover
6th July 2009, 09:05
Oh, QCoreApplication!? If only I had known about that. I thought everything was in QApplication.

You know how there's a qApp-> macro to get the QApplication? Is there something like that to get the QCoreApplication? I didn't see it in the docs.

mhoover
6th July 2009, 09:09
Hi Lykburg,

Thanks again for your suggestions.

I made the resource access path relative for the Mac version. I'll have to port this back to Windows at some point so they use they same code base, but I haven't done that yet (doesn't do anything for the user per se). Also, the images are in there now as well.

If you successfully port it over to Linux, could you send it to me so I can put it on the website? No worries, though, if you decide this is more trouble than it's worth ;)

The terms are now in the source code packages (not the old one, though, which is still accessible).

nish
6th July 2009, 09:55
Oh, QCoreApplication!? If only I had known about that. I thought everything was in QApplication.

You know how there's a qApp-> macro to get the QApplication? Is there something like that to get the QCoreApplication? I didn't see it in the docs.

oh man... u made a game in qt and still u ask a newbie question? or may be you are joking? anyways.. QApplication inherits QCoreApplication so the qApp will work.

SABROG
8th July 2009, 08:10
Hmm, strange game

http://img385.imageshack.us/img385/9525/confusion.png

mhoover
10th July 2009, 00:25
Thanks for trying it.

Games made by individual developers tend to be a bit ... eccentric. Like Darwinia, for example. GamePro recently had a small developers contest and the winners were all unusual.

In some ways it parallels music produced by large corporations compared to alternative bands who may not even have a label. The best musicians start out on the small alternative scene and get attention. As they get plucked up by record labels they're "encouraged" to broaden their audience and soon they get accused of "selling out". Of course a lot of bands make less than desirable music and never get any attention, and those people tend to end up with real lives instead of reality show lives.

Film works a lot like that also: compare the two George Lucas' trilogies.

mhoover
10th July 2009, 08:03
SABROG,

Interesting how the window bunches up like that.

What version of Windows were you using?


Also, I hope you don't mind that I posted your comment here (http://www.confusionthegame.com/blog.html).

mhoover
15th July 2009, 07:14
The XP/Vista bug where the windows are pushed up onto the card table is fixed.

mhoover
15th July 2009, 09:01
Confusion is now featured by Apple on it's downloads page!!!!!

http://www.apple.com/downloads/macosx/games/cards_puzzle/confusion.html

This is surely good for Nokia to have a Qt application on the Apple downloads page.

nish
15th July 2009, 09:03
how it ended up there? .. did apple found you or you told them?.. just curious..

Lykurg
15th July 2009, 10:43
@TheDeathInPerson:MrDeath: you can submit your apps.


This is surely good for Nokia to have a Qt application on the Apple downloads page.

I think there are some more apps that uses Qt and to be honest - even if it sounds very harsh - I don't know if your coding style and software architecture is such a big commendation for Qt. All looks like a very newbie approach and at this stage it is surely not good for Nokia. But keep on coding...

nish
15th July 2009, 10:47
@TheDeathInPerson:MrDeath: you can submit your apps.
thx for the info :)..
btw what did you ment by "@TheDeathInPerson:MrDeath:" ? :)




I think there are some more apps that uses Qt and to be honest - even if it sounds very harsh - I don't know if your coding style and software architecture is such a big commendation for Qt. All looks like a very newbie approach and at this stage it is surely not good for Nokia. But keep on coding...
common man.. dont be such harsh... its a big thing for anybody to create even a working application.. let him enjoy.. dont ruin his fun please...:)

mhoover
16th July 2009, 08:30
Hi Lykburg,

I didn't find your comment harsh (thanks anyway, MrDeath). Perhaps we are looking at it from different perspectives.

Let me put it this way: when you play a video game do you ask yourself questions about how the software is architected, which classes are called, or how the code is organized?

Perhaps you do, but I look more at things like surprise, irony, mystery, breaking out of the mold, the ability to indirectly communicate things.

It's definitely not Gears of War or Call of Duty, but I enjoyed making it more than the video games I've been playing lately.

Also, you've seen some of the dirty laundry in my code. I won't deny that it's there, but I'm trying to sell my coworkers on AGILE programming right now which means a few things to me: 1) Minimal designing 2) Document as you go and 3) Just start coding. There are messes along the way, but when I play video games I just don't care about that.

As for my newbie-ness, I think that is good for Nokia as well. If a newbie can get stuff out of Qt then it must be easy to work with, and I think that bodes well for Qt. I've hacked around with Qt for five years ... I was using the arcane QCanvas functions which got torn out, so sometimes it helps to stick with the basics like setText() and resize().

That's my perspective anyway, with apologies to Wittgenstein.

nish
16th July 2009, 10:17
yesterday i downloaded your installer.. i have one request..
please let me choose the path of install... my C: is nearly full and i dont install anything on that.. :)

mhoover
17th July 2009, 08:42
Thanks for the feedback/request.

Since you and Lykurg have both mentioned this I will try to do this over the weekend.

I've already done it on the Mac side, but I need to merge my code bases. Probably more info than you wanted to know.

I will post something when I'm done.

mhoover
20th July 2009, 08:34
Alright. The XP/Vista installer lets you decide where to install the game, and the game uses a relative path to find the resources.

The funny thing is I used the exact same qApp-> class before and it didn't work for some reason.

Glad it's working now.

You can download it here (http://www.confusionthegame.com/downloads.html).

nish
20th July 2009, 08:53
ok thanks..:).. you know this is the first time any developer has actually modified the software according to my request.. hehehehehe...feels good.

mhoover
22nd July 2009, 09:25
Well it's about time then ;)

Thanks for the feedback.

venusstephen
20th August 2010, 13:52
Really nice post. The information about video game is very useful. I find it very useful.
These information can be useful for developing video game application. I am sure this will like by most of people.:)