Thursday 31 August 2017

testing video

here's a short video to demonstrate a simple Line of Sight occlusion system.
I'm just trying out my video capture unit at the moment, no sound as yet though. I need to find a small mic to put sound in it


Since there's no sound, I'll explain, each character becomes the target of a ray cast from the player (which would normally hold the FPS camera), if the Ray hits the character it is white and the character displays. If a wall gets between the the character and the ray, the ray turns red to indicate it hit a wall and the character is not drawn, saving quite some amount of GPU time.
One character is actually being detected but not displaying, I'm not actually sure why, some small bug somewhere I suspect.

The system is pretty basic, and only a single ray is firing, for total accuracy you would fire at the extreme corners and only exclude the model if all 4 rays hit the wall. But ray casts on this are not cheap, so if you can get away with one, its better.

The ray is always being cast wherever you are in the map, to indicate that the draw system for that model is indeed still running but not drawing. A Distance or Frustum cull would probably also be used before a ray cast was done to reduce the amount of maths being done.



Wednesday 30 August 2017

Something different

And maybe misjudged, but I saw this on Gear Best and thought I'd give it a go.

Not an SBC in the usual sense, though it is in fact, but a TV box, designed to be used for KODI and other streaming systems, but at its heart it is a pretty nice SBC


Its an Octocore Amlogic S912 which in itself is impressive, but also its gpu is an even more impressive  ARM Mali-T820MP3  . Now that's a very modern GPU capable of ES3.2 and Vulkan coding, I only have a few units that can do 3.1 so 3.2 is quite a leap.

Its got 3GB RAM and 16GB eMMC as well as the usual connectors, and has dual boot Android and Linux, so....in theory at least, drivers permitting I should be able to code this, and if it pans out it could be one of the more powerful units in my collectiom. 
Or it might indeed just be a small Kodi or streamer box to sit behind my TV. We'll see I am curious to know if I can extend my remit to include such tv boxes, as progammer learning tools.

In keeping wiith my under $100 mantra it only cost $82, with a remote as well,  including the postage..there might be some duty when it arrives but we'll see.




Friday 25 August 2017

New board, feel the power

Well this is going to be a fun new toy,  today I took delivery of an Up2 (squared) board which I backed in a kickstarter some time back.
This will be my 1st intel based SBC so Im very curious to see how it performs. I went for the cheapest one to try to stay under my 100 euro limit, its actually 102 euros, but that includes the postage.

1st impressions are its a bit of a beast, the heat sink on it is massive and makes it quite heavy but it is passive, no fan, so I'm hoping it does its job an keeps the chip cool.
The cheaper version I went for is a dual core celeron 2GB memorywith 16GB eMMC its about twice the size of a RPi, and the free case I got with it, though a little loose keeps it all in a nice box.

I have a couple of different power units but this one needs 5-6 amps an a wide barrel jack, In think I have one here, if not I can get one.

I will try to do it this weekend, if not I will have to put it away for a bit.

But I am quite excited, on paper at least it should be considerably more powerful than any other board I have, even the Odroids, Its GPU has I believe 12 cores/pipes that will reall give graphic programming a boost, but I will be amazed if there are drivers easily available, but we'll find out soon.




Thursday 24 August 2017

Video's soon

I've ordered a nice little HDMI video grabber which should arrive soon, so that I can take videos of the games and demos running on the various kinds of Pi. Should be more instructive than the simple screenshots. I couldn't find a software solution to it, like rasp2png but for video, so went the hardware route. I hope it works ok.

I'll post a few here, most mostly they will go on the scratchpadgames.net website in support of the book.

Which is still in editing mode, some friends have been proof reading it and finding lots of missed spelling and grammar mistakes. So far nothing technical, but I'm sure there are a few errors that will slip past.

As well as the editing I'm getting the source code, clean and ready for download, and will then get the final polished versions of the games up and ready.

I must confess I'd lost a lot of my enthusiasm in the final weeks, getting the book out, there's still much I wanted to put in there but page count limits just stopped me dead and it became more of a chore to limit the content than to write it,. But setting up the website is giving me back some of that fun as I transfer more complex topics to the site.


Tuesday 8 August 2017

Done....kinda

The book is DONE!!!

well done in the sense that I don't think I can add any more to it, now we start a short editing phase, where I fix things that are wrong, or have become disconnected due to moving things around. 
Also some screen shots need retaking as pasting them into word resulted in a resolution reduction but as far as writing and content are concerned Im done.

If I am 100% honest, I wanted to do more, but where do you draw the line? Its probably going to be 850 pages when it hits the shelves,  I can't detail every single type of game.. I have literally cut, 300+ pages of game listings and stuff I was going to use,  and will post somewhere on my website when I clean it up. but the book needs to be readable, and 1250+ pages would be too much.

I start at hello world and by the end the reader should be able to create any 2D game they can dream up and be able to do a fully immersive 3D game and be capapbe of doing more if they get the foundations right.. I hope they get it.


Its been a long trek, and an interesting one, I discovered a lot about SBC's the Raspberry in particular, its such a fun  machine to code I just don't know why people are not pushing their games on it.n so much more satisfying to see your games take shape with your own efforts rather than an engine.

Maybe the book will make a small change there.


Normal updates on new machines and some game samples will now resume.

Tuesday 1 August 2017

The next day or so..

The book will finally be done, its been one helluva ride, and right at the death I've had a major unfixable problem with a model (need the artist to fix it) but I have been completing the write ups on some of the more technical aspects of the code

Physics and terrain  collision for example


Here's an example of a tile based environment with full terrain collision in place, and a god camera to view it all. It chugs a bit since the wireframe draws are painfully slow, but its a debug option.

Animations, culling, lighting, cameras,  shadows in shaders, and other bits all done so I'm just waiting for a model fix to finish it all off.

Its a lot of work, perhaps I didn't get quite the gameplay in there I  wanted but thinking about it, explaining how to write a particular game wasn't the idea, explaining how to write multuple games using the techniques explained makes more sense.

I hope this model I need gets fixed asap, or I will have to find an alternative way to explain a final point...or scrap it and wrap it up.