Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
The Maze of Galious
 Brain Games Forums : The Maze of Galious
Subject Topic: MoG - ’Gamepad-friendly’ Modifications Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
amoreira
Newbie
Newbie


Joined: 04 January 2010
Location: Brazil
Posts: 25
Posted: 14 July 2010 at 00:59 | IP Logged Quote amoreira

Hi all.

I created this topic in order to present some changes that I did over the original MoG codebase, so that the interested people can evaluate them and make suggestions.

The purpose of those changes is to make the game more 'gamepad-friendly', and less 'keyboard-dependent' so that it can be ported over to home consoles without extra adaptation effort (Right now, I'm porting the game to Wii, and Azrael is doing the same for the PSP).

In this first post, I will just present screenshots and text describing what was done. So, let's begin:

The first major change is the decision of removing completely the password system. That is, the direct control of the player over the passwords. The player would only be allowed to save to and load from the 5 slots. Of course, if he wants to enter a cheat or load the progress of someone else, there is always the possibility of editing the save files.

Thus, this is how the main menu looks like:





Demeter's room also had to be changed. Instead of showing you the password, she asks you to choose one of the slots to save the progress:







The last change, and an odd one, is that when you are in a "demon" room (with the pentagram) but not actually fighting the demon yet, pushing the ESC key (HOME button in the WiiMote mapping) will not take you to the Options Menu, but will instead show you a "virtual keyboard" that will enable the user to type the demon's name without having a keyboard.



The keyboard is simplified. It contains only the minimal set of characters needed to spell the names of all the 10 demons in the game. Navigation is done with the arrow keys, and selection with the SWORD key. The letters must be selected in the correct sequence, and then the player has to return to the game (ESC key). If all is done right, the demon will appear - and the ESC key will return to the original behavior of showing the Options Menu.

As I understand, all of those modifications take away the purity of this remake, so all of them are conditioned to a preprocessor definition that I added. Also, the changes are intended to be quick and minimal, reusing original graphics and code - so, they might look a bit "out of place" when compared with the rest of the GUI. :)

Therefore, ports to other computer architectures, or keyboard-enabled devices, would preferrably not use that definition.

Any feedback is appreciated. As soon as I have the code cleaned up, I can provide the actual patch. Best regards to all!
Back to Top View amoreira's Profile Search for other posts by amoreira Send Private Message Add to Buddy List
 
Azrael
Newbie
Newbie
Avatar

Joined: 07 July 2010
Location: Germany
Posts: 11
Posted: 15 July 2010 at 12:43 | IP Logged Quote Azrael

This is indeed good stuff.

For the PSP port I thought to use an on-screen keyboard. There are several ways to do so: One can use the build-in OSK (FYI samplecode here) or some homebrewed ones like this...

But I think dropping the keyboard usage might be way better, since those OSKs always give an "added upon" experience.

You should try to separate, changes for gamepad usage from those that make it run on a specific platform. Maybe by adding some "meta" precompiler flag, say GAMEPAD - It might be easier to switch between keyboard- and gamepad-mode. And someone might actually like a PC build with this.


Back to Top View Azrael's Profile Search for other posts by Azrael Send Private Message Add to Buddy List
 
amoreira
Newbie
Newbie


Joined: 04 January 2010
Location: Brazil
Posts: 25
Posted: 15 July 2010 at 23:18 | IP Logged Quote amoreira

Hi all,

I organized my working copy and sent the minimal patch to Azrael (already changing the preprocessor flag's name to GAMEPAD_ONLY - instead of CONSOLE_PORT). That way is indeed more generic.

If anyone else is interested in evaluating the patch (Jorito, Santi?), or even aggregating it into the official codebase, please send me an e-mail (personal e-mail is in my profile).

Another question: I read in some FAQ that there is at least another point of keyboard-dependency that my changes haven't covered. It is the Bible item, that you activate by pressing the CTRL key (and I just found the code that implements this).

Do you guys know any other points in the game that depend on keyboard, and that I may be missing?

Currently, those are the points that I identified:

1- Password system
2- Spell a demon's name
3- Use the Bible (not yet covered).


Edited by amoreira on 15 July 2010 at 23:21
Back to Top View amoreira's Profile Search for other posts by amoreira Send Private Message Add to Buddy List
 
Jorito
Admin Group
Admin Group
Avatar

Joined: 30 December 2002
Location: Netherlands
Posts: 1930
Posted: 17 July 2010 at 18:57 | IP Logged Quote Jorito

About the patch: feel free to send it to me or Santi, might be nice to add it to the remake for when a joypad is detected/selected to play the game.

About the other key interactions, well, I'm not a MoG expert, but I know there's some item you can use to kill the bats in a room. But you do that by typing UMBRELLA. Not sure if there's any other interactions like this tho.

All in all, apparently the original game was made to be played on a keyboard, so we just have to find a good way to make it playable for non-keyboard systems
Back to Top View Jorito's Profile Search for other posts by Jorito Visit Jorito's Homepage Send Private Message Add to Buddy List
 
amoreira
Newbie
Newbie


Joined: 04 January 2010
Location: Brazil
Posts: 25
Posted: 17 July 2010 at 20:54 | IP Logged Quote amoreira

Thanks for the reply, Jorito.

In fact, I made some research in walkthroughs of MoG, and of course, also inside the remake's code. I found out that there are two types of items that can be obtained during of them:

- The majority of them are of passive nature: i.e. they grant permanent status effects (like increasing the defense or attack against certain kinds of enemies).

- However, a few of them are of active nature: i.e. they become "abilities" that can be used via keyboard shortcuts. Those are:

1 - The dagger, as you mentioned: If collected, type UMBRELLA in-game, when in a room with bats and all of them will instantly be killed.

2 - The bible: If collected, the player can use it to stop the enemies' movements for a while. It can be used up to 15 times, and it can be acessed by pressing the CTRL key in-game.

3 - The angel halo: If collected, the player can use it to warp back to the room in the castle where the game can be saved. It is accessed by pressing the RETURN key in the item menu (F1).

4 - The feather: If collected, the player can use it to warp to a room where the door to a world is located (only works with worlds that the player has already visited). It is accessed by pressing the world number (1-9) in the item menu (F1).

I am currently doing some changes to the item's menu (of course, conditional to the GAMEPAD_ONLY flag). Basically, it is now possible to navigate through those four items, in the item menu, and select them with the sword key. Doint that causes the same effect as the original keyboard shortcuts.

This solution is still in progress (for example, in the case of the feather, I'll have to code an additional menu that lets the user select the destination, since there are no numeric keys). As soon as I have it finished, I will send the patch to you all.
Back to Top View amoreira's Profile Search for other posts by amoreira Send Private Message Add to Buddy List
 
amoreira
Newbie
Newbie


Joined: 04 January 2010
Location: Brazil
Posts: 25
Posted: 19 July 2010 at 17:28 | IP Logged Quote amoreira

The modifications were finished. Now, all the items mentioned in the previous post are selectable via the item screen, with the navigation keys and sword key.

I have not produced a patch, however the final result can be viewed at my Google Code page for this port:

http://code.google.com/p/mazeofgalious-wii/

In order to see the changes, check out gamecycle.cpp and all the points surrounded by #ifdef GAMEPAD_ONLY - or do a direct compare with the original gamecycle.cpp.

Now I think that the Wii port is pretty much finished. The only thing standing in the way of the first release is a random crash that occurs sometimes, in a memset call inside B_rectangle (drawing.cpp). I'm still trying to figure out the cause.
Back to Top View amoreira's Profile Search for other posts by amoreira Send Private Message Add to Buddy List
 
Azrael
Newbie
Newbie
Avatar

Joined: 07 July 2010
Location: Germany
Posts: 11
Posted: 19 July 2010 at 17:37 | IP Logged Quote Azrael

amoreira wrote:
Now I think that the Wii port is pretty much finished.


Congratulations! You are incredibly fast... Atleast I can blame it on you having more experience than me

amoreira wrote:
The only thing standing in the way of the first release is a random crash that occurs sometimes, in a memset call inside B_rectangle (drawing.cpp). I'm still trying to figure out the cause.


Does it occur on the Wii only, or on all builds with your changes? Is it reproducible? I could go and see if the PSP build does it, too (...once I merged your code in).
Back to Top View Azrael's Profile Search for other posts by Azrael Send Private Message Add to Buddy List
 
amoreira
Newbie
Newbie


Joined: 04 January 2010
Location: Brazil
Posts: 25
Posted: 19 July 2010 at 19:32 | IP Logged Quote amoreira


Thanks for the compliments, Azrael.

Blame it also on the fact that I'm currently on vacation, so I have a lot of free time to look into the game's code. And of course, even though this is one of the earliest works by Santi, the code of the game's finite state machine is very organized and easy to extend.

By the way, I'll finally be on a trip during the next seven days, so I'll dedicate myself 0% to coding, and 100% to other activities.

Regarding the crash, it only occurs on the Wii. At least, I haven't managed to reproduce it on the PC. This is an annoying problem that occurs at random*, since the very beginning of the port. The only hint I have is a stack frame, but no possibility to watch variables or any extra debug information.

My guess is that it is an attempt of drawing a rectangle outside of the screen, thus memset is going out of bounds - but I'm not sure. Anyway, I'll have a look again at this when I'm back from the trip, using printf's to find out what is going on.

* Entering a "fairy room", collecting the fairy, going to another room, and then pressing the item menu button (F1) seems to trigger it easier (but I'm not sure).
Back to Top View amoreira's Profile Search for other posts by amoreira Send Private Message Add to Buddy List
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.01
Copyright ©2001-2003 Web Wiz Guide

This page was generated in 0,2813 seconds.