• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
CrazyCrinkle

Bashing my face against the ArcSynthesis.org brick wall.

11 posts in this topic

Hello there I am trying to learn to make graphical programs in C++, I'm novice, but capable of simple console programs, but I want to move beyond that and start using OpenGL and graphics. My editor of choice is codeblocks and I have made absolutely zero progress in this mission for about two months now.

 

So I started looking at the http://www.arcsynthesis.org/gltut/ series again and this time got as far as downloading the tutorials and the pre-make utility.
 
I even managed to get premake to compile the code into a codeblocks-compatible format. But when I go into the code and run the framework.cpp. It fails to run with "You must select a "host" application to run a library", although I hadn't actually opened any of the cpp files which may be where the problem accurred
 
However, witness the install instructions provided with the code: http://www.arcsynthesis.org/gltut/Building%20the%20Tutorials.html
 
It gives only the very vaguest hints as to what to do with the downloads, and quite frankly, it doesnt tell you what to do with (whatever file it makes) when you premake the opengl library files. It assumes you've done the same operation for years and just "know" what to do. What is the purpose of a tutorial that just assumes you know what to do?
 
What I did:
 
* Download Tutorial files, premake and the Unofficial OpenGL SDK, and unzip them
* Ran premake on a tutorial to make it codeblocks freindly.
* Ran premake on the OpenGl stuff to do... something?
* I cant exactly remember now but I copied most of the folders from the opengl directory into the tutorial code's directory as I assumed it would need it in there to be able to find and use it.
* Opened codeblocks and ran said tutorial.... I get the following build errors:
 
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglloadD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglimgD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglutilD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglmeshD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lfreeglutD

 

 
If anyone has any experience this, can you advise what to do next?
Alternatively, if someone can come up with a step by step (unassuming guide) to every single step, from installing everything to making this pressing F9 and making this code work, i would also be happy with that.
 
 
Additionally, if anyone can advise a better programming language than C++ which is good for (hopefully, eventually) modern day fancy graphics, which isnt a completely deliberate nightmare to even run example code. Please do tell me.
 
In the old days (the BASIC days) you could just put a file in a directory, type "include ####" and it just worked.

Nowadays: You have to convert sourcecode into an IDE-freindly format (because they're all read c++ in different ways), you have to compile OpenGL source code into a an ide freindly version that it can use. You also apparently have to have about 5 different versions of OpenGL (glew, gltut, freegl, glib and god knows what else) You then, presumably have to tell the IDE where this version is.... and who knows what crazy unintuitive stuff beyond that...
0

Share this post


Link to post
Share on other sites

It gives only the very vaguest hints as to what to do with the downloads
It tells you exactly what you have to do: Create a project file with premake.

 

If you want to build all of the tutorials at once, go to the root directory of the distribution and use Premake on the premake4.lua file in that directory. It will put all of the tutorials into one giant project that you can build.
 Then you can just open it on Code::Blocks and you'll have a list of all the tutorials.

 

I started with OpenGL learing from that same site, spent a couple months with it, and I know jack shit about C++.

 

But to be fair, I moved soon after to LWJGL to use OpenGL in Java. Which meant I could just add jar + natives folder to a project in Eclipse and I was good to go.

0

Share this post


Link to post
Share on other sites

Ok, I compiled all the tutorials, went into the first tutorial (which has only a single file), loaded and ran it and it gave the same build errors, so it's not a single-tutorial problem, theres something wrong with all the tutorials, or its not finding something it wants (but i have no idea because the error messages arent clear enough).

 

Chubu, can you try and see if you can get any to work and if so do a fresh installation of everything and write a step by step guide? Because otherwise I'm completely screwed.

0

Share this post


Link to post
Share on other sites

If you really want to use C++ for everything, you would probably benefit more from learning the language itself and a specific toolchain (not that they're very different).

 

Here is a gcc tutorial which may or may not be good:

https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html

 

Using GLFW on Linux:

http://stackoverflow.com/questions/17768008/how-to-build-install-glfw-3-and-use-it-in-a-linux-project

 

Since I'm very familiar with GLFW, I can say that the tutorial above is not the most effective solution, but it will (always) work. Many roads and all that.

 

For windows this one looks promising:

http://antongerdelan.net/opengl/hellotriangle.html

 

Bottom line is, if you know how to compile and link stuff, suddenly you can use any library. The process of compiling other libraries such as GLFW and GLEW are largely very simple because the process is described in detail on their sites, or is a quick google search away. stackoverflow is littered with people having "undefined references" when trying to use libraries. Should be smooth sailing using any of the answers from there.

 

As with everything though, some things are not always said in clear text. Here are some pitfalls:

1. Do you have the correct compiler visible and available from shell/cmd? gcc --version

 

2. Do you use the correct compiler architecture, or is it a cross compiler which means you will have to specify output architecture, eg. -m64 for 64bit?

 

3. Do you have the correct libraries? Are they also of the correct architecture? Were the libraries compiled by you? (good) Or did they come precompiled? (potential issue)

 

4. Does the static or dynamic version of a library require a specific "global" #define? eg. GLEW_STATIC or GLFW_DLL. If yes, you can either #define GLEW_STATIC just before #include <GL/glew.h>, OR you can define it in your makefile as part of the compilation process: -DGLEW_STATIC

 

5. Do you append all the correct dependencies for the library you are using? On windows glfw requires these: gdi32 and opengl32. These are added by appending -lgdi32 -lopengl32 to the linker commandline.

 

6. Are the dependencies supplied in the correct order? gcc/g++ requires the dependencies to be supplied in reverse, so the first dependency is the last one in the commandline: -lglfw3 -lgdi32 -lglew32s -lopengl32

 

From the last point we can see that both glew and glfw requires opengl32. But glew only requires opengl32, while glfw also requires gdi32.

 

7. How do you know about dependencies and such?

By reading the manual:

Compiling GLFW: http://www.glfw.org/docs/latest/compile.html

Using a project with GLFW: http://www.glfw.org/docs/latest/build.html

 

You can also use verbose output from gcc/g++ and check for yourself what it's looking for. If you get undefined references to what REALLY looks like glfw functions, then you can rule out everything else but glfw itself. It's clear that glfw that isn't a part of the linker process and must be added before the undefined references can go away.

Edited by Kaptein
1

Share this post


Link to post
Share on other sites

<everything>

 

Thanks for all that, if that was intended as somehow to answer and solve why these examples don't work, well then i give up on c++ because its just too complicated to learn. Not the code, but how to even get a simple example to run. I mean no disrespect at all, but I don't understand a single thing in your post. 

 

Can anyone at all actually help with what is wrong? I followed the path given in the build error log and ended up at:

 

C:\Program Files (x86)\CodeBlocks\MinGW\mingw32\bin\ld.exe

 

It is a real EXE, but according to the errors, it must be missing some parts that make the tutorials work. Can anyone share an updated version of the exe file that works?

0

Share this post


Link to post
Share on other sites

 

<everything>

 

Thanks for all that, if that was intended as somehow to answer and solve why these examples don't work, well then i give up on c++ because its just too complicated to learn. Not the code, but how to even get a simple example to run. I mean no disrespect at all, but I don't understand a single thing in your post. 

 

Can anyone at all actually help with what is wrong? I followed the path given in the build error log and ended up at:

 

C:\Program Files (x86)\CodeBlocks\MinGW\mingw32\bin\ld.exe

 

It is a real EXE, but according to the errors, it must be missing some parts that make the tutorials work. Can anyone share an updated version of the exe file that works?

 

 

Hey now, if you don't want to bother with all these things there are other perfectly good languages that are much much easier to get started with.

In C# you have the best IDE around, and everything just works. It also have git (version control) integrated in the IDE, so you can one-click yourself to victory. (There's probably some videos on youtube on how to use it)

 

Others that are good are Java and Python. Most importantly all 3 of these languages have a huge userbase, and that means there's a ton of material out there you can use to get help with.

 

All of the languages above are perfectly capable of running games. You may not want to try to make high-end studio-quality 3D games in C#, but you are not a studio, you are just one man. As are we all here, for the most part. Just use whatever you like the most. If programming is your hobby, much like it is mine, you need to make it easy for you to get motivated, and that usually means not getting stuck / hitting a wall on the things you don't care about at all.

 

C++ is fine and all, but just because you are programming in C# doesn't mean you can't come back to C++ later and feel like you've seen it all before. All the common, modern programming languages have many many things in common with mostly syntactical differences.

 

For a more comprehensive list of the languages, use the search bar here at gamedev. Here is a thread from 2012 which is just as true today:

http://www.gamedev.net/topic/624131-language-comparison/

 

As for your actual error, you need to provide the errors in full, otherwise no one can really help you. No one here is likely using the projects from arcsynthesis, simply because we make our own projects from scratch when needed. It allows for better control and it's actually quite quick to set up once you've done it a few times.

 

I wrote some guesswork here, but truth is I have no idea what's wrong simply based on you pasting the full path to the linker (ld)

Edited by Kaptein
2

Share this post


Link to post
Share on other sites

I would focus on getting the 'build' you downloaded to work.

Create a new project, set it up and copy in the code, that way you'll learn the basics of setting up a project/ compiler (which you'll need anyway when you start coding :))

 

Good luck

0

Share this post


Link to post
Share on other sites
What I did:
 
* Download Tutorial files, premake and the Unofficial OpenGL SDK, and unzip them
* Ran premake on a tutorial to make it codeblocks freindly.
* Ran premake on the OpenGl stuff to do... something?
* I cant exactly remember now but I copied most of the folders from the opengl directory into the tutorial code's directory as I assumed it would need it in there to be able to find and use it.
* Opened codeblocks and ran said tutorial.... I get the following build errors:
 
If anyone has any experience this, can you advise what to do next?

 

I did the steps described below using Code::Blocks 13.12 with the TDM64 bundle  of TDM-GCC in 32-bit mode (which I downloaded from the TDM-GCC website, this is NOT the one bundled with Code::Blocks). But I don't really see a reason why it shouldn't work with any other MinGW installation.

 

Open a command prompt in the Tutorial 0.3.8\glsdk folder, run premake4.exe codeblocks, and you should get a shiny new glsdk.workspace file in it. Open this file in Code::Blocks, click "Build" in the menu bar, then click "Build workspace". After the build is done, you should have static libraries of the Unofficial OpenGL SDK ready for the tutorials to link against.

 

Now in the Tutorial 0.3.8 folder, run premake4.exe codeblocks again, and you should now have a brand new AllTutorials.workspace file in it. Open this file in Code::Blocks, but don't yet click "Build"/"Build workspace":

1) Right-click the Tut 12 Scene Lighting project in the project tree and click "Build options...", click the root target (above "Debug" and "Release") at the left-hand side of the screen, and under the "Compiler settings" tab click the "Other options" tab. Type -fpermissive and click OK. Do the same for the Tut 12 HDR Lighting, Tut 12 Gamma Correction, and Tut 16 Gamma Landscape projects.

2) Now click "Build"/"Build workspace". All projects should build fine.

 

Now some bad news. I tried the compiled EXEs; most ran, but a few crashed:

- All Tutorial 12 projects;

- Tut 13 Basic Impostor;

- Tut 14 Basic Texture and Tut 14 Material Texture.

 

I also built everything with VS2013 and the same projects crashed. I suppose it could be either a problem with my graphics drivers (Intel HD Graphics 4000) or a bug in the tutorials; you'll just have to try and run them on your computer.

0

Share this post


Link to post
Share on other sites


Thanks for all that, if that was intended as somehow to answer and solve why these examples don't work, well then i give up on c++ because its just too complicated to learn. Not the code, but how to even get a simple example to run. I mean no disrespect at all, but I don't understand a single thing in your post. 

Unfortunately, this is one of the most archaic things about C++. C++ inherited its toolchain model from C, which was designed in the early 70s under the constraints of the computers at the time - memory probably in the low kilobytes and perhaps not more than a few megabytes of disk storage.

 

While the language has evolved over time, the tools to build and link function conceptually almost the same as they did back then.

 

This is a common stumbling block, but you can make your way through it if you persevere.

1

Share this post


Link to post
Share on other sites

Now some bad news. I tried the compiled EXEs; most ran, but a few crashed:

- All Tutorial 12 projects;

- Tut 13 Basic Impostor;

- Tut 14 Basic Texture and Tut 14 Material Texture.

 

I also built everything with VS2013 and the same projects crashed. I suppose it could be either a problem with my graphics drivers (Intel HD Graphics 4000) or a bug in the tutorials; you'll just have to try and run them on your computer.

 

It *was* the Intel graphics drivers. After I switched to the dedicated AMD GPU, all programs ran fine.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0