Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Sep 2012
Offline Last Active Today, 01:06 AM

#5293808 Do you usually prefix your classes with the letter 'C' or something e...

Posted by on 27 May 2016 - 09:14 AM

I still maintain my old C style after all these years (even in C++).  When I start a project, I'll take the first two letters of the name and make that my prefix.  After that, it is the "ol' way of doing things."

void ge_foo_bar( void* foo, const unsigned int bar );

#5281505 Building in a OS that you don't have (Cross-platform 2D engine)

Posted by on 16 March 2016 - 10:38 AM

Now I ask: Is it common for developers to build their projects in Virtual Machines or do I have to own physical Machines? Is there any other alternative for using VMs?


No, it is not common.  Most if not all of the developers I know have physical machines for testing.  Testing in a virtual machine is risky for many reasons; especially since a majority of your end users will not be running the build from within a virtual machine.  If you are going to build for Windows, have a native Windows machine with at least your bare minimum target hardware.

#5280729 Video Content in a Game

Posted by on 11 March 2016 - 11:42 AM

You will need a video library to open the video for you, and render the frame into a frame buffer for display. Same deal with the video's sound, except for a sound buffer or stream, it's usually streamed directly into what ever library you are using to control your sound.


As a sidenote, I've worked on two games that use Adobe Flash for the cutscreens and the UI and I would recommend staying far away from Flash. The lack of tools aside, Flash is an absolute nightmare and you will spend more time fighting it then building on it.

#5279091 How C++ Programs Are Compiled (A Brief Look)

Posted by on 02 March 2016 - 03:39 PM

As someone who has written compilers, and who is currently writing a compiler, I found this blog post off. As Apoch said, most of it is skimmed, and in some places is wrong. With that being said, I found it to be an admirable attempt. To me, compilers aren't anything special. I would like to see some more in-depth coverage on linkers though. That is where the real magic happens, so to speak.

As far as advertising yourself, I recommend sticking the link in your profile quotes section (I know there is a name for it, but I am writing this from my phone and can't get to it).

#5276228 They called me crazy!

Posted by on 17 February 2016 - 05:40 PM

Actual (sanitized) quote from actual game source I've worked on:

#define NET_ERR_UNEXPECTED_SUCCESS                      DEF_ERROR(NET_ERR_BASE + 3)


Unexpected success, aye? To me, that sounds like an issue that only Guild Wars 2 would encounter smile.png

#5259983 How do I re-size a binary file?

Posted by on 01 November 2015 - 08:28 AM

Why are you trying to resize "Batman Arkham Asylum" assets?

#5256042 Thoughts on the Boost.Build system? (as opposed to CMake?)

Posted by on 07 October 2015 - 11:20 AM

However, I also haven't found anything yet I would use to replace it. I have come to accept that build system generators are probably always going to be quite a bit messy.


I know I am a bit late to the conversation, but I thought I would chirp in and mention "Scons."  We recently switched from make to Scons for our Linux and OS X builds and it is a God send.

#5250763 Need to be taught to make a 3D MMORPG

Posted by on 05 September 2015 - 06:33 PM

I wasn't saying cubeworld was an mmo but I was just trying to say that 2 people made a 3D rpg that is fairly multiplayer. But I guess your right though an mmo isnt the way to start. I guess ill start making small games but this leads up to my first question. Where can I learn to make simple games and work my way up?

Why here of course!

#5239942 Problems with vsync on Linux

Posted by on 12 July 2015 - 02:13 PM

First off,




there's no need to show you the code, because it is available on the NeHe website, and you can try it yourself.


This is ALWAYS the wrong answer.  If you are asking others for help, you need to make sure that you supply an adequate amount of code that shows the target problem, as well as any error messages that are thrown.  In this case, supplying the required information is even more important as 'NeHe's tutorials are out of date.


As far as the bad context situation goes, "GLX_BAD_CONTEXT" is thrown for multiple reasons, however, they all revolve around the fact that your context is not a valid GLX context.  With no code, this tells me that your context creation failed.  Again, this happens for any number of reasons.  For starters, I would try running natively and not in a virtual machine.  If you supplied context creation parameters that the virtual machine does not meet, context creation will fail, thus giving you a bad context, and finally leading to 'GLX_BAD_CONTEXT' being thrown.  If you want more help that that, post the code and errors.


EDIT: Adding to the whole extension mess, make sure that if you are using extensions, that they are currently supported and loaded -- especially the vendor specific extensions.  Depending on usage, that could also potentially cause these issues.



#5237286 how to program A LOT of skills/spells?

Posted by on 28 June 2015 - 12:02 PM

Base class with derived skills isnt a terrible idea. But you dont need a class per skill. Group them into similar ones and change them with paramterrs. Examle would be to have a base class of CSkill. Deribe from it say a skill CLaunchProjectile. Now launch projectile can be used for your fireball or your arrow...just change the texture of the actual projectile created.

Also i would not really use a flag system for determining if they have a skill. I would create a list of CSkill and whenever a character earns a new skill add it to the list. Then only allow skills from the list to be used.


It has been a good long while since I have worked on a game that uses spells/skills, however, the general theory is that all "castables" have common specific traits.  These traits can include fields such as damage, cool down time, type (AOE, single target, etc), etc.  Store all of these in a base class which can then be derived and implemented per-skill.  As for implementing a large number of these, there are several good approaches, but the one I use the most is to create a scripting type setup where I define these attributes from external file containing JSON.  This way, none of the skills have to be hardcoded.


EDIT: Alex has a solid answer.

#5236826 C++ Best Scripting Language

Posted by on 25 June 2015 - 03:26 PM

The best scripting language for C++ is C++. It integrates perfectly and is very powerful. ;)


No arguments there rolleyes.gif

#5236126 Read a text file from a .zip container

Posted by on 22 June 2015 - 03:13 AM

I can remember back to when I was writing my filesystem and having this very problem doing exactly what you are doing.  All of my other assets worked fine, but when I tried to read in shaders stored in text files, I got crap binary data on the end, which caused shader compiling to fail.  At first I thought it was encoding, but no matter what encoding I used, I always got it.  The weird thing was that it only happened under Windows.  Under OS X and Linux, the files read as intended.  I noticed that it always appended the same data regardless, so what I ended up doing was reading in the text file and cutting off the last of file that contained the added chars.  Not ideal by any means, but it worked.

#5233417 Special question about learning (STL and STD, etc.)

Posted by on 07 June 2015 - 02:04 PM

I am thinking of spending some time with STD and STL but thought I should ask because they might be deprecated or are not recommended anymore.


Not much more to add on the subject as Frob pretty much nailed it right on the head.  I thought I should chirp in on this statement though.  C++'s standard template library is far from "deprecated."  In fact, it is quite the opposite. It is very much worth it (and recommend) to spend some time with it and learn how to use it.  In the 13 or so years I have been writing C++ applications, I don't think I have ever worked on one codebase that doesn't use the standard template library in some way or another.

#5232402 should WndProc process WM_QUIT?

Posted by on 02 June 2015 - 10:17 AM

Erik hit the nail on the head.  I never bother detecting or processing "WM_QUIT."  "WM_DESTROY" will suffice for just about anything you would need it for.

#5229706 Should I use an installer or .zip for my game?

Posted by on 18 May 2015 - 04:42 PM

I take it we are talking about Windows only? (different platforms have different expectations in this regard).

I'm a fan of zips, so long as the game is fully self-contained in it's folder, and doesn't need to be installed to Program Files, or have a bunch of dependencies installed, etc.


I always create installers on Linux, Mac, and Windows, however, I usually provide an optional zip for Windows and tarballs for Linux and OSX (as I am more of a fan of tarballs).  This also depends on what the application is and who the intended consumer is.