Welcome, Guest
Username Password: Remember me

Raspberry pi
(1 viewing) (1) Guest
Post up suggestions for SwinGame including feature requests, bugs, or other things you would like to see at this site.
  • Page:
  • 1

TOPIC: Raspberry pi

Raspberry pi 4 years, 8 months ago #114

  • dan3008
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi
I dont know if youve seen this (www.raspberrypi.org) but its a single board computer, that i feel has a lot of potential.
I just wondered if it would be possible to port swingame to it, or if i'm going to have to learn python and use pygame (the most popular game library for the pi

Just thoughts, specially since the point of the pi is to get kids into programming

Dan

Re: Raspberry pi 4 years, 7 months ago #130

  • adammw
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
I've had a go on my Pi, the stumbling block is SGSDK is built with Pascal, and the Pi has problems with pascal. It should be theoretically possible, I've seen SDL work on it (using Direct frame buffer access).

Re: Raspberry pi 4 years, 7 months ago #134

  • acain
  • OFFLINE
  • Administrator
  • Posts: 57
  • Karma: 8
Looks like you should be able to install fpc.

www.raspberrypi.org/phpBB3/viewtopic.php?f=2&t=5376

SwinGame does work on ARM, so it should be able to compile...

cheers,

Andrew
--
Kind Regards,

Andrew Cain
Lecturer, Faculty of ICT,
Swinburne University of Technology
PH: +61 3 9214 5324

Re: Raspberry pi 4 years, 7 months ago #135

  • dan3008
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Ah, thats worth knowing. I'll have a look at that and have a play. Never behad much of a play with pascal, but i might have to now lol.

Re: Raspberry pi 4 years, 7 months ago #136

  • adammw
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
fpc installed correctly from apt-get, but running ./build.sh on the Swingame source code 3.01 produces:

--------------------------------------------------
          Creating SwinGame Dynamic Library
                 for Linux
--------------------------------------------------
  Running script from /home/adam/ProjectTemplate
  Saving output to ./bin/linux
  Compiling with -O3 -fPIC -Sewn -vwn -dSWINGAME_LIB
--------------------------------------------------
  ... Using SDL 1.2 Driver
  ... Compiling Library
Error compiling SGSDK
Free Pascal Compiler version 2.6.0-4+rpi2 [2012/07/23] for arm
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling ./src/SGSDK.pas
Compiling ./src/sgTrace.pas
Compiling ./src/stringhash.pas
Compiling ./src/hashtable.pas
Compiling ./src/comparable.pas
comparable.pas(92,62) Fatal: Internal error 200502052
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled)


Not exactly sure what that means...

Update: Solved that problem, see bugs.freepascal.org/view.php?id=19729 (You can't use -fPIC on arm processors)
The build script doesn't use EXTRA_OPTS on iOS, but does on Linux, so -fPIC gets included and screws up the compilation.

I also got another error after removing -fPIC because I was missing some of the required libraries and header files.
For reference, I needed to install: libsmpeg-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev and libsdl-ttf2.0-dev
Last Edit: 4 years, 7 months ago by adammw.

Re: Raspberry pi 4 years, 7 months ago #137

  • adammw
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Yes SwinGame does work on a Raspberry Pi. But only very slowly...

youtu.be/gBZL0E_dd-4

With the Hello World Template, I'm getting 10 FPS on a white blank screen, using 100% CPU. Obviously, needs some optimisation.
Last Edit: 4 years, 7 months ago by adammw.
  • Page:
  • 1
Time to create page: 0.13 seconds