Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Seeking interest and support in a game designed for Rpi

Wed Jan 06, 2021 11:12 pm

I've mentioned this elsewhere but I didn't want to push it too hard, but think I'm at a stage now where I can make it a bit more public and see if i can get some support from the Pi community,

I'm working on a full scale Rpi game (Rpi4, but am attempting to keep it Rpi3 compatible) which is being written from scratch in C++ using OpengLES2.0/3.x to really show what the Rpi is capable of.

Its still early days but things are starting to take shape, and I have some proof of concept stress tests and frame work code up and running now, I am hoping to complete the project in the spring/summer of 2021 and will make it availialbe as freeware to all Pi owners.

I'm doing this for 2 reasons, so if you don't agree thats fine, but it won't change my reasons and determination to do it.
1 I want to see the Pi being used to develop proper game dev projects. As much as I love retro gaming, and respect the Python and scratch communities, the Pi can do better. The foundation has created a machine that is capable of impressive things, and its sadly often relegated to media players and robot contollers, all of which are great uses, but....... I aim to show that you can do much more and get people to jump in and have a go themselves.

2 I'm doing it to encourage my students as well. I teach game programming at one of the best game dev universities in the world Breda University of Applied Sciences, I give them Rpi projects each year and some of the amazing work they do is very inspiring but they never continue with the projects, because there just isn't any way to get people interested in "silly" games.

I'm funding this myself, wherever possible I am using free assets. but I have commited to spending some money on art, because, trust me, you don't want to see my programmer art..

I want to ask for your help, your support and your encouragment and maybe a bit of financial backing... I've set up a patreon page at www.patreon.com/BrianBeuken, where you can see the progress I've been making, and will update that regularly.

If the game interests you or even the process of the game being made is interesting please sign up, even if only to buy me a much needed coffee or 2, it is all appreciated. Even if you don't want to support this financially, follow the progress, be a tester, help with language localisation or other things.. the more people I feel are behind me the better and the result will be something really nice for the Pi community.

thanks
Brian
www.patreon.com/BrianBeuken
Last edited by Brian Beuken on Fri Jan 08, 2021 6:58 pm, edited 1 time in total.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

DarkElvenAngel
Posts: 2931
Joined: Tue Mar 20, 2018 9:53 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 3:50 am

In the words of James Veitch "I'm in!"

I agree the raspberry Pi is a very powerful bit of kit and your project reminds me of the old demo scene pushing the hardware to the limit ideals. I look forward to seeing what you can come up with.

Good luck with the project!

User avatar
Gavinmc42
Posts: 8136
Joined: Wed Aug 28, 2013 3:31 am

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 4:37 am

This is what can be done with the older VC4 Pi's
viewtopic.php?f=68&t=214695

Lots of things just work now on Pi4, including VulkanSceneGraph.
So new it only has a few examples so far :(

For years I have wondered why nobody has done much in the gaming area.
The tools are now there and working, everything can be done on the Pi.
Still looking for a good native gltf 3D modeler, most are exported using plugins.

Being a lazy modeler I am trying to get this to work on my Pi and see if it can do other stuff besides spaceships.
https://github.com/a1studmuffin/SpaceshipGenerator

The procedural tree example in Panda3D has go me hooked on procedural coding.
No Man's Sky on Pi :D
Procedural buildings as well?

Water effects works on Pi in the browser using WebGL
https://experiments.withgoogle.com/webg ... simulation
Trying to get that into a game is getting me into learning GLSL coding, not easy.

There is lots of 3D art around, more than I expected.
Someone who was any good could make some pocket money doing that?

This just popped up, can PBR be done in Vulkan on Pi's?
https://gfxspeak.com/2020/12/03/physica ... xtensions/
Works in the browser.

That has got me thinking why not do a game in WebGL?
That's the main reason I want to stick with gltf 3D modeling.
A Pi could serve 3D games to Smartphones. Multiplayer ones?

Too much to learn.
Will watch your progress.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cleverca22
Posts: 8755
Joined: Sat Aug 18, 2012 2:33 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 5:29 am

i have also gotten 13 high resolution sprites out of a pi in baremetal with basically zero cpu usage
dont have it on video, but i was able to push it to 170 with a much smaller image

thats entirely done with the 2d subsystem, no 3d involved at all
and the 2d subsystem is always on when driving a display, so its basically free, compared to the extra power draw of the 3d subsystem

but it depends on if your goal is to get the most compute out of the whole device, or get a lot of compute with very little power draw

User avatar
Gavinmc42
Posts: 8136
Joined: Wed Aug 28, 2013 3:31 am

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 5:38 am

i have also gotten 13 high resolution sprites out of a pi in baremetal with basically zero cpu usage
Was that on the Pi4?
I have used OpenVG baremetal on the VC4 Pi's, was told cannot use that on the VC6.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cleverca22
Posts: 8755
Joined: Sat Aug 18, 2012 2:33 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 5:40 am

Gavinmc42 wrote:
Thu Jan 07, 2021 5:38 am
i have also gotten 13 high resolution sprites out of a pi in baremetal with basically zero cpu usage
Was that on the Pi4?
I have used OpenVG baremetal on the VC4 Pi's, was told cannot use that on the VC6.
pi3, and i expect it to function just as well on pi0, but i need to deal with armv6 first

User avatar
Gavinmc42
Posts: 8136
Joined: Wed Aug 28, 2013 3:31 am

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 5:57 am

Never noticed any speed difference on the Zero for 2D.
Was working on a nearly baremetal OpenVG based Desktop/OS when the Pi4 distracted me.
Attachments
PunkOS1.jpg
PunkOS1.jpg (200.15 KiB) Viewed 32906 times
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 8:14 am

There's no question that the Pis GPU on all models, is capable of a decent level of graphic "quality", the biggest issue is that its not really capable of the level of "quantity" modern games demand.

Which is why coding a performance based game for the Pi needs to work around that fact. Claims of millions of polys shifting per frame are of course accurate under lab condition with correctly aligned and fully contained poly buffers. But thats not possible in a fast moving game with massive numbers of individual objects demanding render time. So you have to factor in a much reduced poly budget and a feed to the GPU that keeps it focused on rendering while the CPU does its thing.
The CPU itself is more than fast enough for almot all games its only getting the data to the GPU and letting it get on with it that tends to be the bottleneck.
Memory is also a bit of a choker and thats why I'm not making a lot of effort to target the Pi0, I need to give as much to the GPU as I can, though I did have it working on that, I can't really handle the 30mins it take to compile on it as a viable target... I'll maintain a Pi3b/b+ build as long as its viable but I really need to make use of OpenGLES3.0 to get the best performance, so some features will either be dropped or severely reduced on the Pi3.

So thats what I'm working on, so far on the menus I can do lots of nice effects with no real stress, the main gameplay sections will start coming next week and thats where the variable numbers of polys and bottlenecks start to come into play. I've updated my Patreon about page with some details of what the game is/hopefully will be and I'm going to be working about 20hrs a week on it with regular updates there.

Watch this space :D And please consider becoming a Patron, more pennies means nicer art can be purchased.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

cleverca22
Posts: 8755
Joined: Sat Aug 18, 2012 2:33 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 8:50 am

Brian Beuken wrote:
Thu Jan 07, 2021 8:14 am
Which is why coding a performance based game for the Pi needs to work around that fact. Claims of millions of polys shifting per frame are of course accurate under lab condition with correctly aligned and fully contained poly buffers. But thats not possible in a fast moving game with massive numbers of individual objects demanding render time. So you have to factor in a much reduced poly budget and a feed to the GPU that keeps it focused on rendering while the CPU does its thing.
having read the docs and attempted to make my own 3d drivers from scratch, i also understand the internals to a depth that may help with performance

basically, you have the vertex data array, which has xyz, uv, and other params
then you have the vertex index array, which is just a packed list of indexes into the 1st list, in sets of 3 (a triangle/poly)

the 3d hw isnt capable of reading the arm caches, so you must flush arm->ram
if you can keep the "vertex data array" (which is larger) unchanged, you could save time by having less data to flush

the 3d hw also has its own private cache, which you must discard, so it gets the most recent data

keeping the data and index in different pages could improve how much of a hit you take from discarding the 3d cache


there is also another latency fix that could be done, but requires help from the VPU firmware
in theory, you could map a say 64mb chunk of the arm's address space, via the VPU L2 cache (the pi0/pi1 did that for the whole space)
that would effectively turn it into an L3 cache, which is coherent with the VPU dma
so you would flush things out of arm-L1 and arm-L2, and if its within this magic 64mb range, it lands in VPU-L2 (effectively L3)
the 3d hw can then be configured to read thru the VPU-L2, and it can get cache hits
then you dont pay the latency for flushing something all the way to ram, then fetching it back out

but i dont know if VC6's 3d 64bit capable mmu gets in the way of that idea
and it requires the firmware to specially configure a chunk of the arm addr space before linux boots

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 1:12 pm

Thanks but for compatability reasons and to reach all the Pis and a few otherSBC's I'm sticking totally to OpenGLES2 and when viable ES3.0/3.1, I'm not getting too low level and so far its working fine, the only real issue with OpenGLES2.0 is the stop/start nature of feeding its buffers which I'm being careful to avoid doing during frame sensitive times. Its just a case of finding a good balance and what and when to do fake instancing or use memory base VBO's if the GPU VBO benefit is negligable.

I'm ok with how to use OpenGLES2.0 effectively, if I do too many Pi specific tricks I will certainly break the build so I'll keep going as I am until I get stuck.

One other thing I'm doing that is Pi specific is reducing the access to texture samples which for he shaders is the most wasteful system I can find, so I'm using my own texture packing system to provde diff, emmission and normals in the same texture.. I was trying to get that into the project on load but its better if I work on a tool to do it, it makes loading too slow.

anyway, onward and upward :D
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

cleverca22
Posts: 8755
Joined: Sat Aug 18, 2012 2:33 pm

Re: Seeking interest and support in a game designed for Rpi

Thu Jan 07, 2021 10:48 pm

Brian Beuken wrote:
Thu Jan 07, 2021 1:12 pm
Thanks but for compatability reasons and to reach all the Pis and a few otherSBC's I'm sticking totally to OpenGLES2 and when viable ES3.0/3.1, I'm not getting too low level and so far its working fine, the only real issue with OpenGLES2.0 is the stop/start nature of feeding its buffers which I'm being careful to avoid doing during frame sensitive times. Its just a case of finding a good balance and what and when to do fake instancing or use memory base VBO's if the GPU VBO benefit is negligable.
i'm not as familiar with opengl, but i am wondering if VBO's would allow doing some of what i said, keep the vertex data the same between frames, and only change which slots in the array your using

the other more experimental thing, would be more of a change to the os/firmware, to make all opengl better, and wouldnt live within the app itself

Puffergas
Posts: 255
Joined: Thu Dec 19, 2019 12:16 am

Re: Seeking interest and support in a game designed for Rpi

Fri Jan 08, 2021 4:37 am

I like what I'm reading. To be honest, I'm an anti-war type person. However, I'll over look that in order to learn some stuff that could be applied to a flight simulator. Thanks and keep it coming. I look forward to see the true power of a Raspberry in action. :D

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Fri Jan 08, 2021 7:40 am

cleverca22 wrote:
Thu Jan 07, 2021 10:48 pm
Brian Beuken wrote:
Thu Jan 07, 2021 1:12 pm
Thanks but for compatability reasons and to reach all the Pis and a few otherSBC's I'm sticking totally to OpenGLES2 and when viable ES3.0/3.1, I'm not getting too low level and so far its working fine, the only real issue with OpenGLES2.0 is the stop/start nature of feeding its buffers which I'm being careful to avoid doing during frame sensitive times. Its just a case of finding a good balance and what and when to do fake instancing or use memory base VBO's if the GPU VBO benefit is negligable.
i'm not as familiar with opengl, but i am wondering if VBO's would allow doing some of what i said, keep the vertex data the same between frames, and only change which slots in the array your using

the other more experimental thing, would be more of a change to the os/firmware, to make all opengl better, and wouldnt live within the app itself
yes basically a VBO once set up is consistantly in the GPU address frame so it can be reused many times and is faster to access than buffers that are in CPU space. they only need thier address pointers reset each call, and there are some tricks to allow you to avoid too many of those calls.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Fri Jan 08, 2021 7:45 am

Puffergas wrote:
Fri Jan 08, 2021 4:37 am
I like what I'm reading. To be honest, I'm an anti-war type person. However, I'll over look that in order to learn some stuff that could be applied to a flight simulator. Thanks and keep it coming. I look forward to see the true power of a Raspberry in action. :D
Yeah I understand, its a bit of a game cliche that you have to always have battles and wars. I will be allowing a fair degree of diplomatic expansion to occur but ultimately I think the idea of defense against an aggressor has to come into it.. Though I could arrange it that if enough defense is in place, an aggressor would not consider attacking...so in theory, a full diplomatic/colony resettling in peace style gameplay could come into effect. I'll have to see how it develops.

Im not sure how flight simmy it will be though, flying space ships is a more simplistic programming problem than flying aircraft :D
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

Puffergas
Posts: 255
Joined: Thu Dec 19, 2019 12:16 am

Re: Seeking interest and support in a game designed for Rpi

Fri Jan 08, 2021 6:33 pm

I need to confess that my personality likes to control when I donate. In other words, I don't like monthly charges. Also, I am on shaky ground, so to speak, there are personal issues in the future. However, after reviewing Patreon I decided to give it a try. Please don't take it personally when or if I cancel the donations, because of the above.

I guess some posts should be here and other post on the Patreon page.

Is your book still in print? Looks interesting, if it is the image at the top of your Patreon page.

Puffergas
Posts: 255
Joined: Thu Dec 19, 2019 12:16 am

Re: Seeking interest and support in a game designed for Rpi

Fri Jan 08, 2021 6:45 pm

Oh, this reminds me of the tools used in the "Logic of Failure" book.

https://www.amazon.com/Logic-Failure-Re ... 0201479486

Food for thought . . .

Games, are they all? :D

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Fri Jan 08, 2021 6:51 pm

Puffergas wrote:
Fri Jan 08, 2021 6:33 pm
I need to confess that my personality likes to control when I donate. In other words, I don't like monthly charges. Also, I am on shaky ground, so to speak, there are personal issues in the future. However, after reviewing Patreon I decided to give it a try. Please don't take it personally when or if I cancel the donations, because of the above.

I guess some posts should be here and other post on the Patreon page.

Is your book still in print? Looks interesting, if it is the image at the top of your Patreon page.
Im very grateful for any support, even if only 1 off, it buys a coffee, and programmer are machines that turn coffee into code, so genuinly thank you.
Yes my book is still in print, you can find it on Amazon or other bookstores, just search my name. It has been a little overtaken by the Pi4 though and updates to Raspbian, it was written for Rpi3. but its not too hard to adapt the concepts in there to Pi4 and I provide help on my website with Pi4 versions (though I do need to upate that soon)
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

User avatar
Imperf3kt
Posts: 4675
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Seeking interest and support in a game designed for Rpi

Sun Jan 10, 2021 10:39 pm

Brian Beuken wrote:
Fri Jan 08, 2021 6:51 pm
programmer are machines that turn coffee into code
Lol, thats almost the exact quote i use on my twitter account.

I support this and will be interested in how it turns out.
Currently I use Ren'Py to make more 'modern' games on a Pi, which works nicely.
https://magpi.raspberrypi.org/articles/ ... ine-review

I'm personally hoping to get the pigpio library working with it better.
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Mon Jan 11, 2021 9:15 am

Im trying hard not to promote the use of engines, its not that I'm totally against them, but they prevent new coders from thinking about the problems they have to solve and create an overhead that is hard to justify on a limited system like the Pi... that said I'm using a boat load of libraries to make my life a bit easier, but at least I am fully using the features they provide in the way i need them.

I just had a fun Sunday trying to get maths to work, it didnt' quite go as plan and there was quite a bit of head scratching and cussing, but I did manage to get my sector selection working in the end...but I will revisit it after a bit of a think.
Next step is to mine the information and visualise the zoomed in sectors......that sounds like another fun Sunday.


https://youtu.be/4fl8jDE2c0E


follow my progress on www.Patreon.com/BrianBeuken
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

ChilePepp3r
Posts: 4
Joined: Sat Aug 01, 2020 9:14 pm

Re: Seeking interest and support in a game designed for Rpi

Tue Jan 12, 2021 2:54 pm

I would love to see something like this! I'm a huge fan of native gaming on the Pi, so a cool new game would be fun :D

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Sat Jan 16, 2021 11:10 pm

In that case I hope to see you on my patreon page helping to make this possible :D

thanks
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Sun Jan 24, 2021 6:33 am

Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

cleverca22
Posts: 8755
Joined: Sat Aug 18, 2012 2:33 pm

Re: Seeking interest and support in a game designed for Rpi

Sun Jan 24, 2021 6:41 am

Brian Beuken wrote:
Sun Jan 24, 2021 6:33 am
Progress continues

https://www.youtube.com/watch?v=57rELwM ... rianBeuken
other then the low-res sun texture, that looks great, i'm also now reminded of the pive project (part 1 and part 2)
which was driving a whole dang htc vive from an rpi3

at a cost of double the gpu load (sorta half the fps), you could probably pull that off, and then you just need the tracking software...

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Sun Jan 24, 2021 7:40 am

yeh I will probably up the res of the sun, though I suspect in most cases I'm not going to be that close to a sun to really need it.

Keeping the GPU load under control is a big part of the render managment on Rpi
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

Brian Beuken
Posts: 527
Joined: Fri Jan 29, 2016 12:51 pm

Re: Seeking interest and support in a game designed for Rpi

Mon Jan 25, 2021 11:51 am

Im still debating the merits of increasing the Sun res as you won't normally get so close to it in game, but while I think about that, I added some lerping to the cameras look ats to heighten the sense of motion on a flythrough


https://youtu.be/KbpS3HCJn6c
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

Return to “Gaming”