Brian Beuken
Posts: 421
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: 4920
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: 421
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: 421
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: 4920
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: 421
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: 421
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: 421
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: 421
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: 421
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: 421
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: 421
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: 421
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: 421
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: 421
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

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

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

Sat Nov 13, 2021 5:15 pm

Apologies for a lack of updates recently, not gone away, but did have a short holiday, and now entering a period of data inputting that is both tedious and unremarkable in terms of showing anything, not helped by the fact that mid way through I realised I'd missed some data, and had to restart.

Pointless videos of lots of ships will be returning soon. This is probably the most pointless video yet but it shows what I'm doing.

Ships that have some rotational/positional animation on things like turrets, need to have reference points to allow the code to move/point them. That requires some identification of the object to isolate its MV matrices and let the shader display them the way the code expects them. Its also complicated by the fact some ships have multiple instances of the same section but in different locations/rotations that have to be accounted for when they are instanced in the final render updates. At the moment I don't instance render... which causes some gpu lag, but its better to fix later when all is done than patch now.

Its easily the most tedious task yet, and every ship takes a few hours to set up at the moment depending on how many moving units it has, maybe a day for the big 20+ turret ships (I haven't worked out a good way to automate this, despite spending a lot of time on a beach sipping cocktails trying). There's currently over 100 ships...so... yeah,, tedious and boring, but without automation I just gotta get down to it. I'll keep pondering, but I'm getting a bit faster doing it manually.

But heres the 1st test video of the processs... isloating and animating individual sections of a ship,. The turret and rear wheel now move independantly according to values sent by the code (just spinning for test though) If you're extra observant you'll notice I messed up the lighting on the moving units, but i have since fixed that.

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

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

Sun Nov 14, 2021 2:36 am

and a bit more work on a larger ship with more moving points

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

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

Thu Nov 18, 2021 4:34 pm

and a few more examples of big ol ships
tbh its taking too long to enter all the gun turrets using a trial and test/fix system, so I'm putting a few animation hooks in place to allow me to output the animated objects ID's and positions that will let me get to it a lot easier.. he said hopefully.

But overall as long as I have a couple of guns in place I can move on to battle strategy and movement, adding more guns a few at a time when I need to find things to do.
I really can't wait to get the 1st battles underway and watch the particle, targetting, animation and lighting systems all working together instead of individual testing

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

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

Sun Nov 21, 2021 3:50 pm

Lets get the big guys moving....small bug in the gun placements when moving but its an easy fix


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

oh and small point, running now on Bullseye with no real issues, though there was a small slowdown, which I compensate for as best I can, hopefully that will resolve itself in later updates.

I fixed the guns and put the lighting back on, to make her even more imposing.

https://youtu.be/hokGjDoD-r8
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

Tarlexon
Posts: 5
Joined: Mon Feb 22, 2021 8:22 am

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

Mon Nov 29, 2021 10:14 pm

I think you are moving in the right direction. It would be great to have a meeting of like-minded people. I can use an online ticket maker to make pretty invitations, rent a room and all. Such meetings allow you to exchange ideas and get creative.
Last edited by Tarlexon on Wed Dec 01, 2021 12:00 pm, edited 1 time in total.

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

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

Tue Nov 30, 2021 10:25 am

not quite sure what you mean by this post, did you answer the wrong thread?
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”