Welcome, Guest. Please login or register.

Author Topic: Amiga Boing ball for Raspberry PI  (Read 3389 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bbond007Topic starter

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show all replies
Amiga Boing ball for Raspberry PI
« on: November 02, 2012, 12:08:49 AM »
I don't know if anyone is interested in this or not...

The classic "Boing Ball" for the Raspberry PI!

Like the original, it takes advantage of the hardware :)

It uses direct hardware acclerated ELGS and the OMX sound API so it only works on Rapberry PI.

default sound is headphone jack..

RaspPIBoing.bin HDMI

or

RaspPIBoing.bin NONE
« Last Edit: November 02, 2012, 02:58:52 AM by bbond007 »
 

Offline bbond007Topic starter

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show all replies
Re: Amiga Boing ball for Raspberry PI
« Reply #1 on: November 02, 2012, 04:14:55 AM »
I updated the EXE to try and clean up the sound when using the heaphone option.

It did not seem to help, however, I did make the audio a little more efficient.

The HDMI sounds great so it may be down to a buggy driver. I noticed the same issue with other programs. I could try different sample rates to see if it makes a difference but if i go too high the EXE won't fit on the forum.

Actually, this is like my "Hello World" type program on the PI, so I will probably just move on to something more interesting :)
« Last Edit: November 02, 2012, 04:17:00 AM by bbond007 »
 

Offline bbond007Topic starter

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show all replies
Re: Amiga Boing ball for Raspberry PI
« Reply #2 on: November 02, 2012, 03:08:28 PM »
Quote from: som99;713592
I agree, the source would be fun to look at :)


I was going to put the sources in the tar.gz, but it would not fit ithe size limit, I converted the wav to c array which really bloats the source.. maybe i can put it on github or something when i get home from work...

the ball is drawn with as one GL_TRIANGLE_STRIP array which is no big deal, but I also did the same thing with the grid this time using surface culling in such a way that the lines of the grid are not conencted...

I took the bouncing logic from another boing ball thing I found on the internet. Wish I still had that original source.

EDIT:  found it, here is the original project that I borrowed a lot of the logic from.  

http://www.jimbrooks.org/web/opengl/boing/
« Last Edit: November 02, 2012, 04:37:33 PM by bbond007 »
 

Offline bbond007Topic starter

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show all replies
Re: Amiga Boing ball for Raspberry PI
« Reply #3 on: November 02, 2012, 03:38:58 PM »
Quote from: som99;713592
I agree, the source would be fun to look at :)


ok. here is what I did in order to make the source under the 97.7k file size limit:

I got rid of soundraw.c which can be recreated by running the included script "convertwav16.sh"

you'll need mplayer installed.
« Last Edit: November 05, 2012, 11:05:54 PM by bbond007 »
 

Offline bbond007Topic starter

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show all replies
Re: Amiga Boing ball for Raspberry PI
« Reply #4 on: November 02, 2012, 04:30:26 PM »
Quote from: gaula92;713585
Very interesting!
Of course, I also would like to peek at the sources, as I'm experimenting with Pi myself and accelerated 2D without X is just what I'm looking at :D


maybe look at the sprite example in ths
gles2framework

https://github.com/chriscamacho/gles2framework


the phystest one is really cool. i'm going to try and replace the spheres with boing balls :)
 

Offline bbond007Topic starter

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show all replies
Re: Amiga Boing ball for Raspberry PI
« Reply #5 on: November 05, 2012, 06:00:57 PM »
I have updated the Raspberry PI Boing demo to optionally run on the desktop.

the technique uses eglCreatePixmapSurface() to render the view off-screen.

there is a bottleneck with how it currently works because the X11 server runs 16bpp and the rendering is done in 32bpp. You can read more about that on this thread:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=6488

Anyway the parameters for the sound remain the same (none/hdmi)

I have added a parameter for X11 (x/X)

X = 640 * 480

x = 320 * 240

EDIT: (new home for this project)

https://github.com/bbond007/RaspPIBoing
« Last Edit: November 05, 2012, 11:10:09 PM by bbond007 »