maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Slingshot, awesome python game (https://talk.maemo.org/showthread.php?t=50975)

白い熊 2010-04-25 06:34

Slingshot, awesome python game
 
Check it out, this game is really awesome, gravity and stuff:
http://slingshot.wikispot.org/Screenshots
Just try it, you'll see...

Why doesn't it run on the N900, I mean with python-pygame installed, it loads and just exits, even verbose python mode doesn't give any errors, just files are loaded then exited without a sigh.

Thought it's because it has a slightly higher resolution at 800x600, but doesn't throw an error, even tweaked it, editing source to 800x480, but still nothing, just a quiet exit.

Anyone can try and debug what's going on?

F2thaK 2010-04-25 06:48

Re: Slingshot, awesome python game
 
yeah, pretty cool game, needs p2 to be controlled by computer or person..

白い熊 2010-04-25 06:57

Re: Slingshot, awesome python game
 
I just play both sides, it's still very entertaining.

We need to figure out how to get it running on the N900, shouldn't be hard, it's got the needed python and python-pygame.

It would be ideal for the N900.

noobmonkey 2010-04-25 07:17

Re: Slingshot, awesome python game
 
hmmmm trying it, but getting a few issues......
Should just run, but crashing out at some point - will have a play and see where i get.

白い熊 2010-04-25 08:10

Re: Slingshot, awesome python game
 
Quote:

Originally Posted by noobmonkey (Post 626722)
hmmmm trying it, but getting a few issues......
Should just run, but crashing out at some point - will have a play and see where i get.

Yeah, mine closes silently, when running python verbosely, I see:
Code:

# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpymodule.so
# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpy.py
# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpy.pyc
# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpy.pyo
#  clear[2] __name__
#  clear[2] __file__
#  clear[2] __doc__
#  clear[2] pygame
# trying /usr/lib/python2.5/site-packages/pygame/sndarray.so
# trying /usr/lib/python2.5/site-packages/pygame/sndarraymodule.so
# trying /usr/lib/python2.5/site-packages/pygame/sndarray.py

whereas on the PC python doesn't clear __name__ etc. at this point. Later on also:
Code:

# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpymodule.so
# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpy.py
# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpy.pyc
# trying /usr/lib/pymodules/python2.5/gtk-2.0/numpy.pyo
#  clear[2] __file__
#  clear[2] mixer
#  clear[2] pygame
#  clear[2] __name__
#  clear[2] __doc__
# trying /usr/lib/python2.5/site-packages/pygame/fastevent.so
dlopen("/usr/lib/python2.5/site-packages/pygame/fastevent.so", 2);
import pygame.fastevent # dynamically loaded from /usr/lib/python2.5/site-packages/pygame/fastevent.so
# trying /usr/lib/python2.5/site-packages/pygame/copy_reg.so

which doesn't happen on a PC, and then when the menu is supposed to be shown:
Code:

# trying /media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/menu.py
# /media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/menu.pyc has bad magic
# /media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/menu.pyo matches /media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/menu.py
import menu # precompiled from /media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/menu.pyo
# cleanup __main__
#  clear[2] K_KP_MINUS
#  clear[2] GL_STEREO
#  clear[2] SCRAP_PPM
#  clear[2] K_PAUSE
#  clear[2] BLEND_MULT
#  clear[2] YV12_OVERLAY
#  clear[2] K_F6
#  clear[2] K_F1
#  clear[2] K_F8
#  clear[2] K_F9

as if Esc was pressed in a normal exit.

白い熊 2010-04-25 08:53

Re: Slingshot, awesome python game
 
OK, getting somewhere, in ~/.slingshot/logfile.txt I get:
Code:

/media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/planet.py:60: DeprecationWarning: integer argument expected, got float
  self.orig = pygame.transform.scale(self.image, (s, s))
Traceback (most recent call last):
  File "slingshot.py", line 852, in <module>
    if __name__ == '__main__': main()
  File "slingshot.py", line 850, in main
    game.run()
  File "slingshot.py", line 762, in run
    self.draw()
  File "slingshot.py", line 393, in draw
    self.players[self.player].draw_line(self.screen)
  File "/media/0/kumatux.org-apps/slingshot_0.8.1p_jj_2010-04-24-220555_fremantle_all/bin/player.py", line 191, in draw_line
    pygame.draw.aaline(screen, self.color, (sx,sy), (sx + self.power * math.sin(math.radians(self.angle)), sy - self.power * math.cos(math.radians(self.angle))))
ValueError: unsupported bit depth for aaline draw (supports 32 & 24 bit)


fmo 2010-04-25 09:13

Re: Slingshot, awesome python game
 
Looks like it's not meant to run with a 16bits framebuffer

白い熊 2010-04-25 09:35

Re: Slingshot, awesome python game
 
Quote:

Originally Posted by fmo (Post 626784)
Looks like it's not meant to run with a 16bits framebuffer

It will, I just got it to run, it's great on the N900. Hang on a while, I'll post the modified game. Just need to iron out a couple more things, like program Q to be the Esc, and the KP_Ret to act as Enter, so you can use it comfortably on the N900.

白い熊 2010-04-25 10:24

Re: Slingshot, awesome python game
 
I've uploaded the modified app, and instructions how to use it.

http://sumoudou.org/%E7%9B%B8%E6%92%...ia%20N900.html

Enjoy!!!

白い熊 2010-04-28 22:49

Re: Slingshot, awesome python game
 
I've modified the game further, to fit the N900's screen perfectly, now having proper resolution display, displaying the countdown to timeout etc.

Get the version 0.8.1p-r2 at: http://kumatux.org/Applications.html


All times are GMT. The time now is 08:08.

vBulletin® Version 3.8.8