Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 34
» Latest member: EdwardSek
» Forum threads: 130
» Forum posts: 372

Full Statistics

Online Users
There are currently 8 online users.
» 0 Member(s) | 8 Guest(s)

Latest Threads
Game Development Process
Forum: General Chat
Last Post: Brian Beuken
12-03-2018, 06:27 PM
» Replies: 1
» Views: 194
David Jones creator of Fi...
Forum: General Chat
Last Post: Brian Beuken
11-30-2018, 11:09 PM
» Replies: 3
» Views: 146
the importance of culling
Forum: Assets, Tools, Libraries and other useful things
Last Post: Brian Beuken
11-28-2018, 11:31 AM
» Replies: 0
» Views: 95
Making maps is easier wit...
Forum: Assets, Tools, Libraries and other useful things
Last Post: jomoengineer
11-27-2018, 04:07 PM
» Replies: 1
» Views: 87
New Odroid on the way the...
Forum: Other SBC's
Last Post: Brian Beuken
11-21-2018, 10:09 AM
» Replies: 2
» Views: 334
[Chapter 05] Objects miss...
Forum: Fundamentals Errata/Questions
Last Post: Brian Beuken
11-20-2018, 09:36 PM
» Replies: 3
» Views: 319
Another new Raspberry?
Forum: Raspberry Pi questions
Last Post: Brian Beuken
11-19-2018, 08:52 PM
» Replies: 2
» Views: 152
missing Rand function/mac...
Forum: Fundamentals Errata/Questions
Last Post: Brian Beuken
11-19-2018, 08:27 PM
» Replies: 0
» Views: 75
[Chapter 05] KamaKazi Bas...
Forum: Fundamentals Errata/Questions
Last Post: Brian Beuken
11-19-2018, 08:15 PM
» Replies: 12
» Views: 443
Wireframe magazine — laun...
Forum: General Chat
Last Post: jomoengineer
11-16-2018, 11:52 PM
» Replies: 6
» Views: 626

Posted by: Brian Beuken - 03-13-2018, 05:31 PM - Forum: Assets, Tools, Libraries and other useful things - No Replies

The Mylibs examples are not intended to be do everything kinds of systems, its mainly a collection of all the general functions and utility classes we built up in the successive 2D projects which allows you then to contain them all in one static lib and avoid repeating files and classes.

You should really put the library in a standard usr dir on your target. I currently let it use a VGDB dir in the tmp dir, so it needs rebuilding as it will be cleared each reset of the target.

In development of the book, while making projects I included the Mylibs project in my game solutions. With hindsight this was not a great idea, as the library developed over the course of 3 or 4 games. So it contains much more than you probably need in the 1st few games, and some of the code you can see in there, is not discussed in the 1st few games that use it.  But it stands as a good example of how to make a user lib, which you can base your games on and add to as you build further games.

I removed the Mylibs Project from the solution files of games that use it, leaving you to either add it yourself as a project in the solution or more sensibly to build the Mylibs.a and include the directory in your project properties, remember also to include the header directories for it to use the library.

I don't use a lib in the 3D games, so that users can see the common concepts and build their own 3D lib for a series of games if they want to. Also A lot of that 3D code really needs to be optimized so I would not commit it to a library until that was done.

Print this item

  Jessie-> Stretch lib changes
Posted by: Brian Beuken - 03-08-2018, 07:49 AM - Forum: Raspberry Pi questions - Replies (1)

After the book was written Raspbian Stretch was released (about 2 months after I submitted it, grrr), which is a nice update to the OS, but does mean that libs have changed,

I will adapt all code to work with Stretch, if you are using old Jessie, its time to update as Jessie is now considered to be over.

sudo apt-get update
sudo apt-get upgrade
This won't give you a version of Stretch more of a bit of both worlds, (you need to burn an new SD) but it will give you all new bits you need

you can also do
sudo apt-get dist-upgrade

Which will give you a full upgrade for your current version of Jessie  but with the new static libs, and retain all your current files avoiding the need for a full reburn of the SD but with the risk of some legacy libs still in place which may not work as expected now. (though if we're honest a full reburn is the best option here)

The only major complication is that there are now some new libs to use.

  1. GLESv2_static 
  2. EGL_static 
  3. vchiq_arm 
  4. vcos
  5. khrn_static 
  6. pthread 
in place of the 2 older GLESv2 and EGL libs
pthread is actually used a lot in the book, though the 1st few projects didn't need it, but with the expanded set of libs, pthread is now required also

Print this item

  its not called Rasbian....doh!
Posted by: Brian Beuken - 03-06-2018, 01:50 PM - Forum: Fundamentals Errata/Questions - No Replies

yeah sorry, I noticed in my previews, I repeatedly misspell Raspbian as Rasbian.

If there's an update I'll make sure to fix that. My apologies to the Raspberry Pi Foundation

Print this item

  Where are the Website files - Delay, due to stupid author
Posted by: Brian Beuken - 03-06-2018, 10:51 AM - Forum: Scratchpad Games - Replies (4)

As noted in the Errata forum.

There has been a mix up over release dates, totally my fault, I was looking at the EU release date for the paperback as my deadline to get the site fully up and running, and have been busy working on my finished game examples, and cleaning and tidying up the downloadable code, planning to post it before the end of March.

Unknown to me though the Kindle version has gone on sale in the US (and maybe EU) so there are people now working on the book.

Arghhh, thats kinda thrown me.

So for the moment I am stopping the work on the final versions, to focus on getting the tidy download code on the site.

All the code is here and working, but does need to be checked and tested on post Nov17 Rasbian, and also new and old Linux kernals as there were some major updates to many systems. There were also minor changes made to the code, over the course of the book so some of the early projects may have got added to after being written, so I need to make sure they are ok and if not, are stripped back to their base levels for you to add to. 

So I'll be adding the projects a few each day, to hopefully keep up with your need to work through the kindle version. But if you get ahead of me, let me know here and I'll try to get later files ready for you to use as you need them.

I will initially post all projects as pre Nov17 Raspbian Jessie projects, so you may find you need to use 6 potentially new lib files if you have a later version of Raspbian Stretch.

  • GLESv2_static 
  • EGL_static 
  • vchiq_arm 
  • vcos 
  • khrn_static 
  • pthread

in place of the 2 older GLESv2 and EGL  libraries used pre Nov17 

(if you just updated an old version of Raspbian, you may find you have both, but best to use the new libs)

As soon as I'm done with the check/test/uploads I will add config systems to them to give post Nov17 automatically.

Then I'll provide Ubuntu, Armbian and Debian style builds, which will not be quite as reliable as there is considerable variation in distro's for Ubuntu and Debian, but you should work that out ok.

All that said, I am expecting to get everything in place before the hardcopy of the book is released, this just upset my timetable a bit, so please hang in there and let me know if I'm screwing up, I'm happy to work with you to fix any problems.

Print this item

  Where are the Website files - Delay, due to stupid author
Posted by: Brian Beuken - 03-05-2018, 10:37 AM - Forum: Fundamentals Errata/Questions - No Replies

I am so sorry, I genuinely thought the book was being released on the 22nd of March, since that was the date listed on Amazon.co.uk and have been tinkering and tidying the files to get them ready for upload.

So I was a little shocked to get a request for the files today, 5th March... 

I hadn't checked the release date for the US...which was a few weeks earlier, which means it out now, and the site is still in progress..especially the code downloads...doh

My sincerest apologies, especially as you will have activated your Visual GDB, this was a massive oversight on my part and I never thought to check if the book had staged release dates.

I'll get the 2D projects up on the Website tonight and the 3D ones in the next few days.

If you need anything urgently, just mail or post here and I'll see if I can expedite things

Print this item

  Keyboard issues
Posted by: Brian Beuken - 03-05-2018, 09:23 AM - Forum: Raspberry Pi questions - Replies (1)

The standard keyboard system I provide, is 99% effective, but I have discovered one or 2 wireless keyboards don't work. unrelated to the file lock some linux systems have, where a  sudo chmod  a+r /dev/input/* will make your event files accessible.

Usually the fix is to look at the AreYouMyKeyboard scanning method, whose job is to parse though the input systems to find the current active keyboard. Most Wired and WiFi keyboards will work perfectly with no issues, but sometimes wireless keyboards don't play nice. Usually though that can be fixed by changing the pattern to search for  from event-kdb to event-mouse.

However.....Some BT keyboards won't even work with that fix, and I don't know the exact reasons why, Raspbian do state that not all BT keyboards are compatible, but its frustrating to see your BT keyboard working on your terminal and not in your project. However there is a "fix" but its very hacky will make your code work only on your system with your keyboard.

So if you are one of those poor people with a keyboard that refuses to register, you can hack the ProcessKeyboardThread to hard wire the event that controls your keyboard, like this:

//fp = fopen(((Input *)arg)->kbd.c_str(), "r"); // normal scanned keyboard

fp = fopen("/dev/input/event1", "r"); // hacked forced event0 or event1 or... (up to max events)

I'll work on a better solution, but for now this will fix most issues.

Print this item

Posted by: jbud70 - 03-05-2018, 01:34 AM - Forum: Fundamentals Errata/Questions - Replies (13)


Great book.  I am enjoying it so far.

Where can I find the PhotoFrame project download referenced in Chapter 4?


Print this item

  Raspberry ModelB (original mk1)
Posted by: Brian Beuken - 03-04-2018, 10:54 PM - Forum: Other SBC's - No Replies

After trying the Model A+ I thought I'd dig out my 1st Gen Model B, its equally fast to set up, and equally slow to compile, though the benefit of a network port makes the file transfers a bit quicker..

It of course is as under powered as the A+, though its little bit of extra memory seems to give it a boost.  But its just as effective as any other Raspberry, it chugs, but it does all its asked to do. It should run the 2D stuff quite well, but like the A+ I wouldn't use this for any serious 3D stuff.

Actually though, as I write this, I adapted some of the set up, and with a bit of optimizing, and change to the screen rez, with a proper delta time system it may be able to run a full demo, culling the render for the base objects raised the frame rate from 15 to nearly 30..so, maybe!

No fancy set ups needed, just install the usual libs, and build, go make a cup of tea and come back in 10-15 mins for your 1st build, or more sensibly, use an on devsystem build toolchain

Print this item

  Raspberry Model A+
Posted by: Brian Beuken - 03-04-2018, 10:48 PM - Forum: Other SBC's - No Replies

Just to prove a point I pulled out a Raspberry A+ from the drawer, set it for 96K gpu and did an update/upgrade cycle on it.

And thats all I had to do, like all Raspberries it's rock solid, no need to change anything in a standard Raspbian set up.

Of course at 700Mhz it runs a lot  slower than a 1200Mhz Model B, but I'm not using multi core's on the 3 so any difference in speed is mainly due to clock speed. I could ramp it up to 1Ghz, and that would indeed help, since a 1st time compile takes a very long time, but sticking with the don't change anything that mantra I've tried to use I let it build on target with 1 core... and..waited and waited, it took close to 30 mins to compile Sad

The maze demo can't run very fast at all though, only 15fps on a 1024/768 screen... 

So yeah, slow as treacle, but it does work, reducing the frame buffer resolution might make it a bit more manageable, but its never going to be very fast.

Print this item

  Pine A64+
Posted by: Brian Beuken - 03-04-2018, 08:36 PM - Forum: Other SBC's - No Replies

I think this particular board has had a lot of press, most of it bad, and justifiably so, it has a lot wrong with it. But since I only really care about its ability to compile and run games, I don't really care about its other problems which are well documented on its forums.

I bought this when it came out as a kickstarter, it was my first ever experience of kickstarter, and I waited for it to arrive with baited breath, and waited, and waited...and....

well eventually it did arrive, but as is often the case the software was beyond terrible, and after a few attempts to get it to work, I gave up. It had so much promise with 2G RAM, and a quad core 64bit CPU, though a Mali400Mp2 is ancient it is a solid system..I had hoped for a lot more.

But time passes people stuck with it, and there are now several new OS's available, software has been patched and played with and the latest version of Ubuntu is actually quite nice and solid, unlike the version I tried a year or so back..
So lets try the 3DMaze demo..

1st things 1st, do we have drivers...no..well that's no surprise. But installing GLMark2-ES2 shows that it has something somewhere since it can run it.........very very slow, and not identifying as Mali400Mp2 as it should but instead as a generic ES3.0 Mesa 17.2.8 which is a sure sign of emulation.

Reinstalling Mesa drivers to be sure showed no change...so its emulated, and slow, a score of 18 (lowest ever) but to its credit it did complete all tests.

I set up the 3DMaze test fully expecting it to bomb, and aside from the need to sudo apt-get install build-essential it compiled and ran the project, even giving me key access.

But at only 10fps in 1024x768 window clearly its not viable.. But hats off, it does compile and it does run, but its just not accelerated on the GPU.

I wonder if any of the other OS's for it have working drivers. I will post an update with Debian and Armbian at some point.

If you have a PineA64 it will probably run the 2D code ok, but until we find an OS with drivers, avoid any real time 3D work.

Print this item