• 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
PvtFreddy

Want to move onto a graphics library

16 posts in this topic

Hello all,

 

I've just joined the site so I hope that I am posting in the correct forum. If not, then I am terribly sorry for the trouble.

 

I have a question for those who are wise about programming libraries like DirectX, SDL and OpenGL. I have been programming in C++ for almost 4 years now and understand the basics, including the STL. I have picked up a book on DirectX and SDL and understand the code inside them. I think I am ready for moving onto a library to begin using graphics. I also know and understand how to build a Window using the Windows API.

 

My question is this: What library is the best (not so much easiest) to begin with? I have no hopes of designing a game. I just wish to mess around with the graphics, input, sound, etc. so I obtain a better understanding of how it works and how to write it.

 

Thank you,

 

Lewis

0

Share this post


Link to post
Share on other sites


My question is this: What library is the best (not so much easiest) to begin with? I have no hopes of designing a game. I just wish to mess around with the graphics, input, sound, etc. so I obtain a better understanding of how it works and how to write it.

 

Based on this, you want a multi-purpose library, and not just a graphics library.  OpenGL is purely a graphics library, so doesn't handle sound and input.

 

DirectX can handle all of these, but then you're limited to Windows only.

 

There are three widely used cross-platform libraries: SDL, Allegro, and SFML.  The first two are C libraries, and SFML is C++. They all have similar APIs and learning curves.

 

The best for you depends on what you want.  If you don't care about cross-platform and are using Windows, then DirectX is probably the best choice as there is a great deal of documentation for it, both online and in book form.  If you do want cross-platform support, then it depends on if you want a C++ library or a C library.

0

Share this post


Link to post
Share on other sites

I am a beginner in this field so I am just learning. In my C++ course I was always told that once you have one language down then others follow easier. Isn't this the same for libraries? If so, I am not that worried. I just want to get some knowledge to one day create a VERY basic game.

 

Thank you for your reply,

 

Lewis.

0

Share this post


Link to post
Share on other sites

You can use the C libraries in C++. In fact I use Allegro myself with C++.  Some people just prefer a library that was built with C++ in mind from the ground up.

0

Share this post


Link to post
Share on other sites

I am a beginner in this field so I am just learning. In my C++ course I was always told that once you have one language down then others follow easier. Isn't this the same for libraries? If so, I am not that worried. I just want to get some knowledge to one day create a VERY basic game.

 

Thank you for your reply,

 

Lewis.

That's very true.

 

Allegro, SDL and GLFW cover what you need. Any of those would be suitable.

 

My 2cc: use SDL2.

 

Moving to any other library will be trivial once you get the hang of it.

0

Share this post


Link to post
Share on other sites

Thank you very much for the information. May I ask one other question?

 

How do I include the .lib files to Visual Studio for SLD2?

-1

Share this post


Link to post
Share on other sites

In your project properties (alt-enter), under Linker / Input / Additional Dependencies

0

Share this post


Link to post
Share on other sites

How do I include the .lib files to Visual Studio for SLD2?

#pragma comment(lib,'SDL2.lib')
#pragma comment(lib,'SDL2main.lib')
-1

Share this post


Link to post
Share on other sites


Based on this, you want a multi-purpose library, and not just a graphics library.  OpenGL is purely a graphics library, so doesn't handle sound and input.

 

I just wanted to note that OpenGL and SFML work nicely together however(or glfw, if you want another option), and the sound/input parts of SFML are rather easy to implement(same goes for glfw). So, I'd say to not let this deter you too much from OpenGL.  Between the three you really have most of the basics covered I think. If you are looking for a cross-platform and open source library, I still think OpenGL is a pretty viable option for you.

0

Share this post


Link to post
Share on other sites

 

How do I include the .lib files to Visual Studio for SLD2?

#pragma comment(lib,'SDL2.lib')
#pragma comment(lib,'SDL2main.lib')

 

Pasted into my Evernote. Thank you.

-1

Share this post


Link to post
Share on other sites

 

 

How do I include the .lib files to Visual Studio for SLD2?

#pragma comment(lib,'SDL2.lib')
#pragma comment(lib,'SDL2main.lib')

 

Pasted into my Evernote. Thank you.

 

 

Don't use it in code you want anyone else to compile, as that will only work with MSVC.

1

Share this post


Link to post
Share on other sites

How do I include the .lib files to Visual Studio for SLD2?

#pragma comment(lib,'SDL2.lib')
#pragma comment(lib,'SDL2main.lib')
Pasted into my Evernote. Thank you.
 
Don't use it in code you want anyone else to compile, as that will only work with MSVC.

True but he said visual studio explicitly. Ironically I edited my post removing "windows only" for this very reason. Lol
0

Share this post


Link to post
Share on other sites

Starting to learn DirectX and looking into SDL. I am taking in a step at a time, looking up 2D graphics creation at the moment. I have finally got a window with a picture on it. Now, I just need to know how to develop sprites then use them in the program. Doesn't sound difficult now, does it...?

0

Share this post


Link to post
Share on other sites


True but he said visual studio explicitly.

 

I just wanted him to be aware that while it might work for him while using VS, if he gave the code to someone else to compile, it might not work for them.

0

Share this post


Link to post
Share on other sites

 


True but he said visual studio explicitly.

 

I just wanted him to be aware that while it might work for him while using VS, if he gave the code to someone else to compile, it might not work for them.

 

True but I think the pragmas are ignored by other compilers but have the added benefit to sort of self-document all required libs whereas IDE configurations etc get lost in translation and he would have to reconfigure his different IDE with whatever that uses to find libraries anyway, whether the pragmas are present or not.

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