As I wrote here
, in november I started porting Eat The Whistle
to the iOS platform, this article will follow the previous one explaining the problems of porting a desktop game to a mobile, touch only, platform. Read it after the break
One of the critical differences in mobile games is the control system. Many successful mobile games are original games, since it's easy to develop an idea if you already know the boundaries you will have.
Desktop/console gaming usually require a mouse, a joypad, a mouse and a keyboard, older games used to require only a joystick or a combination of joystick and keyboard (here I'm talking about the 8/16bit computer era).
Obviously Eat The Whistle since it cames from the end of the 16bit era used to require a joystick, and, optionally, a keyboard for some not strictly necessary functions (pause the game, quit a match...).
I've played most soccer games available on iOS and I've seen that the most used control system is the virtual joypad
. another option was to use the accelerometer as a joystick to move your active player, SDL
already handle it this way, so I've made a quick test, and I found it not precise enough for a football game, in which you have to move a small player toward a small ball and... get it!
So I left the accelerometer road and go for a virtual joystick. Here
is my first prototype of it, running on linux, of a virtual joystick with two different speeds and an arbitrary number of buttons.
You can get the sources of the version of it actually used in Eat the Whistle
in the Eat The Whistle SVN repository
I used a button of the virtual joystick implementation also to access the pause
feature, that is really needed on a mobile platform, also because you have to pause the game if the phone rings or if your application is sent in the background.
The virtual joystick helped me also with the classic "two speed" problem of football simulators, many mobile games (for instance Fifa or PES) try to solve it with an additional button, I think that the two speed joystick is a better solution. The speed you move depends from how far from the center of the base you move the joystick handle, so you can really think it as an "analog" joystick with 8 directions and two levels for direction.
Another big issue I had in the porting was the fact that the substitution and change tactic features in the original game required special joystick movement to be activated, that movement where described in the manual, but were almost impossible to perform with a virtual joystick.
So I added a dynamic pause menu, that could be used to change tactic, view replays of arbitrary game actions, and, with the ball out of play, make substitutions.
That menu has been quite complex to implement, because the "game" and "menu" part of ETW was originally two different executables, I made them a unique binary in 3.x GPL version somewhere between 2002 and 2004, but I never polished it, and you could not open a menu or a dialog while a match was running.
So I had to clean up a lot of things to make this work... Some days I had the urgency to scrap all the code and rewrite it in modern C++... but I took a year to write the game in 1997/98, working on it full time, also with my improved skills and the original code as reference I could not expect to finish it in less than 6 months working on it on my spare time...
Here is the result, except for the fact that I took this screenshot in an arcade game, and arcade mode does not allow for substitutions!
The game with a virtual joystick was barely playable, players where too small on native retina iOS resolutions or iPads, so I had to take a design decision and I choose that the game had to have a smaller resolution.
I picked 480x320 for iphone 3gs, 4, 4s (4:3), 512x384 for all iPads, 568x320 for iphone 5. With those resolutions the players were big enough and the visible area of the pitch was wide enough. Originally ETW was released at 320x256, but it was configurable to support almost any resolution and could be run in 640x512 on most expanded amigas.
The game is rendered on a 256 colors bitmap, then it's copied on a 16bit texture, and the texture is displayed on the screen, the virtual joystick is displayed over this texture.
The fact I had a texture gave me the choice to try filtering to "smooth" the game gfx, but eventually I found that the pixellated look of the game, give it a better retro style, and the fact to be aimed to "retro-gamer" is a must to get a niche of players on a platform with giants like FIFA and PES...
After some playtesting I also had to slow down the game by 20% (player movements, shots, passages...), the virtual joystick give a slower response than a real one, and getting the ball or receiving a passage was simply too hard.
In the next article I'll speak about additional features thought for mobile, like touch passages/throw ins, touch player changes, swipe free kicks and the tutorial mode to replace the manual.
Posted Wednesday 23 January 2013 - 12:03 (read 4267 times)
Latest news about this argument From iOS to Android using SDL
(27/02/2013 - 17:11) read 6967 times Porting a game to the mobile (part 3)
(25/01/2013 - 14:53) read 4575 times Porting a game to the mobile (part 2)
(23/01/2013 - 12:03) read 4267 times Porting a game to the mobile (part 1)
(22/01/2013 - 16:07) read 4438 times
All the news about this argument