Commander Keen for iPhone (based on Commander Genius)

All discussion about the Commander Genius project (a Keen interpreter + more).
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Commander Keen for iPhone (based on Commander Genius)

Post by albert »

Heya,

I just ported Commander Genius to the iPhone.

It's the first version, so many things aren't perfect yet, also performance could be better, but it is playable.

The source can be seen here:
albertz's commandergenius at iphone - GitHub

I will soon upload a ZIP somewhere so you can try it out without needing to compile. This ZIP will work on jailbreaked iPhones/iPods only and I think minimum is iPhoneOS 2.2.1 and probably an 3GS because it isn't very well optimised yet.

Edit: Download it here:
https://sourceforge.net/projects/clonekeenplus/files/

Edit: You can also install it via Cydia. It has been added to the ModMyi repository (which is enabled by default in Cydia). Just search for Commander Genius and install. :)

This is the package page:
http://modmyi.com/cydia/package.php?id=14192

Edit: Here a video of me, playing CK in the iPhone simulator. :)

YouTube - Commander Keen 1 on iPhone / iPod
Last edited by albert on Sat Nov 21, 2009 10:44, edited 3 times in total.
pizza2004
Vortininja
Posts: 266
Joined: Wed Jul 08, 2009 1:22

Post by pizza2004 »

This is monumental! While it only works on the jailbreak for now, it should be possible to get it to comply with Apple's SDK agreement, and then we could try to get id to use our engine to release Keen on the iPhone! Two versions, lite which would only have episode 1 and 4 and the full version with episodes 1-5 (all that id can actually offer, the other two would probably never be legally available)!

Now, we must make sure to develop the control scheme just right or the game wouldn't be any good.
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Post by albert »

Afaik, ID doesn't have the (only?) rights on the old Keen episodes. (Read http://www.3drealms.com/keenhistory/ ) 3D Realms has, I think, at least they are selling the games. Not sure, didn't quite understand that situation, seems to me even themself don't really know who has which rights.

The current controls I implemented aren't that bad. I played already half through the episode 1 :). The current impl just maps several areas of the touchscreen to some keys / actions.

Some really important things need to be fixed though:

- In some menus, it waits for an input which you can never give with current implementation.

I guess I just make an additional check in CInput if we are checking for a key which is not available on the system, and in that case just accept the-any-key.

- In some menus, it doesn't quit when you try to force quit it and it still waits for input. Very annoying, that means that CG will run forever in background and you have to kill -KILL it via console or reboot your iPhone.

Probably another hack somewhere in CInput could also fix that for all possible cases.

In both cases, I don't want to fix every single menu. Could be that we forgot about one or so.

- Saving and restarting. Right now, once you are in the game, you don't have any way (except dying) to get out of it. And you cannot save.

I guess I just map the left corner to esc-key or so.

----

That are the important ones. Some other improvements which could be made:

- Perhaps some light overlay for the keys, so the user actually see where he must touch at. :) Right now, he must find out by trial.

- Better performance. Graphics are still the bottleneck. Blit operations and basically all software operations are slow. Everything should be moved to OpenGL. That means many cleanups for the FG layer are needed. And for ingame, every single tile could also be a texture and we could just draw these texture on the screen (drawing a texture is basically at no cost).
gold007eye
Meep
Posts: 1
Joined: Tue Nov 17, 2009 13:32

Post by gold007eye »

This is great news :) I had posted something on iPodTouchFans forums almost a year ago about this idea; and I can't wait to try it out. If you guys need any help testing it on the iphone let me know and I will do what I can to help.

-Jay
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Post by albert »

I just made an update. Added some further control, also some optional graphical overlay for the controls so you can see them (but you can also hide them).

Game is also more smooth, I think it is really well playable.

Also fixed some cases where you were not able to go out of a dialog (because you need to press a key which was not there).

Also, app will always quit now.

And I added load/save support. :) (Was not possible before because you could not enter the slot-nr, keys 1-9 don't exist on the iPhone.)
User avatar
tulip
Flower Pot
Posts: 2520
Joined: Thu Aug 21, 2008 12:50
Location: Hamburg, Germany
Contact:

Post by tulip »

keys 1-9 don't exist on the iPhone
:lol That is funny as hell. Finally a phone which can do anything but dial.
Image You crack me up little buddy!
pizza2004
Vortininja
Posts: 266
Joined: Wed Jul 08, 2009 1:22

Post by pizza2004 »

Good work, it runs really smoothly now. I was wondering if you knew about the version of SDL made for the iPhone, it is one of the branches of v1.3 of SDL. We could use that to incorporate this port directly into the regular project, we would just need someone to upkeep it, which you could do if you wanted to. So we could really make sure it was kept up to par with everything else.

I had a bunch of ideas for this before, like having landscape and portrait modes. In portrait mode it would display at the top with black space and the controls below and when you are required to enter a name (highscore, saving the game, etc.) the keyboard would pop up. In landscape mode the keyboard could still pop up to display things, but it would need to be tweaked till it would not just cover everything up. Now, I am thinking along the lines of making this legal so that it can be approved by the Apple Store. That means that if we got permission from Apogee then we could embed the data into the thing rather than having it load it so that it could pass the test. This would be cool, and id already released a classic version of Doom on the iPhone, and when they released Keen on Steam they have it run using DosBox so I can imagine that they would allow this to be done with ours running it on the iPhone (and if we are lucky, they would want to use it with the Steam and other download options, maybe being included with the dosbox download, and allowing other operating systems to get Keen officially).

Also, the fire and jump buttons should be switched, and if possible two button firing should be used rather than having the three buttons. I think that with v0.3.1.0 of CG that we could really have this run well on the iPhone if ported. We could also release it to the DS and the Wii and possibly the PSP. Really we could port it to any platform that supports SDL, so the possibilities are quite abundant!
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Post by albert »

All of the work which was done on GSoC was already merged into the main SDL-1.3 branch afaik. I have used current SDL-1.3 head. That one worked just right of the box, even provided an iPhone Xcode project file.

Have you read the messages on the mailinglist? I wrote a bit about that. I also ported our code to be used with OpenGLES. This works really great now.

I also thought about releasing it later in the AppStore. First I need the access which costs 99$. Perhaps we can ask for donatation here or elsewhere for that. Then we could release it together with CK1 just for free (which shouldn't be a problem as CK1 is shareware and redistribution is explicitly allowed and wanted) and people can buy CK2 and CK3 from 3D Realms. Perhaps we can also release ready-made versions on CK2/CK3 but that is the thing we would have to speak about with ID and/or Apogee.
pizza2004
Vortininja
Posts: 266
Joined: Wed Jul 08, 2009 1:22

Post by pizza2004 »

Well, what you said would work if it weren't for Apple, you see Apple dislikes having you do this sort of thing, and Apple especially wouldn't let us allow users to just upload the game files in after installation, but if we were allowed then we would come to an agreement with id software rather than just releasing their game without their permission. They would release the game, and collect all of the proceeds that were ever made from it being sold on the App Store. But we would have a lite version with only Keen 1 (and when we get support for it, Keen 4) and then a full version with all 3 of them for $3. Then when we get support for Keens 4-6, we would have an in app download of Keens 4 & 5 that would cost $2 and if it were ever possible to release Keen 6 (and Keen Dreams when we add support for it) then it would be a download for $1 (same with Dreams if we had it).

If we were able to do this, we would probably get on id's good side which would be useful in helping Get Tom Hall the rights to make more Keen Games, or to have some specials privileges of some sort. Sadly we will never see the official source code of the Commander Keen games, as Tom Hall says that they lost it on his official website. This is a sad thing because it makes it harder to find a source to use to recreate the physics exactly, and it means that if we don't have our deal go through, then we will probably never see Commander Keen released on the iPhone by id software.

I have emailed id on the matter (via their iPhone Support email) and asked them what they would think of using our engine to release the game on the iPhone, but did not give any particulars as to what our name, or location of operation was. If they are willing to try this, then I will attempt to establish a link between them and us in order to make it work properly, and I might ask them to have someone from id join the Commander Genius team to make sure that everything is done correctly and that the iPhone build runs smoothly and then redistribute it on the iPhone itself (if we were extremely lucky, maybe John Carmack himself would be the one to help with development).
User avatar
Deltamatic
Vorticon Elite
Posts: 1418
Joined: Sun Apr 26, 2009 12:55
Location: Shreveport, Louisiana

Post by Deltamatic »

I thought Pizza was exaggerating, but... upon my word, this IS momentous.
Hopefully id will react well. *crosses fingers*
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Post by albert »

First, can you send a copy of your mail to id to our mailinglist? And have you send them a link to teh app I just made? I think that would give them kind of an impression of what it could look like.

Then, as far as I understand, even when we go over Apples AppStore, we don't need any permission to publish Commander Keen 1 (for free of course, otherwise of course not; but I also do want people to get this for free).

Or why do you think that would be a problem? Our CK1 app would just come together with CK1, so no need to upload any game files after installation. Also, we even have the original ordering information in it, and the shareware licence says explicitly that any redistribution is allowed.

About how to handle CK2 and CK3: That is more complicated. As said, uploading these game files somehow to the iPhone/iPod is complicated and probably Apple don't want to allow that (whereby there are ways, even for non-jailbreaked phones).

A better way probably would be to just release seperate apps with CK2 and CK3. But at this point, we need to make an agreement or something with id (or Apogee). These episodes probably will not get released for free on the iPhone and all money probably would go directly to Apogee. I would be fine with this.

---

Here a video of me, playing CK in the iPhone simulator. :)

YouTube - Commander Keen 1 on iPhone / iPod
User avatar
Roobar
Vorticon Elite
Posts: 3276
Joined: Tue Jan 08, 2008 16:12
Contact:

Post by Roobar »

Are you planning on releasing it for other platforms and/or for not smart phones? As I like a bit iphone, but I'm going to take a Samsung one (most likely S8000 Jet).
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Post by albert »

I only have an iPhone, so I cannot really test other systems. But it should be very easy to port it to all systems which have a good base (Linux or Unix). That is the iPhone, the iPod, Android (aka Google Phone) and Maemo (Nokia Internet tablet, e.g. N800 and others).

Then there is Symbian which is not Unix-based but has support for SDL, so it also shouldn't be that complicated to port it over there, too.

I have just checked out the Samsung S8000 Jet and it seems they use a very own system, so it is very unlikely that you will ever be able to play games like Commander Keen on it.
User avatar
Roobar
Vorticon Elite
Posts: 3276
Joined: Tue Jan 08, 2008 16:12
Contact:

Post by Roobar »

Never say never :). Unless it's a java based.
albert
Grunt
Posts: 18
Joined: Wed Jul 22, 2009 21:15
Location: Aachen, Germany
Contact:

Post by albert »

The S8000 is Java based, that is the problem. I didn't searched much but I didn't find a way to port native C/C++ based games (which uses SDL) to Samsung S8000. But I may be wrong here, perhaps I have just not find those information.
Post Reply