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

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

Mon Sep 20, 2021 7:09 am

yeah I am shoving over a several hundred thousand poly's at the moment, with fully light shaders, far in excess of what I thought it would handle, the limit is there though, I am starting to see a few missed frames, so its time to bring in the LOD models and shaders as well as some fustrum and occlusion culling... but thats something I can do later...more controls and particles/bullets/explosions to do as soon as my brain fog clears.
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: 4647
Joined: Sat Aug 18, 2012 2:33 pm

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

Mon Sep 20, 2021 7:21 am

Brian Beuken wrote:
Mon Sep 20, 2021 7:09 am
several hundred thousand poly's at the moment
i must be missing some feature or trick in the gpu, or the pi4 changed things, because i only see support for 16bit indexes into the vertex data
so that means you have a hard limit of ~64k vertices, shared between all polygons

anything more would require some costly 2nd passes with the same shader and different vertex data, and now you get into draw order problems...

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

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

Mon Sep 20, 2021 8:54 am

I did some very (counting up drawcall counts) rough count. Im throwing about 700K tris in standard individual model renders to the GPU, and about 100K in instanced renders (asteroids/planets). I am going to switch the model renders to instanced, but at the moment each is different so its not really worth the effort until I have fleets of fighters and missiles. I really have a quite poor render system as I plan to overhaul it when I hit the limit as its a bit of a rabbit hole I want to avoid. I am going to put in some proper LOD models and shaders soon as well as some proper culling of the GPU feed.

Im not actually using indexed models at the moment, so not hit this limit (or actually aware of it) . Its on my list of improvments to fix later, as it should give a slight boost to performance. But I plan to do some deformation systems which are harder to do with element arrays so I left it, until I know if the deformation will work. Smaller simple models will certainly benefit from element array renders though, for 20-30% improvement based on some tests of simpler models.

Pi4 is OpenGLES3 so there's a considerable number of improvements in the GPU over the older Pi's Its considerably faster using VAO's
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Tue Sep 21, 2021 4:02 pm

That may well be, but as I say I'm not currently using index/element arrays, so I don't have such a restrriction and when I do use it it will mostly be for smaller models individually sent/instanced to the GPU so the limit is unlikely to be an issue.
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: 4647
Joined: Sat Aug 18, 2012 2:33 pm

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

Tue Sep 21, 2021 9:33 pm

that was a spammer copy/pasting my original msg, so he could get by the 1st-post moderation

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

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

Tue Sep 21, 2021 10:42 pm

ahh, I thought it was a slightly odd message. My brain is a bit frazzled at the moment, didn't connect it. :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

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

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

Wed Sep 22, 2021 6:46 pm

Finally got my lighting fixed, a few small errrors and a bigger error causing a semi working system. but its now fully working with diffuse/specular and emission lighting on near objects, then diffuse/emmission, then diffuse.. I also have some LOD geometry systems to add to that so that the GPU is not being taxed as much... Very happy with this.

https://www.patreon.com/posts/56479086


and for a litte more detail on how LOD shaders work
https://youtu.be/sBKY83ECqTg

and 1st renders from the cockpit view... this is the next cool thing to go in..this is step 1
https://www.patreon.com/posts/56489645
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Sat Sep 25, 2021 12:39 pm

Another lazy weekend, adding enemies... and a nice new shader pulse to suggest these organic looking ships (just space station for now) are alive


https://www.patreon.com/posts/56587882
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Sun Sep 26, 2021 8:33 pm

time to give our ships some weaponry

https://www.patreon.com/posts/56637276
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Thu Sep 30, 2021 8:45 pm

every game needs a few booms and bangsm I'll add some sound effects later, though of course such things are meaningless in space

https://youtu.be/WvoN6HbAGLQ
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Tue Oct 05, 2021 8:20 am

A significant bit of work now... dynamic lighting on the Pi4 represents quite a challenge, since the GPU can't really cope with a lot of lights, but I've worked out a reasonable way to allocate lights to ships as needed and let the cpu do a lot of the work.. quite happy with this, it was a challenging task
the debug lines are there for now to indicate the ships tracking of a light source and each ship can handle multiple lights depending on current frame rates.. if it gets too hard on the gpu it drops back a bit..

It will make a big difference to darker areas of space not flooded by sunlight.

https://youtu.be/ktWTp6BT-yw

also some idea of how impacts should look in game... (this is a bit set up but the idea is the same)
https://youtu.be/8F_2KFi9eLw
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Wed Oct 06, 2021 11:07 pm

Now to make the particles work for a living, over and above bullets and explosions, there are a small number of obj objects with transparency to produce various effects controlled by the particles, in the case of engine plumes, a particle is the anchor that allows the plume to position itself at a relative point from the ship and make use of the ships transform matrices to move with it.. the effect looks good, but I've still got work to do on it before I can do a moving demo. Currently I'm having to place them by eye, with several hundred ship types thats a bit more lunchtime twiddling than I want to do, so I'll set up an editor in game to tinker.

Image


Image
Image
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Sat Oct 09, 2021 11:53 pm

before they start fighting and moving around each other, I need to estabish some concepts of scale.. time to do come compares of ship sizes adn set up the right unit sizes for ships.

https://www.youtube.com/watch?v=P2VF0Sj ... rianBeuken
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Sun Oct 10, 2021 5:44 pm

Adding more races to the game, these yellow chaps are going to be a breakaway human race... hopefully allies rather than enemies.

https://youtu.be/J-63AT32rKM

Also managed to hook in some nice behavior code to allow me to give each ship type individual behavours and individual draw control to fire turrets etc.. still a few more steps to go, but we'll soon be flying around.
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: 410
Joined: Fri Jan 29, 2016 12:51 pm

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

Fri Oct 15, 2021 7:21 am

getting firing solutions ready to tie in with animations and projectile movment... won't be much longer before I can get them flying around shooting and blowing things up....though diplomacy and trade will also be key gameplay options

https://www.patreon.com/posts/57427912
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”