Shooting Range game - school project


I took (for free) three kids from a secondary school under my supervision for the last two weeks and I introduced them babylon.js. They knew the basics of C (the language they learn at the school) but basicaly we started to learn programming from scratch.

I introduced them the wonders of 3D and from this:

we made to this together:

Duckie: 1 point
Bunny: 2 point
Bandit: 5 points
Shamrock: -5 points
Ammo: +5 ammo

Point multiplier gets higher by distance from the shooting range.

It was quite a hard experience for me to explain the unexplainable (from objects through rays to quaternions… OMG). The code is very simple and is very far from good :smiley: I didn’t want to feed them advanced techniques so a lot of globals and parameterless functions… :see_no_evil:

It’s not finished, maybe there are some bugs as well, however Enjoy!


Quack :duck: :grinning:

Now I want “Duck people” for my game.


Could different difficulty levels be added? I can’t handle this try-hard level at all. :slight_smile: I need something more arcade-like with fun-points. So that I win all the time and have fun. :smiley:

1 Like

I think the trees could use some decimation or downgrade. They almost melted my GPU :melting_face:

1 Like

I played way too long with it.

1 Like

You can change the configuration variables at the top :slight_smile:



Hint: Line 501: treeCount :smiley:

Yes, actually there are many many things I had to skip while teaching the kids. I mentioned them that vertex/face count affects the FPS a couple of times but I was the only one running at ONLY 120 FPS with my Macbook Pro m1 max LOL, everyone else was running at higher framerates, even at 240 so I didn’t bother to decimate the tree geometry (The trees are instances at least) and honestly it was quite pain in the ass to find free assets so we cooked the soup with the available ingredients. Nowadays every damned so called FREE website/No credit card required is a big bullshit and after tens of minutes of browsing the site and choosing the right assets it spits you in the face and it watermarks the assets/or requires a payment.

There is a site: Assets · Kenney with really free assets but there are bundles and you have to edit the big bundle file and copy out the stuff you need and we hadn’t time for that.

1 Like

Don’t even mention it… I can shoot the ducks with closed eyes already :crazy_face:

1 Like

It’s strange that thoughts come to my mind that I later find again here in the forum in current posts. e.g. the one about turning the paper and now this: from zero to hero :smiley:

As far as the game is concerned: I definitely need more weapon power! :smiley:

1 Like

Feel free to add a minigun :smiley: