• 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
Eamonn Dev Rea

C++ game development?

9 posts in this topic

Hello smile.png When I was about 11 or 12, I was looking into C++. I was still a beginner programmer, only knowing JavaScript, HTML, CSS and a little bit of Python, so I didn't really understand C++. Now, almost a year and a half later, I've finished learning C. Mind you I'm not a genius at it, but I know the basics(printf, scanf, pointers, arrays, octal/hex/bin, etc) and I remember most of C++. The only thing I couldn't grasp in C++ was Polymorphism. Maybe a guide on that if you feel it's important for game development...? Anyway! I wanted to use Allegro for my game development, but it only works on 32Bit machines and won't install on my 64Bit mac! So that was fine, I thought. "I'll just use SFML! That'll be easy!", but what happened? SFML keeps giving me errors in XCode 4! No one else is having these errors, and the people on the forums said they didn't get this error, so they said just keep trying. Here I am, over 200 or so failed XCode projects that didn't work with SFML 2.0. For those of you that are curious here are the errors:

 

r5SBLAG.jpg

 

My names Eamonn, so my path to my Desktop is " /Users/eamonn/Desktop ", just in case you didn't know what that did.

 

Mac Specs(I dont think these are necessary, but just in case they are I'll tell you them):

 

64Bit processor

4GB RAM

2.5GHz

Intel Core i5

 

 

 

 

All of the code in the XCode project are all the defaults for the SFML application. I did not tamper with it at all(well, I did but I reset it by making another project).

 

CodingMadeEasy has a tutorial on SFML, and I think it's a pretty good one from what I've heard.

 

And one last little thing I'd like to ask about:

 

Eventually(maybe in a few years from now), I'd like to get into 3D game programming. This seems daunting, but in saying that I'm still trying to master 2D game development. Any 3D game programmers: Were you ever in this position? Where you were still making 2D graphics and were a little worried about the daunting task of 3D game programming? If you are a 3D game programmer, is it more fun than 2D game programming? What I mean is, is it more enjoyable? I love 2D game programming, and 3D game programming looks like a LOT of fun biggrin.png Of course, it will take years of practice at 2D game development, and then to understand the concepts behind 3D game programming would take a lot longer, then it'd be onto actually programming the game.

 

I understand that 3D game programming is hard, but don't tell me I can't do it. I just have to keep exercising my skills, and one day I'll be a pro at this! "The only way to do great work is to love what you do." - Steve Jobs

 

So yeah, thanks! Any help is appreciated!

Edited by Eamonn Rea
0

Share this post


Link to post
Share on other sites

looks like a linker problem, make sure you're using the correct library files for SFML (You need the 64 bit xcode version).

 

You could take a look at this short guide: http://sfml-dev.org/tutorials/1.6/start-osx.php

 

Still getting the same errors. sad.png But thanks for the link! smile.png Still more help than the official Forum tongue.png

 

EDIT: Wait wait, no no! There are more errors! Here's a screenie!

 

aFx5PGn.jpg?1

 

I don't like XCode, but I can't have CodeCompletion with Code::Blocks!

Edited by Eamonn Rea
0

Share this post


Link to post
Share on other sites

I have the following SFML files in there(I believe it's all of them):

 

libsfml-audio.2.0.dylib
libsfml-audio.2.dylib
libsfml-audio.dylib
libsfml-graphics.2.0.dylib
libsfml-graphics.2.dylib
libsfml-graphics.dylib
libsfml-network.2.0.dylib
libsfml-network.2.dylib
libsfml-network.dylib
libsfml-system.2.0.dylib
libsfml-system.2.dylib
libsfml-system.dylib
libsfml-window.2.0.dylib
libsfml-window.2.dylib
libsfml-window.dylib
0

Share this post


Link to post
Share on other sites

By the looks of the errors, it sure seems that you are missing a library linkage in your project.  An SFML render window is contained in the the graphics library, so if you were only linking against the window library that would cause problems.  Some other random thoughts would also include the following items.  First, have you fiddled with any of the C++11 flags and stdlib's?  If you have, it is possible, though it seems unlikely, that such changes could change signatures for that function.  This could be especially true of the allocator template given there were some changes to that in C++11.  Another item is a bit more annoying, and I'm not sure if it holds true any longer but the linker used to be order sensitive by default such that you would need to make sure you linked system, then window and finally graphics or some symbols would be missed.

 

The only other thing I can think of is a quick proof of concept.  If you download the repository I use for my articles and build that, you can at least prove that you don't have any configuration issues with your machine or XCode as it uses SFML.  The big difference is that in my repository I use CMake and build SFML as part of the project instead of relying on the binary releases, basically in order to avoid exactly this sort of OMG what's wrong sort of crap.. :)  Anyway, if you want to try that it should only take a little while to download and build (actually running it takes a little work though, so oops :)), you can find it here: a8u  You need CMake 2.8.11 or higher for it, just run it on the list file under the game folder and the resulting xcode project should compile just fine without link errors.

2

Share this post


Link to post
Share on other sites

If you prefer, here is the setup with the sfml framework for OSX, and it's straight forward http://www.sfml-dev.org/tutorials/2.0/start-osx.php

That was the tutorial that gave the the error :(

 

 

By the looks of the errors, it sure seems that you are missing a library linkage in your project.  An SFML render window is contained in the the graphics library, so if you were only linking against the window library that would cause problems.  Some other random thoughts would also include the following items.  First, have you fiddled with any of the C++11 flags and stdlib's?  If you have, it is possible, though it seems unlikely, that such changes could change signatures for that function.  This could be especially true of the allocator template given there were some changes to that in C++11.  Another item is a bit more annoying, and I'm not sure if it holds true any longer but the linker used to be order sensitive by default such that you would need to make sure you linked system, then window and finally graphics or some symbols would be missed.

 

The only other thing I can think of is a quick proof of concept.  If you download the repository I use for my articles and build that, you can at least prove that you don't have any configuration issues with your machine or XCode as it uses SFML.  The big difference is that in my repository I use CMake and build SFML as part of the project instead of relying on the binary releases, basically in order to avoid exactly this sort of OMG what's wrong sort of crap.. smile.png  Anyway, if you want to try that it should only take a little while to download and build (actually running it takes a little work though, so oops smile.png), you can find it here: a8u  You need CMake 2.8.11 or higher for it, just run it on the list file under the game folder and the resulting xcode project should compile just fine without link errors.

 

I downloaded that file, opened CMake, and everything went well! I got an XcodeProject called "CMakeProject.xcodeproj", ran it and it all went 100%, though it didn't fix SFML :( I've never fiddled with anything.

0

Share this post


Link to post
Share on other sites

Hey everyone! I got it working! It turns out the SFML folder in /usr/local/include was from an old version of SFML from April 2013. It's all working now! I can't wait to get into game development with C++!

1

Share this post


Link to post
Share on other sites

I downloaded that file, opened CMake, and everything went well! I got an XcodeProject called "CMakeProject.xcodeproj", ran it and it all went 100%, though it didn't fix SFML sad.png I've never fiddled with anything.

 

Well, that at least mostly proves that it is not some random oops with XCode installation or anything and that your machine is all fine and dandy.  Barring a random gamma ray burst changing a bit everytime you recompile your project that is. :)

 

<snip>

 

Glad to hear you got it all figured out.... :)

  •  
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