Jump to content

  • Log In with Google      Sign In   
  • Create Account

Jon Alma

Member Since 24 Sep 2002
Offline Last Active Sep 13 2014 10:25 AM

#5172257 map borders in an open world game

Posted by Jon Alma on 08 August 2014 - 05:58 AM

It would also depend on the style of game you are aiming at.  I remember playing a text adventure game years ago that played to fantasy cliches and wasn't afraid to make fun of them.  The edge of the world in this game was a barrier of fog with signs saying "This part of the world has not been created yet" - it worked nicely here but clearly wouldn't work in a more serious game.  In these cases think what the player cannot do ... if it isn't possible to swim then islands work, if the player is flying a plane then what is the effective range before fuel runs out - these create logical barriers that don't break the player's immersion in the game.  

 

And whatever you do don't create something interesting the other side of the 'wall' as the player will probably want to pay it a visit.  Fallout 3 failed for me on this point as there simply was an invisible wall beyond which there was often something more to discover (if the radiation kept increasing until it was impossible to keep moving forwards then this would have worked and made sense to me), while I had a similar bad experience with one of the Fable games. The worst example I've seen is an impressive locked door impossible to open - I wasted hours trying to find the key, break down the door and so on before discovering (by surfing the net) that the door was just there to give the impression of a larger world.




#5060777 Porting from Visual C++ 6.0 to Visual Studio Tricks and Tips?

Posted by Jon Alma on 10 May 2013 - 12:35 AM

Finally, after many days of testing I have made the migration to VS2012 .. phew!!  I won't go into all the details, but to highlight a few things that helped a lot in the process,

 

  • I actually updated the code in VC++ 6 rather than in VS2012.  To explain I went back to the original code base and tried to compile it in VS2012, recorded all the compilation errors and corrected them in VC++ 6.  This allowed me to make small step changes and check that each change worked before moving on to the next.  Meant a lot of swapping between compilers but avoided blindly correcting loads of errors and only being able to test when all errors had been corrected (basically if the code stopped working in VC++ 6 I would only have a few changes to debug).
  • A lot of the effort was involved in tidying up the istream and ofstream handling - the standard really has changed from what I could get away with in VC++ 6 (even if, as it turned out, I could bring my code up to the standards in VC++ 6)
  • NULL is no longer my friend ... there were a lot of instances where NULL checking had to be updated to make proper use of defined boundary checking functions.
  • The static code analysis has been useful for cleaning up some untidy code and making things even safer, but it (obviously) doesn't spot everything and I had one memory overflow that somehow worked in VC++ 6 but choked VS2012 (as mentioned by jwezorek)
  • In the end it was chasing down the broken class, isolating it from the rest of the code and testing and testing again until the bugs were found.

 

Many thanks for all the feedback - it really helped.




#5058852 Porting from Visual C++ 6.0 to Visual Studio Tricks and Tips?

Posted by Jon Alma on 03 May 2013 - 03:07 AM

Thanks for all the feedback so far ... much appreciated.

 

There was a very good reason that many businesses took the opportunity to rebuild their apps from the ground up around that time frame.  The post-standard tools broke the pre-standard code so badly that it was often easier to rewrite rather than debug and fix.

 

This is what I'm worried about!  Ideally I would like to avoid several weeks/months of debugging or recoding to bring this up to date (especially with Visual C++ 6.0 looking over my shoulder and saying "I still work!").  Anyway the process has started and I am unit testing and analysing each class ... good thing I'm not running to a deadline.

 

To narrow down your errors, you could try some static code analysis tools. If you have a fat wallet, I've heard some decent things about PVS Studio. If you are on more of a budget, then VS2012 (not sure about express) has some integrated static analysis, and there's a few other options if you search around the Internet.

 

I'm already using the VS2012 static code analysis (it is available in the Express version) and this is actually one of the main attractions of moving up as it is very useful in tracking down the stupid errors that usually take ages to find.

 

Do you have any examples of something that crashes?

 

Not any more ... or at least not worth sharing at this point.  I have a list of changes to check through in all my code and I have unit tested one of each of my std::list and std::map using classes and they seem to be clean and consistent with the current standards ... and they compile and run without any problems on their own.  Still looking for the source of the crashes but am now doing this systematically by cleaning up the whole code base rather than just trying to fix the immediate problem.  Will provide an update or examples when the current clean up is completed.




PARTNERS