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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 28
» Latest member: SteveSTEM
» Forum threads: 93
» Forum posts: 208

Full Statistics

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

Latest Threads
Nano Pi T4
Forum: Other SBC's
Last Post: Brian Beuken
07-19-2018, 04:36 PM
» Replies: 1
» Views: 19
Code for issue 71
Forum: General Chat
Last Post: Brian Beuken
07-09-2018, 04:13 PM
» Replies: 3
» Views: 135
A little something from m...
Forum: General Chat
Last Post: Brian Beuken
07-08-2018, 11:34 PM
» Replies: 0
» Views: 42
Using Eclipse (IDE) with ...
Forum: Using non Windows systems
Last Post: DieSkaarj
07-02-2018, 11:04 AM
» Replies: 0
» Views: 65
XU4
Forum: Other SBC's
Last Post: Brian Beuken
06-23-2018, 01:17 PM
» Replies: 1
» Views: 188
Odroid C2
Forum: Other SBC's
Last Post: Brian Beuken
06-23-2018, 01:10 PM
» Replies: 1
» Views: 96
C.H.I.P.
Forum: Other SBC's
Last Post: Brian Beuken
06-20-2018, 08:57 PM
» Replies: 0
» Views: 74
Any clever Linux people h...
Forum: Assets, Tools, Libraries and other useful things
Last Post: Brian Beuken
06-20-2018, 08:28 PM
» Replies: 0
» Views: 169
Open AL?
Forum: Assets, Tools, Libraries and other useful things
Last Post: Brian Beuken
06-19-2018, 01:00 PM
» Replies: 0
» Views: 67
I'd like to introduce mys...
Forum: General Chat
Last Post: Brian Beuken
06-12-2018, 05:05 PM
» Replies: 4
» Views: 450

 
  Why are you using Microsoft systems for a linux machine?
Posted by: Brian Beuken - 03-20-2018, 03:56 PM - Forum: Fundamentals Errata/Questions - No Replies

A few people have contacted me and asked this question, and I suppose it does deserve an answer.

And the honest answer is, its easier!

Sooooooo much easier!

If you chose to abandon Windows and have a desktop Linux system, then great, you got a free OS that does exactly what you want...but it does not do everything, it needs tweaking, and fiddling and installing odd tools to do something else...thats not ideal.

I'm not a Windows fan boy, by any means, it often has me swearing at it, but I just like to use simple professional tools in simple professional ways, Linux basically does not have them available. Mac does...kinda, but it also sucks the life out of you.

So like almost all pro game devs, my main work system is my home PC and work Laptop, I use my free copy of Visual Studio 2017, or my heavily discounted (educational) Visual Studio 2013 on my Windows 8.1 and Windows 10 systems, and everything works.

It just works, it does what I need it to do, largely without fuss or bother, and I use the tools all the pros use.

If you choose to use Desktop Linux, I have no issue with that,  but I don't!

Now if that puts you off buying the book, I am sorry, but you also are missing out on a simple point, the code being built isn't actually specific to the dev system. It can be compiled on any machine, as long as you understand the build process and how to add files to a project. 

So if you really want to use Linux, and one of its many IDE's you can, just create the projects in the manner required by your choice of IDE, and add the source files, take note of the libs and paths and you should be good to go. You can even use a Linux based PC with an IDE, to target your SBC just as I do with my windows system. But as I don't have Linux desktop, I can't really help with how, but I know it can be done. I hope others will post their experience of using a Linux dev system, to a Linux target,

Converting the projects won't be too hard, it'll take you an hour or 2 to get set up but, once you are, adding new files and libs won't be any greater a chore than it is for me on VS, with VGDB.

Lets all use the OS's we like, and focus on making the SBC's run our code, independent of their OS.

Print this item

  Creator CI20
Posted by: Brian Beuken - 03-20-2018, 01:59 AM - Forum: Other SBC's - Replies (1)

Here's a real odd little SBC, a dual core  1.2Ghz Ingenic MIPS CPU, with really fast SGX540 which may be a dual or a quad, they don't say, but the default is 4/2 whatever that means. It's also capable of using OpenGL2.1 if you feel the need! 8GB of nand flash means it does not need the SD card, and it should be a fast access (its slow to boot though) So its a robust little board, and not very expensive to buy, but it is showing its age.


I have the slightly older version of the board, but I don't think its different performance wise from its newer squarer cousin.

And its an odd board indeed, for a start it has a very old version of Debian, Wheezy, which does not seem to have a MIP's version of Bullet available for apt-get. So right now I'm building it as I type. 
GDB also needs to be installed with apt-get all other libs are available though.

I have always liked this machine because it comes with prebuilt graphic demos which really are very nice indeed, and totally show off what an ES2.0 system can do. Sadly though it does not actually have any OpenGLES2.0 libs on board as default, so once the bullet is bult I will need to install mesa libs and trust they will work. It will be a shame if it teased me with performance it never intended to provide.

No glmark2-es2 to test performance, so we have to wait to see if we can build the test project which will report the target GPU and give frame rates.
Though I know the SGX540 is a fast GPU I am not sure it can outperform a Raspberry, though should stomp all over Mali 400's. Assuming of the the mesa libs recognise the chip and we get access to the gpu, that's never certain.

But our discovery will have to wait till morning as the build of Bullet Physics is going to take a while so I'm going to leave it running overnight and catch up with this when I have a bit more time

Before heading for bed, I noted that the CI20 comes installed with Debian 7 (Wheezy), but it is possible to install Debian 8, so I will see how I do tomorrow using the built version of Bullet, and if that fails I will re-flash the board with Debian 8 which should allow an apt-get on Bullet (if not I'll set it off building again tomorrow night). Details of distro's are available here https://elinux.org/CI20_Distros#Debian
The makers own site seems to have a lot of dead links so I guess they stopped actively supporting it even though its still for sale at around $60-70

Print this item

  Happy Day
Posted by: Brian Beuken - 03-19-2018, 10:36 AM - Forum: Scratchpad Games - No Replies

Today I got my hands on the hard copy of my book, 1st time I've seen it all together, 18months work Big Grin

I'm very happy and proud, I just hope people enjoy it and get something out of it.

[Image: mybook.jpg]

Print this item

  Where are the files?
Posted by: Brian Beuken - 03-18-2018, 02:56 AM - Forum: General Chat - No Replies

All Magpi files are located on the Magpi Github 

https://github.com/themagpimag

Print this item

  C++ Coding MagPi #68
Posted by: Brian Beuken - 03-18-2018, 02:55 AM - Forum: General Chat - No Replies

And now we can see ourself putting in some new graphics, we've been doing a lot of techie stuff to set up, but its been needed, trying to visualise things without graphics makes things really hard

But after this we now have Tiles, we have a basic framework to draw those tiles and shaders allowing us to place them in pixel perfect positions.


Its not a very good shader, but we want to avoid anything too complex at the moment, so we can update it with better versions later.

Print this item

  Will Fundamentals of C/C++ games programming, teach me C++??
Posted by: Brian Beuken - 03-17-2018, 06:32 PM - Forum: General Chat - No Replies

Well yes, but no....

The book is not designed to be a tutorial for the C/C++ language, you are expected to have learned some of the basics of C/C++ before you start, the code used is deliberately very simple, some can argue too simple, so that a brand new coder won't be too overwhelmed, but it's not a tutorial for the language. Though as you work through the book we learn to use more complex C/C++ concepts, its never in as much detail as a proper C/C++ tutorial will do.
 
I call it core concepts, the basics of what you need to help you build understanding of how to do things, but there are nearly always better more elegant and possibly simpler ways if you understand the language better.

I do some tutorials for the Raspberry via the MagPi magazine, which attempts to teach basic C/C++ (and OpenGLES2.0) but you really should still be working your way though a book/tutorial and be familiar with how a C/C++ project builds and compiles, the basic concepts of OOP and class based architectures. 

I advise all my students to work their way through this book
https://www.amazon.co.uk/Beginning-C-Thr...027&sr=1-2

Its an excellent introduction to C++ and goes through almost all the features of the language. Its sadly quite light on actual game or graphic programming, but its a very easy to understand book with good working examples that you can do at your own pace. Everything you are ever going to need to understand C/C++ is in this book, everything you need to use it,  to make games, is in mine.

Of course books are subjective, and other beginner books might be more appealing to you, but make the effort to work your way through a beginners book, understand the build cycle, how to create classes, know how a program flows and understand pointers, references and memory. As well as loops and the concepts of OOP.
Even if your grasp is basic, once you have that, my book is much easier to work with.

Print this item

  Books that are invaluable
Posted by: Brian Beuken - 03-17-2018, 02:26 PM - Forum: Assets, Tools, Libraries and other useful things - Replies (2)

If you are working on SBC's you are really working on OpenGLES2.0 or OpenGLES3.x 

In which case you really need a copy of the so called gold book, (dunno why, it only has a hint of gold on it). It comes in 2 versions, the older and slightly harder to find new, 2.0 version
https://www.amazon.com/OpenGL-ES-2-0-Pro...dpSrc=srch

And the more uptodate (but still lacking 3.1/.3.2 info) OpenGLES3.0 version
https://www.amazon.com/OpenGL-ES-3-0-Pro...55JZ7GP90X


Both books are reference books so don't expect much in the way of easy to follow handholding, but if you've started to grasp OpenGLES the info it provides helps to fill in a lot of blanks. 

I am not a fan of downloading reference books like this you should always keep them to hand, but there are some good download references you should book mark, such as the references cards from Khronos.

Reference cards for ES2 are here
https://www.khronos.org/opengles/sdk/doc...e-card.pdf

and for ES3.0
https://www.khronos.org/files/opengles3-...e-card.pdf
and for ES3.1
https://www.khronos.org/files/opengles31...e-card.pdf
and for ES3.2
https://www.khronos.org/files/opengles32...e-card.pdf

OpenGLES3.0 is quite a bit different from 2.0 and requires a different way of doing things, so if you are developing for it, the later gold book is essential.

Not too many SBC's currently support 3.1 or 3.2. There's currently no gold book on 3.1 or 3.2 so you need to go to the Khronos site to get info on how to use it, it is essentially closer to full OpenGL3.3+ these days so any good OpenGL book (the Blue or Red books) will prepare you for using modern GPU's on your SBC.

Print this item

  glVertexAttribPointer error
Posted by: pahendriks - 03-16-2018, 07:16 PM - Forum: Help my code won't work?? - Replies (14)

These function calls give errors (section: add some code):

glVertexAttribPointer(p_state->user_data->positionLoc, 3, GL_FLOAT, GL_FALSE, 5*sizeof(GLfloat), RectVertices);
    // Load the texture coordinate
    glVertexAttribPointer(p_state->user_data->texCoordLoc, 2, GL_FLOAT, GL_FALSE, 5*sizeof(GLfloat), RectVertices[3]);


Severity    Code    Description    Project    File    Line    Suppression State
Error        [Clang IntelliSense] Error: no matching function for call to 'glVertexAttribPointer'    GameProject1    c:\openglesprojects\gameproject1\gameproject1\GameProject1.cpp    248    


Severity    Code    Description    Project    File    Line    Suppression State
Error        cannot convert 'GLfloat {aka float}' to 'const GLvoid* {aka const void*}' for argument '6' to 'void glVertexAttribPointer(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*)'    GameProject1    C:\OpenGLESProjects\GameProject1\GameProject1\GameProject1.cpp    248    

What is wrong?

Patrick

Print this item

  no notification mails?
Posted by: pahendriks - 03-15-2018, 09:33 PM - Forum: General Chat - Replies (4)

Hi,

Some issues with the forum.

First. After registering, I did not get a confirmation mail. After changing my e-mail address I was able to log in and post messages.

Second. I would like to get a notification mail when somebody replies on my messages. It does not work or I do something wrong. Please check and advise.

Best Regards,
Patrick

Print this item

  Where to put the code?
Posted by: pahendriks - 03-15-2018, 09:23 PM - Forum: Help my code won't work?? - Replies (1)

Hi,

In the book you say (section: Add some code, picture of Lenna): After the FileHandler add this code:

MyFiles FileHandler;
int Width, Height;
char* OurRawData = FileHandler.Load((char*)"../Lenna.png", &Width, &Height);
if (OurRawData == NULL) printf("We failed to load\n");

WHERE do I have to put this code? In which file and on which location?

Best Regards, Patrick

update: it seems that putting it after this line in MyFiles.cpp is the place to be:
unsigned char *data = stbi_load(filename, width, height, &comp, 4);

Print this item