thomas41546
Posts: 10
Joined: Tue Nov 29, 2011 4:04 pm

Re: SDL for PyGame without an X server

Tue Nov 29, 2011 4:15 pm

Since Raspberry Pi is limited in ram and the X server does not have the proper drivers written for yet it, then it would make sense to have some way of writing games for the console frame-buffer.

First we need to have a compilable framebuffer driver loaded by the Kernel. It probably exists, seeings as the Quake Demo had used something similar.

Then we will need to compile SDL with fbcon and with directfb support.

Finally, we would export one of the following Environment variables:
export SDL_VIDEODRIVER=fbcon
export SDL_VIDEODRIVER=fbdev
export SDL_VIDEODRIVER=directfb

This should allow us to use SDL in the framebuffer. So now it should possible to write games in many languages that SDL supports, such as PyGame for python, C/C++ support, along with many others.

thomas41546
Posts: 10
Joined: Tue Nov 29, 2011 4:04 pm

Re: SDL for PyGame without an X server

Fri Dec 02, 2011 1:15 am

Bump! Isn\'t anyone interested in getting SDL working with Rasberry PI???! SDL would be great for making games!

Point3Forever
Posts: 35
Joined: Wed Nov 02, 2011 12:15 pm

Re: SDL for PyGame without an X server

Fri Dec 02, 2011 2:35 am

I\'m fairly certain that sdl already runs on similar hardware to the R-pi, such as the beagleboard.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: SDL for PyGame without an X server

Fri Dec 02, 2011 7:56 am

I have an alpha board and have successfully run SDL applications (The Ur-Quan Masters) directly on the framebuffer without modification.

User avatar
Luny
Posts: 113
Joined: Tue Nov 29, 2011 12:29 pm
Location: Ewell, Surrey
Contact: Website

Re: SDL for PyGame without an X server

Fri Dec 02, 2011 9:14 am

But surely a Raspberry specific would be better, with use of the video chip etc. I wish I had the time. I\'ve written an SDL API for some hardware at work a long time ago and would love to do it again. But time etc :(
Luny

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: SDL for PyGame without an X server

Fri Dec 02, 2011 1:50 pm

[quote]Quote from asb on December 2, 2011, 07:56
I have an alpha board and have successfully run SDL applications (The Ur-Quan Masters) directly on the framebuffer without modification.[/quote]

Oh my goodness. That is by far one of my favorite games ever. I actually bought it back when it was Star-Control 2 and it came with a giant map. I actually took the time to color the stars, note rainbow world location and places of special interest. I added quite the legend to that map of custom markings I put on it. I still bust that map out and hang it on the wall when ever I play.

To end my off topic gushing here\'s a link to the ur-quan masters site. I highly recommend this game for anyone who hasn\'t played it yet!
Dear forum: Play nice ;-)

merlz42
Posts: 25
Joined: Sun May 13, 2012 1:19 pm

Re: SDL for PyGame without an X server

Wed Nov 07, 2012 1:10 pm

try this python code in your pygame program (don't have X11 running when you start it):
import os
os.environ['SDL_VIDEODRIVER']="fbcon" # could be "directfb", try "aalib" for extra fun

#pygame code goes below

User avatar
RaTTuS
Posts: 10532
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: SDL for PyGame without an X server

Wed Nov 07, 2012 1:24 pm

11month necro!
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “General discussion”