Asking for portability testing

Hi!

I know everyone is busy and all, but I really need to ask help for portability testing.

After writing the diary entry, I will (try to) upload a .zip-file containing the current test version of the game (mai0_0_1.zip). It would be really great if some people could test whether it runs. (especially Mac and Linux, since I myself am using Windows XP (although compatibility between Windows versions ...... (^_^;; ).

Unfortunately, I forgot to take some information home, so it is lacking from the readme.txt file.

wxPython can be found at the Download Page of http://www.wxpython.org

Their download and installation instructions should be sufficient to get things up and running.

This is still an extremely early stage of the game development, thus, there is not really much you can do, so the test (after installing wxPython (^_^;; ) will be over in a few seconds (and grow boring at that)

Basically, when you start the program, it should switch to full screen at 640x480 and display the main menu which offers 'New' and 'Quit'. If you choose 'New', you should see Mai-chan in a simple forest map (30 x 20, IIRC) and you can move her around. There is nothing to interact with yet, so that is all there is to it (you can't walk through trees, though).

If you can do all of the above, everything is fine. Otherwise, please try to get the error message with which things fell apart, and write a comment to this diary entry informing me about the problem. Then I can try to fix things. Thank you for your support.

Still, I think that this is already enough for me to avoid most portability problems later, since the program as is uses nearly all dangerous features the game will use:

* Reading data files
* Displaying graphics (including simple alpha-graphics (just 00 or ff))
* Accepting keyboard input
* Enforcing 640x480
* Various wxPython routines

This leaves only the following dangerous items unchecked:

* Text display (will be worked on tonight together with the event engine)
* Data writing (I think if I use the same addressing methods as with reading and then choose 'wb' for writing, things should go smoothly)
* Turning off the mouse display (mouse input is not supported and not wanted in the game; I think there is a method in wxPython to make the mouse invisible if it is in front of a window).

Those interested are welcome, of course, to read through the source code. Maybe (that's a big maybe) some of the ideas may inspire you. However, be warned that due to being behind schedule, the most recent code parts are effectively uncommented (if you are a masochist, try to understand the routines in mapmode.py).

Also note that there are quite a number of variables and functions that are not yet used in the game.

Sorry for being such a bother, but I never worked on a project with such portability issues (^_^;;

Deathworks

(log in to comment)

Comments

I can't play your game yet because it requires python 2.5 and wxpython, and I'm on Ubuntu Edgy, and for some reason I can't install wxpython on python 2.5 (neither pygame, which is why I use python 2.4). But I think it works on Feisty, so I'm trying to upgrade a part of my packages to Feisty just so I can install wxpython on python 2.5 properly. For some reason copying the module installed on python 2.4 to python 2.5 didn't work, it complained about version. Last time I upgraded to Edgy it messed up all my configuration, so I hope it doesn't happen again. :)

I'll get back to you when I'm able to play your game.
Is it possible to make available a python 2.4 compatible version? I don't seem to be able to upgrade just a few packages without upgrading a lot of others I don't need to upgrade.
I don't know if that's the only reason for the Python 2.4 incompatibility, but there's an evil pair of parantheses in a class declaration in creature.py:
class DW_Class_Creature()
Removing the () might help. Maybe.

Hi!

Thank you for your support.

Actually, I don't really know how far down you could go before encountering problems. This is why I enforced the tight 2.5 requirement.

In order to get rid of it, open the main.py file in your Python editor. Find the following code:

if (a[0] == 2) and (a[1] < 5):
    print "You need version 2.5 or later of Python in order to run this program!"
    sys.exit()


and simply use "#" to make it comments/deactivate it.

BTW, a little below that, I also have another check for wxPython's version (requiring the most current one as well). Again, if that is causing trouble, you can de-activate it.

Actually, with wxPython, I do have a hint that earlier than wxPython v.2.5 (IIRC) will definitely not work since they changed from individual module to package and I am using the current notation. But again, I don't know enough about the differences between 2.6, 2.7, and 2.8 to say for sure whether it will work on anything but the latest one, sorry.

a = wx.version()

if (a[0] < '2') or ((a[0] == '2') and ((a[2] < '8') or ((a[2] == '8') and (a[2] < '4')))):
    print "You need at least version 2.8.4 of the wxPython libraries in order to run this program!"
    sys.exit()

The program will also abort if the sys.version command isn't implemented (older than Python 2.2), but I don't think anyone here should be caught by that.

I am really sorry about the inconveniences, and I am really grateful that you have tried to test it.

Deathworks
I commented out the version checking code, plus removed the extra () like ServalKatze suggested. Now I'm getting "Segmentation Fault", and nothing more. A bit of debugging (through printing) tells me the problem is in this line on constants.py:
DW_Const_Display = wx.Display(0)
My wxPython is 2.6, by the way.

Hi!

Could you check if it works if you made the statement

DW_Const_Display = wx.Display()

,that is, allowing it to default. According to the instructions, it should actually default to 0 by itself.

I will try to check at home about the differences between wxPython 2.6 and wxPython 2.8.4, which is the one I am using.

Thanks again for your patience.

Deathworks
No luck. :(

Funny thing is...
$ python
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) 
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.Display() 
Segmentation fault

Hi!

I skimmed through the online release information from 2.8.4 down to 2.6.3.3 (or something like that (^_^;; ). On first sight, I didn't notice anything I have used in the program. So, your chances should be fairly good. (Most changes seemed to be around the sizers and stuff which I am not using, having a fixed screen layout).

However, I am not sure about the additional events. The demo said that there was a new way of doing them and mentioned an old way, but I don't think they said when things were changed (^_^;;

The new way of creating events is used in the essential routines for traversing the program/changing program modes. Although, I think if you got so far as to get a crash during the application initialization, the events initialization worked fine; IIRC, it is handled beforehand.

I guess I will remove the version protection (except for the implicit Python 2.2 check); or at least change it to a mere warning.

By the way, are Tee and Tee-py5 the same person ?

I have successfully tested drawing text on my machine and succeeded in getting rid of the mouse cursor, but I will prepare the next package by tomorrow (hopefully).

I will check for the thing you mentioned about the creatures class definition and see if I can find an easy way to make full screen optional in such a way as to circumvent the wx.Display() command (because changing to full screen is the only reason why it is there).

Deathworks

P.S.: Your answer arrived while I was typing this. I am not sure, but I think that it is something about the wxPython version. According to the online help, you should be able to create a working Display object:

http://www.wxpython.org/docs/api/wx.Display-class.html

As I wrote above, I will work on a version without full-screening. However, if possible, I really suggest updating to the most current wxPython version, because I am not sure how many problems using the windowing system will add (^_^;;

Hi!

Some googling located a bug report from wxPython 2.6.3.2 onwards under X11 with wx.Dialog causing that segmentation error.

In one report, it was claimed that PyShell or PyCrust could avoid the error.

I don't know whether this has been fixed by now (should be, since it seems some simple error in variable definition.

Anyhow, thanks for the information, and as I said, just in case, I will work on a non-full-screen-version

Deathworks
Alright then. :)

Tee-py5 is my (individual) "team"'s name. I can't put it just Tee because I already used it on a previous pyweek. I might change it to my game's name later.