maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Paintown : A fighting game engine like MUGEN [Working on the N900!] (https://talk.maemo.org/showthread.php?t=79910)

lonk 2011-11-11 23:52

Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
-EDIT2-

Instructions over here (Works with joystick to get select things in menu, otherwise works with keyboard): http://talk.maemo.org/showpost.php?p...76&postcount=9








-----------------------------------
It's a fighting game engine that aims to be like MUGEN, for anyone who doesn't know what MUGEN is here is a video example http://youtube.com/watch?v=Q6xjtsqen5Q


here is a link to the source http://paintown.sourceforge.net/

here is a link of a port by our friendly Pandora neighbours http://repo.openpandora.org/?page=de...-13108&dp=true

Anyone interested? :)

Deaconclgi 2011-11-12 00:17

Re: [request] Paintown : A fighting game engine like MUGEN
 
I'm interested but I don't have any programming skills. I like mugen and made my own Mugen fighter last year and held hopes for a Maemo Mugen (Maegen).

I can help with testing.....but that is about as far as my Maemo skills go.

Thank you for the information.

Radicalz38 2011-11-12 12:27

Re: [request] Paintown : A fighting game engine like MUGEN
 
Anybody willing to try jmugen instead? It's java so at least its a bit more possible

http://code.google.com/p/jmugen/downloads/list

SVN http://jmugen.googlecode.com/svn/trunk/

Nokia 5700 2011-11-12 15:55

Re: [request] Paintown : A fighting game engine like MUGEN
 
Have anyone tried simply running the Pandora build..?
With some customization, I believe it should run. (Adding some libraries only.)

Radicalz38 2011-11-12 16:30

Re: [request] Paintown : A fighting game engine like MUGEN
 
It requires libvorbisfile and manage to fix it then it required libpython2.6.so.1.0 dunno where to get python2.6 for n900 so then gave up :p

Radicalz38 2011-11-12 17:11

Re: [request] Paintown : A fighting game engine like MUGEN
 
2 Attachment(s)
Ok manage to dive into it a little tweaking some things because of lack of python 2.6 on n900 and got this.


Quote:

[0:paintown] Paintown by Jon Rafkind
[0:paintown] Command line options
[0:paintown] -w, fullscreen, nowindowed, no-windowed : Fullscreen mode
[0:paintown] -d, --data, data, datapath, data-path, path <path> : Use data path of <path>. Default is data/
[0:paintown] -l, --debug, debug # : Enable debug statements. Higher numbers gives more debugging. Default is 0. Negative numbers are allowed. Example: -l 3
[0:paintown] -m, music, nomusic, no-music : Turn off music
[0:paintown] mugen, --mugen : Go directly to the mugen menu
[0:paintown] mugen:training <player 1 name>,<player 2 name>,<stage> : Start training game with the specified players and stage
[0:paintown] mugen:watch <player 1 name>,<player 2 name>,<stage> : Start watch game with the specified players and stage
[0:paintown] joystick, nojoystick, no-joystick : Disable joystick input
[0:paintown] server, network-server : Go straight to the network server
[0:paintown]
[0:paintown] Debug level: 2
[0:paintown] -- BEGIN init --
Data path is data/
Paintown version 3.5.0
Build date Jan 22 2011 21:38:47
SDL Init: Ok
[1:paintown] SDL Screen format palette: 0 bits per pixel: 16 bytes per pixel: 2 rloss: 3 gloss: 2 bloss: 3 aloss: 8 rshift: 11 gshift: 5 bshift: 0 ashift: 0 rmask: 63488 gmask: 2016 bmask: 31 amask: 0 colorkey: 0 alpha: 255
Set graphics mode: Ok
Initialize random number generator
Initialize network
-- END init --
[0:paintown] Init took 1.237 seconds
[1:paintown] Found 1 level sets
[1:paintown] Add level paintown/levels/1.txt
[1:paintown] Add level paintown/levels/2.txt
[1:paintown] Add level paintown/levels/3.txt
[1:paintown] Add level paintown/levels/4.txt
[1:paintown] Add level paintown/levels/5.txt
[1:paintown] Add level paintown/levels/6.txt
[1:paintown] Add level paintown/levels/7.txt
[1:paintown] Add level paintown/levels/8.txt
[1:paintown] Add level paintown/levels/9.txt
[1:paintown] Add level paintown/levels/10.txt
[1:paintown] Add level paintown/levels/11.txt
[1:paintown] Creating music thread
[1:paintown] Playing music
[1:menu] Loading menu data/menu/main.txt
[1:menu] Trying version: 3301
[1:menu] Loading menu data/menu/options.txt
[1:menu] Trying version: 3301
[1:paintown] Get screen resolution
[1:paintown] Screen size: 320 x 240
[1:paintown] Screen size: 640 x 480
[1:paintown] Screen size: 800 x 600
[1:paintown] Screen size: 1024 x 768
[1:paintown] Screen size: 1280 x 1024
[1:paintown] Screen size: 1600 x 1200
[1:menu] Trying version: 3301
[1:menu] Trying version: 3301
[2:paintown] Current File: mugen.cfg
[2:paintown] Checking for file in data/mugen/datamugen.cfg
[2:paintown] Couldn't find file: mugen.cfg
[2:paintown] Correcting file: mugen.cfg, in directory: data/mugen/data.
Got 14 files.
[1:paintown] Parsed mugen file data/mugen/data/mugen.cfg in 192.749 milliseconds
[0:paintown] Loaded data/music/aqua.s3m type .s3m(1)
[1:paintown] Forced a shutdown. Cya!
[0:paintown] Bye!
[1:paintown] Waiting for music thread to die
[1:network] Closing all sockets
configuration of screen resolution & key is on mugen.cfg

Radicalz38 2011-11-12 18:39

Re: [request] Paintown : A fighting game engine like MUGEN
 
1 Attachment(s)
Last screenshot lol! Manage to configure mugen key configuration but could find where is select key configuration for the paintown menu(the 1st 2 screenshots)

lonk 2011-11-12 20:09

Re: [request] Paintown : A fighting game engine like MUGEN
 
Wow that was quick! nice to see the progress and hope to try it soon :D !

Radicalz38 2011-11-13 01:05

Re: [request] Paintown : A fighting game engine like MUGEN
 
Quote:

Originally Posted by lonk (Post 1122527)
Wow that was quick! nice to see the progress and hope to try it soon :D !

Hi! You could do it yourself if you want...

Just apt-get install python libvorbisfile3

then do
Quote:

cd /usr/lib
Quote:

ln -s libpython2.6.so.1.0 libpython2.5.so.1.0
then download http://repo.openpandora.org/?page=de...-13108&dp=true

extract it with 7zip

Quote:

cd /path/where/extracted/paintown/data/mugen
Quote:

cp data/mugen.cgf datamugen.cfg
edit datamugen.cfg and map the keys. Using decimal conversion

then cd back to paintown folder and execute paintown
Quote:

./paintown --mugen

Note: Executing paintown without the --mugen arguement will bring you to paintown menu which is I'm having trouble right now as I don't know how to select from options

lonk 2011-11-13 12:27

Re: [Almost ported!] Paintown : A fighting game engine like MUGEN
 
Awesome! Will try it as soon as I get home :)

*editing the first post*

lonk 2011-11-13 20:18

Re: [request] Paintown : A fighting game engine like MUGEN
 
No luck for me, here's what I get:


Quote:

Originally Posted by Radicalz38 (Post 1122676)
Just apt-get install python libvorbisfile3


Code:

Nokia-N900:~# apt-get install python libvorbisfile3
Reading package lists... Done
Building dependency tree     
Reading state information... Done
python is already the newest version.
libvorbisfile3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Quote:

then do
cd /usr/lib
ln -s libpython2.6.so.1.0 libpython2.5.so.1.0
I get this

Code:

Nokia-N900:~# cd /usr/lib/
Nokia-N900:/usr/lib# ln -s libpython2.6.so.1.0 libpython2.5.so.1.0
ln: libpython2.5.so.1.0: File exists




and when I try executing paintown I get:

Code:

Nokia-N900:/home/user/paintown# ./paintown
./paintown: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory


Radicalz38 2011-11-13 23:39

Re: [request] Paintown : A fighting game engine like MUGEN
 
Quote:

Originally Posted by lonk (Post 1123050)
No luck for me, here's what I get:





Code:

Nokia-N900:~# apt-get install python libvorbisfile3
Reading package lists... Done
Building dependency tree     
Reading state information... Done
python is already the newest version.
libvorbisfile3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I get this

Code:

Nokia-N900:~# cd /usr/lib/
Nokia-N900:/usr/lib# ln -s libpython2.6.so.1.0 libpython2.5.so.1.0
ln: libpython2.5.so.1.0: File exists


and when I try executing paintown I get:

Code:

Nokia-N900:/home/user/paintown# ./paintown
./paintown: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory


sorry about this :( I messed up again... Instead of

ln -s libpython2.6.so.1.0 libpython2.5.so.1.0

it should be like this

ln -s libpython2.5.so.1.0 libpython2.6.so.1.0

lonk 2011-11-14 16:32

Re: [request] Paintown : A fighting game engine like MUGEN
 
Quote:

Originally Posted by Radicalz38 (Post 1123153)
sorry about this :( I messed up again... Instead of

ln -s libpython2.6.so.1.0 libpython2.5.so.1.0

it should be like this

ln -s libpython2.5.so.1.0 libpython2.6.so.1.0


No it's ok, thanks to you it works now and I now understand parts of how to get pandora apps working on the n900 (extracting pnds etc..I just tried Pencil and it worked :D )

On Paintown, that works perfectly! the config mentioned something about using a joystick if it detects it, so I tried Paintown with my usb gamepad (with hen) and the select button works from there. I don't know if there is a way I can help from there...

i'll post some screenshots

lonk 2011-11-14 16:51

Re: [Almost ported!] Paintown : A fighting game engine like MUGEN
 
Screenshots

http://i.imgur.com/Ft1HC.png
http://imgur.com/Nkii8.png
http://imgur.com/5TncX.png
http://imgur.com/3hWUC.png

selecting an option always crashes the first time around but works fine second time. Thanks again Radicatz!

SavageD 2011-11-14 17:12

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
how is the perfomance?
good, fast, slight lag?

lonk 2011-11-14 17:38

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by SavageD (Post 1123492)
how is the perfomance?
good, fast, slight lag?


Ok @600MHZ and without changing any settings that can improve performance


-Mugen: very laggy and low framerate, it seems like it's because of the music playing, when it stops playing it runs better. @805MHZ runs full speed with some lags here every minute or so
-Adventure Mode: works better than mugen mode, didn't lag that much or at all. Should be fast @805MHZ
-Platformer Mode: Just the mario background from my screenshot shows, and that's it, so either it doesn't work or I need to add some mods myself for it to work

SavageD 2011-11-14 17:55

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by lonk (Post 1123505)
Ok @600MHZ and without changing any settings that can improve performance


-Mugen: very laggy and low framerate, it seems like it's because of the music playing, when it stops playing it runs better. @805MHZ runs full speed with some lags here every minute or so
-Adventure Mode: works better than mugen mode, didn't lag that much or at all. Should be fast @805MHZ
-Platformer Mode: Just the mario background from my screenshot shows, and that's it, so either it doesn't work or I need to add some mods myself for it to work

thx, very useful. Guess I'll check it out later, I Just love making stuff for my mugen. Be nice to see a bit of it on my n900. Hurray! lol :)

jon5 2011-11-15 00:19

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Hi, I am the author of Paintown. Glad to see you guys got it working on the N900. A long time ago I got Paintown to run on the N500 using the Allegro4 library, I had a picture of it somewhere but I can't find it..

Anyway python really has nothing to do with the current implementation. Its just there to experiment with writing scripted levels but so far none exist so a new build could be made that does not include python and you would not have to fool with linking python2.5 to 2.6 (which is fairly dangerous, if python was actually used it would most likely crash at some point).

The platformer thing is an experimental feature that has no content other than being able to scroll around the mario background. You can disable it by removing the (platformer ...) part from data/menu/main.txt.

The keys in the mugen.cfg don't do anything so don't bother changing them.

I know mugen mode is fairly slow, there are many graphical effects that mugen uses which are slow to reproduce in software using 16-bit color. The original mugen was written in 8-bit color and doing palette effects there was relatively painless.

How much memory does the typical n900 have? I have troubles running some mugen characters on the Wii for example because it only has 80m of ram. I am slowly working on optimizing memory usage in mugen as well.

I'm curious as to why the game crashes the first time an option is selected but the second time it works. Can you provide any more information as to exactly under what circumstances that occurs?

Feel free to join me in my irc channel on irc.freenode.net in #paintown.

HtheB 2011-11-15 05:11

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Harmattan port would be nice for N9/N950 users! :)

Radicalz38 2011-11-15 05:47

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by jon5 (Post 1123685)
Hi, I am the author of Paintown. Glad to see you guys got it working on the N900. A long time ago I got Paintown to run on the N500 using the Allegro4 library, I had a picture of it somewhere but I can't find it..

Anyway python really has nothing to do with the current implementation. Its just there to experiment with writing scripted levels but so far none exist so a new build could be made that does not include python and you would not have to fool with linking python2.5 to 2.6 (which is fairly dangerous, if python was actually used it would most likely crash at some point).

The platformer thing is an experimental feature that has no content other than being able to scroll around the mario background. You can disable it by removing the (platformer ...) part from data/menu/main.txt.

The keys in the mugen.cfg don't do anything so don't bother changing them.

I know mugen mode is fairly slow, there are many graphical effects that mugen uses which are slow to reproduce in software using 16-bit color. The original mugen was written in 8-bit color and doing palette effects there was relatively painless.

How much memory does the typical n900 have? I have troubles running some mugen characters on the Wii for example because it only has 80m of ram. I am slowly working on optimizing memory usage in mugen as well.

I'm curious as to why the game crashes the first time an option is selected but the second time it works. Can you provide any more information as to exactly under what circumstances that occurs?

Feel free to join me in my irc channel on irc.freenode.net in #paintown.

Hi! Not sure if you're aware but the cfg file location is wrong on the build I tested.

[2:paintown] Current File: mugen.cfg
[2:paintown] Checking for file in data/mugen/datamugen.cfg
[2:paintown] Couldn't find file: mugen.cfg
[2:paintown] Correcting file: mugen.cfg, in directory: data/mugen/data.
Got 14 files.

that's why I moved mugen.cfg to datamugen.cfg, sort of a missing slash on the file path...

Anyways the real configuration file is located at
Quote:

/home/user/.paintownrc
just in case someone needs it. You could modify game keys, fullscreen on or off & fix the screen resolution.

Only problem for me now is how do i select the options from these windows or at least modify them
http://talk.maemo.org/attachment.php...1&d=1321117698
http://talk.maemo.org/attachment.php...1&d=1321117738

Ram of n900 is 250mb + swap so should be pretty playable compared to wii :)

And about the crashing so far haven't encountered anything like that yet. So can't help since I can't reproduce the problem.

Radicalz38 2011-11-15 09:39

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by HtheB (Post 1123745)
Harmattan port would be nice for N9/N950 users! :)

@HtheB
Harmattan is still maemo with meego elements. As long as you got libvorbisfile the pandora port we are trying to run now should also work.

lonk 2011-11-15 16:55

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by jon5 (Post 1123685)
I'm curious as to why the game crashes the first time an option is selected but the second time it works. Can you provide any more information as to exactly under what circumstances that occurs?

Ok for crashing, it only happened when I have the usb gamepad (an old Wingpad action by logitech, one button not working) attached on the N900, that hasn't happened today but this is what happens whenever I press "button 1" on it to select things (I pressed it three times here, then closed paintown)

Code:

~ $ cd /home/user/paintown/
~/paintown $ ./paintown
[0:paintown] Paintown by Jon Rafkind
[0:paintown] Command line options
[0:paintown]  -w, fullscreen, nowindowed, no-windowed : Fullscreen mode
[0:paintown]  -d, --data, data, datapath, data-path, path <path> : Use data path of <path>. Default is data/
[0:paintown]  -l, --debug, debug # : Enable debug statements. Higher numbers gives more debugging. Default is 0. Negative numbers are allowed. Example: -l 3
[0:paintown]  -m, music, nomusic, no-music : Turn off music
[0:paintown]  mugen, --mugen : Go directly to the mugen menu
[0:paintown]  mugen:training <player 1 name>,<player 2 name>,<stage> : Start training game with the specified players and stage
[0:paintown]  mugen:watch <player 1 name>,<player 2 name>,<stage> : Start watch game with the specified players and stage
[0:paintown]  joystick, nojoystick, no-joystick : Disable joystick input
[0:paintown]  server, network-server : Go straight to the network server
[0:paintown]
[0:paintown] Debug level: 0
[0:paintown] -- BEGIN init --
Data path is data/
Paintown version 3.5.0
Build date Jan 22 2011 21:38:47
SDL Init: Ok
Set graphics mode: Ok
Initialize random number generator
Initialize network
-- END init --
[0:paintown] Init took 2.401 seconds
[0:paintown] Loaded data/music/aqua.s3m type .s3m(1)
[0:paintown] Warning: 'key_idle' is not a valid key name. Valid keys are key_jump, key_forward, key_back, key_grab, key_right, key_down, key_up, key_attack1, key_attack2, key_attack3
[0:paintown] Warning: 'key_idle' is not a valid key name. Valid keys are key_jump, key_forward, key_back, key_grab, key_right, key_down, key_up, key_attack1, key_attack2, key_attack3
[0:paintown] Warning: 'key_idle' is not a valid key name. Valid keys are key_jump, key_forward, key_back, key_grab, key_right, key_down, key_up, key_attack1, key_attack2, key_attack3
[0:paintown] Bye!
~/paintown $


And just one time it closed right after starting it, but I don't remember pressing anything, I started it again and it worked but with the "choose language" screen like if I was running it first time

Code:

Nokia-N900:/home/user/paintown# ./paintown
[0:paintown] Paintown by Jon Rafkind
[0:paintown] Command line options
[0:paintown]  -w, fullscreen, nowindowed, no-windowed : Fullscreen mode
[0:paintown]  -d, --data, data, datapath, data-path, path <path> : Use data path of <path>. Default is data/
[0:paintown]  -l, --debug, debug # : Enable debug statements. Higher numbers gives more debugging. Default is 0. Negative numbers are allowed. Example: -l 3
[0:paintown]  -m, music, nomusic, no-music : Turn off music
[0:paintown]  mugen, --mugen : Go directly to the mugen menu
[0:paintown]  mugen:training <player 1 name>,<player 2 name>,<stage> : Start training game with the specified players and stage
[0:paintown]  mugen:watch <player 1 name>,<player 2 name>,<stage> : Start watch game with the specified players and stage
[0:paintown]  joystick, nojoystick, no-joystick : Disable joystick input
[0:paintown]  server, network-server : Go straight to the network server
[0:paintown]
[0:paintown] Debug level: 0
[0:paintown] -- BEGIN init --
Data path is data/
Paintown version 3.5.0
Build date Jan 22 2011 21:38:47
SDL Init: Ok
Set graphics mode: Failed! (1)
[0:paintown] Could not initialize system



And yea I've seen some demos on youtube of paintown running on the wii, the N900 is not that laggy @600MHZ =D

Also just like Radicalz mentioned, with us N900 users we can't select anything from the menu (paintown menu, it works in Mugen menu) unless we attach a usb gamepad/joystick (has anyone else aside from me tested with a usb gamepad?)

Thank for reading jon, hope this helps! :)

guilledoc 2011-11-15 17:44

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Hi you guys think that there is a posibikity to have a .deb?

Radicalz38 2011-11-15 17:53

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by guilledoc (Post 1124006)
Hi you guys think that there is a posibikity to have a .deb?

somehow if the paintown menu problem could be sorted out I wouldn't mind making a deb file for it. or if jon could make one for us :p

jon5 2011-11-16 17:19

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

[2:paintown] Current File: mugen.cfg
[2:paintown] Checking for file in data/mugen/datamugen.cfg
[2:paintown] Couldn't find file: mugen.cfg
[2:paintown] Correcting file: mugen.cfg, in directory: data/mugen/data.
Got 14 files.
If mugen.cfg was in data/mugen/data then it would have found it there, thats what the last message is about. I just changed the code to actually say 'found mugen.cfg in data/mugen/data' so its more obvious.

Quote:

Also just like Radicalz mentioned, with us N900 users we can't select anything from the menu (paintown menu, it works in Mugen menu) unless we attach a usb gamepad/joystick (has anyone else aside from me tested with a usb gamepad?)
Are you saying you can use the native N900 keyboard to select things in the Mugen menu but you cannot use the keyboard to select things in the paintown menu?

Doe the gamepad/joystick work in both menus?

Try using key 'A' to select stuff in the paintown menu.

Quote:

Ok for crashing, it only happened when I have the usb gamepad (an old Wingpad action by logitech, one button not working) attached on the N900, that hasn't happened today but this is what happens whenever I press "button 1" on it to select things (I pressed it three times here, then closed paintown)
Maybe button 1 is mapped to the quit button? How many buttons do you have?

guilledoc 2011-11-16 17:31

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by Radicalz38 (Post 1124010)
somehow if the paintown menu problem could be sorted out I wouldn't mind making a deb file for it. or if jon could make one for us :p

Ok i can wait:rolleyes:

Radicalz38 2011-11-16 23:53

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Quote:

Originally Posted by jon5 (Post 1124510)
If mugen.cfg was in data/mugen/data then it would have found it there, thats what the last message is about. I just changed the code to actually say 'found mugen.cfg in data/mugen/data' so its more obvious.


Are you saying you can use the native N900 keyboard to select things in the Mugen menu but you cannot use the keyboard to select things in the paintown menu?

Doe the gamepad/joystick work in both menus?

Try using key 'A' to select stuff in the paintown menu.


Maybe button 1 is mapped to the quit button? How many buttons do you have?

Hi jon! Yes we could use the n900 keyboard but only working keys is the up and down :p

By 'A' do you mean a big letter A? if yes now I know what's the problem :p somehow n900 can't use the shift key nor make a caps lock from the hardware keyboard on paintown probably that's the reason why we can't select it. But on mugen menu yes key's there are working pretty well i think(including 'A' button to select/start).

If I am right about the problem could you by chance make a seperate compilation for our n900 which uses lower caps key mapping for keyboard? After I think we could already use paintown fully.

jon5 2011-11-17 22:10

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Sorry I did not mean capital A, I simply meant the A key. If that doesn't work I'm not sure whats wrong.

Radicalz38 2011-11-17 23:31

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Hmm then is the source for the pandora version available? I would like at least to look into it maybe I would see the problem.

jon5 2011-11-18 00:44

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
You can get the source from svn

$ svn co https://paintown.svn.sourceforge.net...paintown/trunk

You can build for Pandora by setting the CC, CXX, AS, and AR environment variables to their respective tools and then doing

$ pandora=1 make

The build system uses scons.

Radicalz38 2011-11-18 01:18

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Thanks jon! Hmm Could you point me out on what file does the paintown main menu get it's key mappings? I'm not really good at c++ :p

jon5 2011-11-18 04:03

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Well actually its very strange that mugen would work but the paintown menu wouldn't work because in fact they use almost identical code.

For mugen look src/mugen/util.h on line 255 in getPlayer1Keys() is:
Code:

input.set(Configuration::config(0).getAttack1(), delay, false, Mugen::A);
Which basically gets the current attack key for configuration 0 (which is player 1) and assigns it to the Mugen::A logical key.

The paintown menu does a similar thing in src/menu/menu.cpp on line 1382
Code:

input.set(Configuration::config(0).getAttack1(), 0, true, Select);
It gets the same attack key from configuration 0 and assigns it to the menu key Select.

(The difference between 'Select' and 'Mugen::A' is completely irrelevant, they are just names)

Just as a test can you try pressing every single key on the n900 to prove that none of them do anything? If any key has some effect then please list what key it was and what effect it had here.

Radicalz38 2011-11-18 04:49

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Hi!

Up arrow key = Up
Down arrow key = Down

J key = Up
K key = Down

That's just it. But with mugen(while playing) all keys word fine I get 4 attack keys working. with up left down right


Also what would happen if I change it/add

PHP Code:

input.set(Keyboard::Key_A0trueSelect); 

:confused:

jon5 2011-11-18 05:30

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Its worth a try I suppose. Also the enter key is hard coded to be Select. Does the n900 have that?

Estel 2011-11-18 05:36

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
N900 enter is perceived by software as KP_Return.

It's possible to remap hardware keyboard to have Enter as - for example - shift + enter, but I have no idea if it would work (should, but only way to check it is to try).

/Estel

jon5 2011-11-18 17:08

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
I have enter mapped to return.

Code:

Keyboard::KeyType Keyboard::Key_ENTER = SDLK_RETURN;

Estel 2011-11-18 17:30

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
Generally, please avoid hardcoding remapping something into port - this break compatibility with external (USB, Bluetooth) keyboards, or with user-preferred keymap (hardware remapping).

/Estel

jon5 2011-11-18 18:28

Re: Paintown : A fighting game engine like MUGEN [Working on the N900!]
 
SDL will translate OS mapped keys to an internal representation, at least thats my understanding.

In SDL, src/video/x11/SDL_x11events.c is a procedure named X11_TranslateKeycode which calls
Code:

xsym = XKeycodeToKeysym(display, kc, 0);
Which will read the global key mapping from X11.

Thus the SDL key mapping is a layer of abstraction above the OS and not a direct mapping to the hardware.


All times are GMT. The time now is 16:57.

vBulletin® Version 3.8.8