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

C/C++ Refresher

8 posts in this topic

I've been away from C/C++ programming for quite some time now, been doing a lot of work in Java (mostly making games) but I have made games in C in the past using SDL so it's not like I am learning a new language but I feel like if I just dove right back into it I would struggle. What would be the best way to get a quick refresher in C/C++ because I would like to start getting into some Windows API programming now. I looked up some C/C++ tutorials but they all start with very basics such as what a variable is etc. I would just like to get familiar with the syntax and language specifics quickly. What would be the best way to get started developing as fast as possible? Thanks!

0

Share this post


Link to post
Share on other sites

How about picking up a reference guide to the latest C++ standard? (C++11)

Not only would you be reminded about how C++ looks, but you'll also be brought up to date on all the new features.

 

I haven't personally read it, but this book is an often recommended read.

 

As for Windows programming, people don't usually directly program with Win32 anymore. Usually they use a wrapper API - either from Microsoft, or a third-party one.

I recommend Qt as a great API.

 

You also mentioned that you made 'C' games in the past, but then repeatedly say C/C++. C++ is a very distinct language from C. Have you already learned C++ in the past?

That book looks exactly like something I am looking for, I will look into it for sure!

 

Would it be better to use the Microsoft wrapper API? What is that called and how does it differ from third-party ones such as QT? I would prefer to stick with the official one by Microsoft unless there are specific advantages to using a third-party API.

 

I made 2 games (Pong and Pacman) in C only but I learned C++ shortly after and started remaking my Pong using C++ and OOP, didn't finish the game but I'd say I was fairly sufficient in C++. I would like to continue with C++ but I was unsure which would be more relevant to Windows programming.

0

Share this post


Link to post
Share on other sites

Would it be better to use the Microsoft wrapper API? What is that called and how does it differ from third-party ones such as QT?

The advantages of third party ones is that the code works on Windows, Mac, and Linux, and sometimes other platforms like Android, iPhone (with additional work required), instead of just working on Windows machines. Oftentimes, they're better designed than Win32 also (IMO), because Win32 has to remain backwards compatible with almost two decades of features that are deprecated, and also has to work across many different languages and so can't take advantage of certain language features. Other Microsoft APIs like DirectX do alot better, because each DirectX version has the freedom redesign itself from scratch.

 

The more modern Microsoft APIs I don't have experience with, mostly because they either use different languages (like C#) or they require you to use Microsoft's tools, or they require non-standard dependencies on Microsoft Runtimes (like .NET). Maybe someone with experience with them can comment.

I'm a huge Microsoft fan (love Microsoft Excel and Win7), but I don't like working with the Microsoft libraries I've interacted with so far - though I admittedly haven't tried too many.

 

But really, your API depends on your goals. If you're wanting to make games, consider SDL 2.0 or SFML 2.0 for 2D hardware-accelerated graphics, and input and sound.

If you want to make cross-platform desktop applications, I'd re-recommend Qt. If you're wanting to make services that run without anything visible onscreen, then pure C++ would work without a graphics API.
 

I made 2 games (Pong and Pacman) in C only but I learned C++ shortly after and started remaking my Pong using C++ and OOP, didn't finish the game but I'd say I was fairly sufficient in C++. I would like to continue with C++ but I was unsure which would be more relevant to Windows programming.


C++ is a very huge language that takes several years to master. By all means continue to explore it! But when it comes to C++, it's often better to underestimate than to overestimate your capabilities. Or maybe I'm just misunderestimating your capabilities for you. laugh.png The book I mentioned won't teach you all of C++ (no single book can), only C++'s standard library.

You'll probably want to bookmark cplusplus.com, cppreference.com, and the notable C++ FAQ as go-to sources for information.

2

Share this post


Link to post
Share on other sites

 

Would it be better to use the Microsoft wrapper API? What is that called and how does it differ from third-party ones such as QT?

The advantages of third party ones is that the code works on Windows, Mac, and Linux, and sometimes other platforms like Android, iPhone (with additional work required), instead of just working on Windows machines. Oftentimes, they're better designed than Win32 also (IMO), because Win32 has to remain backwards compatible with almost two decades of features that are deprecated, and also has to work across many different languages and so can't take advantage of certain language features. Other Microsoft APIs like DirectX do alot better, because each DirectX version has the freedom redesign itself from scratch.

 

The more modern Microsoft APIs I don't have experience with, mostly because they either use different languages (like C#) or they require you to use Microsoft's tools, or they require non-standard dependencies on Microsoft Runtimes (like .NET). Maybe someone with experience with them can comment.

I'm a huge Microsoft fan (love Microsoft Excel and Win7), but I don't like working with the Microsoft libraries I've interacted with so far - though I admittedly haven't tried too many.

 

But really, your API depends on your goals. If you're wanting to make games, consider SDL 2.0 or SFML 2.0 for 2D hardware-accelerated graphics, and input and sound.

If you want to make cross-platform desktop applications, I'd re-recommend Qt. If you're wanting to make services that run without anything visible onscreen, then pure C++ would work without a graphics API.
 

I made 2 games (Pong and Pacman) in C only but I learned C++ shortly after and started remaking my Pong using C++ and OOP, didn't finish the game but I'd say I was fairly sufficient in C++. I would like to continue with C++ but I was unsure which would be more relevant to Windows programming.


C++ is a very huge language that takes several years to master. By all means continue to explore it! But when it comes to C++, it's often better to underestimate than to overestimate your capabilities. Or maybe I'm just misunderestimating your capabilities for you. laugh.png The book I mentioned won't teach you all of C++ (no single book can), only C++'s standard library.

You'll probably want to bookmark cplusplus.com, cppreference.com, and the notable C++ FAQ as go-to sources for information.

 

Thanks for the detailed explanation! I think I will look into Qt and maybe some other 3rd party API for now because I do plan on releasing it for other platforms as well and the backwards compatibility seems like an unnecessary disadvantage I can overcome by simply using a more modern API.

 

I've started reading on cplusplus.com already so for now I think I'll just get myself up to speed on C++11 and then start my application development.

 

I'm curious about the part where you mentioned that programs that run in the background don't need a graphics API. What would I need for such a program? Just a simple program running in the system tray.
0

Share this post


Link to post
Share on other sites

I'm curious about the part where you mentioned that programs that run in the background don't need a graphics API. What would I need for such a program? Just a simple program running in the system tray.

 

Programs running in the system tray need to use Win32 or a library like Qt.

 

Programs that don't require any visuals serve many purposes. If you're on a Windows operating system, do Ctrl+Shift+Esc and switch over to the 'Processes' and 'Services' tab. How many of those programs do you see actually visible on-screen? smile.png

 

Many programs you can run from the command line, and some are very powerful. Microsoft, Linux, and Mac all have many programs built in that don't have any interface. ImageMagick is a famous one (downloadable) that lets you manipulate image files in-bulk. Many webservers have it pre-installed, but I use it on rare occasions on my Windows machine.

 

Here's another example of one: Open a command prompt (Start -> Run -> cmd.exe), and type in 'ping www.google.com' to have your computer send a network packet to Google's webservers, and measure the amount of time it takes to go there and back. 'ping' is a program built into almost every operating system. Non-visual tools like these often do one thing, and do it well, and people chain the output and input of multiple "command-line" programs to run complex tasks on bulk files. Some can be dangerous to use, though, if you accidentally ask them to delete files you didn't want deleted - I almost did that the other day. happy.png

 

Game-wise, these kinds of programs don't serve much purpose... but game servers don't have visual interfaces, and so don't need graphics APIs (They all use other kinds of APIs, though - like the built-in networking APIs most machines have, or file-access APIs, or etc...).

2

Share this post


Link to post
Share on other sites

 

I'm curious about the part where you mentioned that programs that run in the background don't need a graphics API. What would I need for such a program? Just a simple program running in the system tray.

 

Programs running in the system tray need to use Win32 or a library like Qt.

 

Programs that don't require any visuals serve many purposes. If you're on a Windows operating system, do Ctrl+Shift+Esc and switch over to the 'Processes' and 'Services' tab. How many of those programs do you see actually visible on-screen? smile.png

 

Many programs you can run from the command line, and some are very powerful. Microsoft, Linux, and Mac all have many programs built in that don't have any interface. ImageMagick is a famous one (downloadable) that lets you manipulate image files in-bulk. Many webservers have it pre-installed, but I use it on rare occasions on my Windows machine.

 

Here's another example of one: Open a command prompt (Start -> Run -> cmd.exe), and type in 'ping www.google.com' to have your computer send a network packet to Google's webservers, and measure the amount of time it takes to go there and back. 'ping' is a program built into almost every operating system. Non-visual tools like these often do one thing, and do it well, and people chain the output and input of multiple "command-line" programs to run complex tasks on bulk files. Some can be dangerous to use, though, if you accidentally ask them to delete files you didn't want deleted - I almost did that the other day. happy.png

 

Game-wise, these kinds of programs don't serve much purpose... but game servers don't have visual interfaces, and so don't need graphics APIs (They all use other kinds of APIs, though - like the built-in networking APIs most machines have, or file-access APIs, or etc...).

 

Oh i understand now, I thought you meant they could be made with the standard C++ libraries which is what confused me haha. I figured I'd need some sort of API for it anyway.

 

Thank you very much for the helpful information, I know what I need to do now :D

0

Share this post


Link to post
Share on other sites

the windows API is still relevant today just read "the old new thing" or check any games code base it mostly uses the Shell functions of the windows API as that takes care of dealing with all of the UAV permissions.

 

A game always uses platform API's that it runs on, it is the engine that abstracts this away for other developers on the team, but the code underneath is platform specific and uses the correct API's. Whether that is Xbox, PS3 or Win32/64.

0

Share this post


Link to post
Share on other sites

Are you wanting to build games for Windows or other platforms?  Mobile platforms have certain restrictions and some of them may not even support C/C++.  If you want to do cross platform development you could use something like Unity, but then you'd be programming in C# most likely.

 

I started off using SDL but ended up replacing all of their code with Windows API calls when building my own game engine so that I could have more control over how to manage my app and windows.

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