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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 35
» Latest member: AmateurUnova
» Forum threads: 111
» Forum posts: 249

Full Statistics

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

Latest Threads
How to Register
Forum: Scratchpad Games
Last Post: Brian Beuken
Yesterday, 02:10 PM
» Replies: 0
» Views: 5
Installation of Bullet, S...
Forum: Fundamentals Errata/Questions
Last Post: Brian Beuken
Yesterday, 12:23 PM
» Replies: 1
» Views: 6
Now using the 3B+ as main...
Forum: General Chat
Last Post: Brian Beuken
Yesterday, 10:00 AM
» Replies: 0
» Views: 5
C++ Coding MagPi #73
Forum: General Chat
Last Post: Brian Beuken
Yesterday, 09:34 AM
» Replies: 0
» Views: 5
C++ Coding MagPi #72
Forum: General Chat
Last Post: Brian Beuken
Yesterday, 09:33 AM
» Replies: 0
» Views: 2
C++ Coding MagPi #71
Forum: General Chat
Last Post: Brian Beuken
Yesterday, 09:31 AM
» Replies: 0
» Views: 2
installing STB and GLM
Forum: General Chat
Last Post: Brian Beuken
Yesterday, 09:22 AM
» Replies: 0
» Views: 5
Asus Tinkerboard
Forum: Other SBC's
Last Post: Brian Beuken
09-23-2018, 08:51 PM
» Replies: 2
» Views: 340
Linux getting in the way ...
Forum: Other SBC's
Last Post: Brian Beuken
09-23-2018, 05:55 PM
» Replies: 2
» Views: 37
XU4
Forum: Other SBC's
Last Post: Brian Beuken
09-23-2018, 05:33 PM
» Replies: 3
» Views: 895

 
  UP2 (squared)
Posted by: Brian Beuken - 06-07-2018, 11:47 AM - Forum: Other SBC's - No Replies

A very nice board this, intel based for a change, but running a version of linux. It wasn't massively hard to get set up as most of the graphic drivers come with it

I have the lower priced 2GB  Celeron dual core version, but its still fantastically fast compared to an ARM board. the more expensive quad core pentium version was over my (at the timer) $100 limit. I got it on a kickstarter for even more of a discount. Its now selling without case or (6v) Power for the base version at $145 ,so basically it is outside my self impost price range. The 8G quad pentiums got up to $350, not sure there's a good reason to buy these unless you need a portable windows 10 system.

Of course that power comes at a price, in this case a massive heat sink and case to hold it all together. But this beast is basically a mini PC, and you can install full windows on it if you want (I might)

Everything compiles and runs just fine....except.

All my model graphics are corrupted, not in a random way, just that their vertex info seems to be wrong. I assume, (perhaps wrongly) that even though its running GLES2.0 and GLSL100 it needs some more clarity in the data being sent to the shaders. I can indeed see that they are in the right positions, scale and rotations are correct, but the models themselves look more like the cubes you get out of car crushers in scrap yards... 

No idea why at the moment, it may be some kind of high/low bit arrangement, or it may be that some data is not initialising on intel systems as it would on ARM (thats my current best guess), I'll play with it and find out.

One thing though, despite this odd corruption....this is the fastest board I've ever used, it blows all the others away... If I can fix the graphics it will be such a blast to work on.

Print this item

  Hello Brian!
Posted by: wilson - 05-25-2018, 07:35 PM - Forum: General Chat - Replies (2)

Hi Brian!

I'm Wilson, a game designer that is currently undercover as a coder on this forum to learn more about programming.
Besides my interest on the book's theme, your apparent dedication to the forum and the laidback writing style convinced me to purchase the book Big Grin

Still preparing for this journey, although I'm trying to figure a way to travel using my Mac. If any tech savvy Mac users know a good tool setup to follow the book, please share!

Looking forward to create cool games on my pi.
Thanks for writing this book!

Print this item

  C++ Coding MagPi #70
Posted by: Brian Beuken - 05-23-2018, 02:05 PM - Forum: General Chat - No Replies

The code isn't change a lot this month, but we have used a new key reader, (same as in my book) which gives us much more control and allows us to do multiple things

Also we address some of the speed issues, and refine the code a bit to get rid of warnings we previously just ignored but now have to take care of.

Our 1st framework is now ready, it can still use a few tweeks but we can take this forward to create a much nicer game next month.

Print this item

  Pirate copy
Posted by: Brian Beuken - 05-22-2018, 10:14 PM - Forum: Scratchpad Games - Replies (2)

well that didn't take long...
there seems to be a pirate kindle version doing the rounds, its cheap, so I can't blame people for buying it, but its very screwed up, the formatting is all over the place and it is barely readable

I have reported it to the publisher hopefully we can get it removed, but if you bought it, please insist on a refund and don't let these cheats spoil your expereince.

Print this item

  Bump/Normal/other types of mapping
Posted by: Brian Beuken - 04-29-2018, 03:10 PM - Forum: OpenGLES2.0 Shaders - No Replies

While the topic of shadow mapping is on the board, it is maybe a good idea to keep in mind that though the OpenGLES2 spec does not give us a lot of different buffer types, it does give us the ability to use multiple versions of texture samplers, at least 8 according to the spec.

So its quite possible, and often very desirable to use these in detail methods such as bump mapping. Here's a great explanation of the principles here (though the method is slightly different on OpenGLES2.0)

In fact passing large amounts of data of any kind, is nearly always going to have to be done via textures for static data, and frame buffers for more dynamic forms of data.
The ability to use a texture as a large store of info can make for some very exciting features.

The downside is most of these results are best seen in the Fragment shaders which for the majority of SBC's will cause a big drop in real time peformance. But some of the higher end systems can handle it, and FPS speed is not a priority for some sections of your work.

Feel free to post examples of your efforts here

Print this item

  I don't know C++
Posted by: Brian Beuken - 04-26-2018, 05:45 PM - Forum: Help my code won't work?? - Replies (1)

Now, it has to be said, my book is not designed for total beginners, it does expect you to know at least the basic concepts of C/C++, how to make classes, the different variable types, passing and receiving parameters, understanding data structures, STL, the build process, OOP principles and so on.
It's aimed at someone who has learned C++ from a book or course, but isn't really sure how to create a game with it, I'm not expecting guru levels of knowledge but those basic skills need to be there.


If you really have no knowledge of C++ then you are going to struggle at times. I do keep the code in the book very simple especially at the start, but the book isn't a C/C++ tutorial, that would have made it twice as big and 3 times duller.

I will always do my very best to help you, but there will be times when you need to take a step back and focus on your C/C++ skills before you attempt to tackle the book.
If you have a PC, I very much recommend working though this book which will give you all the basic skills you need to move forward. It doesn't really go into graphic game programming much, despite the title, but it does give you a lot of very useful understanding of C++ that you can use here.

If you don't have a PC and just a Pi, or just prefer to use a Pi, then I might be able to help;

I have been writing a fairly simple monthly how to code games series which is published in the Raspberry Pi foundations MagPi Magazine, which can be downloaded from the links below, as well as my articles there are some other great projects and articles, so if you've never seen MagPi, its well worth checking out and getting a sub to keep it going.

These are very simple articles, which you can work on with just your Pi and will focus on explaining how C++ works, while building a few very simple games. Some of the concepts and methods will be familiar from the book, simple flyweight design pattern, though more GPU based than the book is.


The plan is to make 12 such articles and I'll list them here as they come out.



https://www.raspberrypi.org/magpi-issues/MagPi65.pdf
https://www.raspberrypi.org/magpi-issues/MagPi66.pdf
https://www.raspberrypi.org/magpi-issues/MagPi67.pdf
https://www.raspberrypi.org/magpi-issues/MagPi68.pdf
https://www.raspberrypi.org/magpi-issues/MagPi69.pdf
https://www.raspberrypi.org/magpi-issues/MagPi70.pdf
https://www.raspberrypi.org/magpi-issues/MagPi71.pdf
https://www.raspberrypi.org/magpi-issues/MagPi72.pdf
https://www.raspberrypi.org/magpi-issues/MagPi73.pdf

Print this item

  Creating object class for invaders
Posted by: mayoricecream - 04-26-2018, 01:43 AM - Forum: Help my code won't work?? - Replies (2)

Hello again, 

I am getting started on the Invaders game and was a bit confused with the bit about creating the object class. 
I am not sure when it is the class is supposed to go. I created a header called objects.h and put the code in there but when I do that my Shooter.cpp gives me errors.

 Severity Code Description Project File Line Suppression State

Error [Clang IntelliSense] Error: no matching constructor for initialization of 'Objects' InvaderStart c:\users\justo\desktop\invaders\invaderstart\Shooter.cpp 10

Print this item

  Setting up dynamic playfiled
Posted by: Brian Beuken - 04-26-2018, 01:35 AM - Forum: Fundamentals Errata/Questions - Replies (1)

Not so much a mistake as a confusion, when you have got your photoframe up and running, we are getting ready to start work on a proper game using a dynamic buffer, the code for this is explained in page 68-77. You can add this code to your photoframe example and get it up and running with not too much effort, but really its just explaining the code you will be downloading to use in Chapter 5, so typing it all in is optional. I should have made that clearer.

Print this item

  Missing content?
Posted by: Brian Beuken - 04-25-2018, 02:51 PM - Forum: Scratchpad Games - No Replies

There were a couple of Chapters I had to chop out the book to keep the page count to the publishers requirements. At some point I may tidy these up and include them here or if there's ever a 2nd edition.

The one I enjoyed working on most was the creation of a proper 2D framework, fully using the GPU and moving away from the clunky but simple surface system. That would be much more appropriate for some kinds of bullet hell games. but it was quite large, and aside from the better GPU usage didn't offer anything more than the Skramble chapter did. If you get to the point of understanding how the 3D games work, then setting up a 2D viewpoint is not a huge leap so I dropped it.

There was also a chapter on optimization, which provided ways to almost double frame rate with a range of simple and not so simple tips. It was mostly technical issues, to point out the failures of the code that went before it, but I thought about it and I feel I gave readers plenty of notice that there were several ways to optimize code and that they would get more of a thrill from that if they discovered them alone. So I left it out. But I'll drop hints in this forum.


A few chapters were not quite finished but would have added some useful technical content;

I wanted to do a lot more on shaders and light and using bump mapping and other tricks, but I noted that the performance drop was so severe on the Pi, that it would have been even worse on lesser machines, I decided to not commit to it and will leave it to discussion here.  I spent quite some time doing cool things on the Odroid XU4 only to discover that the Raspberry's frame rate would drop to single figures doing the same things even at lower res, making it clear that specific optimizations would be needed and that would cause too many individual case situations to be explained. Its better if I add content to the site and then people can choose if they want to use particular effects as they need them.


A more detailed chapter on multi core usage and use of a job manager to vastly increase performance, but I did find that most of the multi core systems I used, especially Raspberries became overheated very quickly, so I needed to do more research on that, which I will return to. I think the conclusion I reached then, was to consider a sparse use of multi core work which is not really a good design method for game architecture. I am not convinced its an SBC issue, I'm pretty sure it was my methodology and I didn't have enough time to fully explore it.

There was also a chapter on creating a (very) simple Physics engine, but I actually scrapped that when I realized that it was just easier to use Bullet and avoid long and rather dull math heavy content, which I don't enjoy.

I also put down an outline chapter on a more accurate bullet physics vehicle controller for the race game to get something like this but noticed I wasn't really explaining anything differently from the examples I found on line, and I didn't want to just parrot the code that was available,  so if you want to do more accurate vehicle physics its probably best to check out the bullet forums and review what they say. But I will be using this more accurate car control in the finished version of the Race game (coming soon)

Finally I did a nice outline chapter on procedural terrain generation, and fake instancing of detail, but again it was overreaching the base level target of a raspberry Pi system, though it was so much fun to do, maybe I'll come back to it if I can include the performance improvements that would be needed to make it viable.

Print this item

  Setting full screen
Posted by: Brian Beuken - 04-25-2018, 12:00 PM - Forum: Fundamentals Errata/Questions - No Replies

In the listed graphic setup code for the early projects, the init_ogl function is a basic system which works fine for windowed EGL display, but it should also be possible to set full screen mode by sending either 1920x1080 or the returns value from

Code:
    uint width, height;
    graphics_get_display_size(0, &width, &height);
    init_ogl(p_state, width, height);

However due to a missing set up in the init_ogl function, on page 47, the early projects can't go full screen, but you can correct this by adding two lines as noted here

PHP Code:
    state->width width;
    
state->height height;
    
    
dest_rect.0;
    
dest_rect.0;
    
dest_rect.width state->width// it needs to know our window size
    
dest_rect.height state->height;
    
    
src_rect.0;
    
src_rect.0;
//ADD these two lines if you are using a full screen mode    
    
src_rect.width width << 16;
    
src_rect.height height << 16

The downloaded files should all have this fix but I will check to make sure.

Print this item