Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!

Jon Alma

Member Since 24 Sep 2002
Offline Last Active Today, 02:58 AM

Topics I've Started

Coffee Table Game Design / Game Art Books?

30 April 2014 - 11:42 PM

Can anyone recommend goo 'coffee table' books on game design or game art?  To explain what I mean not necessarily books digging into specific elements of a game (along the lines of how to develop pathfinding AI for an RTS game), but books looking at the higher level thought processes, philosophy or inspiration behind the overall design of a game or the art that gives a game its distinct look.  I've seen a few books that come close, but they tend to concentrate on one specific game (for instance the Art of Titanfall) and ideally I would like to find a book that case studies several different games or gets the feedback from several different 'leading light' designers and artists.

Zooming Billboards and Maintaining Image Quality

28 September 2013 - 11:01 AM

I have implemented a 3D map display for the game I am currently working on.  The map can be scrolled and zoomed as required so the player can either have a zoomed out view of the whole game world or zoom right in to get close to the action.
For the landmarks (buildings) on the map I have played around with using fully 3D models, but have eventually gone with a billboarding system.  This works great when zoomed right in with the texturing on the billboards nice and crisp with each building being surrounded with a border (worked into the texture) to maximise visibility.  However, when zooming right out the billboards obviously get smaller and the buildings more indistinct.  This is okay up to a point but one thing that annoys me is that the border around the buildings gets finer and finer until it looses its clarity.  To give an example the image below shows one building at maximum zoom and minimum zoom.
I would like to improve on this and as a minimum ensure that a clear border is visible around each building.  As an idea I am thinking about creating additional textures for use when zoomed further out, the basic texture being unchanged but a progressively thicker and thicker border being applied to ensure this.  However, before I start down this road I wanted to check if there is any alternative out there (one point to note is that certain buildings have 'cutouts' meaning that a border may be needed inside the outline of the building).
Any help appreciated ... thanks.

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

02 May 2013 - 02:39 AM

I've been quite happily using Visual C++ 6.0 for years for my own personal game development and have never until now felt the need to upgrade to any version of Visual Studio (basically, if it isn’t broken and it is still performing well then why try to fix it).


(Un)fortunately the time to change has come with a change of computers and a move from XP to Windows 8 ... Visual C++ 6.0 just about works in Windows 8 but having played a little with Visual Studio 12 I am beginning to see the advantages of a move.  Unfortunately my existing code base (30,000+ lines of code) is reluctant about the move ... I have updated the project, sorted out all kinds of compilation errors, but when running my compiled code I consistently get crashes.  Debugging seems to point to problems with my use of std::map and std::list code, although to be honest there is more than a hint that there may be a problem with dynamic memory / pointer use.


This is all a little bit frustrating as the code still compiles and runs successfully in Visual C++ 6.0 (even on the new machine), I now have to look through the 30,000+ lines of code when normally debugging is limited to the most recent code additions, and I suspect that I have got into bad / non-standard, but successful habits in the past so something that is obviously wrong to someone more familiar to Visual Studio will look right to me!


To help me with this process are there any good sources (websites, whatever) that highlight commonly needed code changes for people porting from Visual C++ 6.0 to Visual Studio and/or updating std::map and std::list code ... or will I just have to break down my code base, debug and rebuild bit by bit (which will probably take ages as some of the code has been left untouched for years).

Unit Twitching When Targeting Another Unit

22 October 2012 - 03:17 AM

I'm well advanced on a 3D RTS game where the player's view is pretty up close and personal (the number of units and the game mechanics means that satellite views of the world are not actually needed or a huge advantage and as such the viewpoint can be much closer to the unit currently being controlled).

Now this is all very nice as it allows me to show off the detailed models and other eye candy, but it does present one problem ... many of the units have turrets that track a target (in 3 dimensions as most of the units are aircraft). This works fine when the target is just selected or some distance away as the turret rotates round until the target is in its sights. However, once this point is reached the turrets have a tendency to twitch or judder. Basically even at high check rates the point being targeted changes every update and the turret adjusts to the new target position. If the target is changing position rapidly then the turret starts tracking again but if the target position is relatively small then the twitching starts and can be very noticeable (there is a certain amount of twitching when units are targeting other units but this is most noticeable for turrets probably because they can be orientated out of parallel with the direction of movement meaning that changes in the relative target position are more frequent).

So far I have done two basic things that should help,
  • Movement is proportional to the frame rate to avoid uneven movement (and this works fine with normal turret rotation)
  • When close to being on target the turret will rotate only what is needed and not the total rotation possible in the time since the last update (there shouldn't be any rotation overshooting and need to adjust back ... although I am currently rechecking the code once again).
However even with this the judder is still there and I have a feeling that I need to 'dampen' the rotation when nearly on target. Here I can see three possible solutions,
  • Acceleration and deceleration on the turret movement so as it starts moving again the adjustments are smaller than when in full rotation ... however I have a feeling this will still result in visible twitching
  • Using a firing cone - while the target is still in this cone the turret does not move (as it is effectively still on target). It would reduce the small twitches but would this result in less frequent but larger adjustments (slower bigger twitches)?
  • Delayed movement after firing so they turret does not move for a certain time and then checks if adjustments are needed. I suspect this is similar to using a firing cone (the target is assumed to still be on target)
Any advice in this area would be most welcome (either in helping me find the cause behind this problem or the solution best placed to add additional smoothing).



Problems with Stencil Outlining

01 August 2011 - 05:34 AM

I'm currently working on a map display where a 2D map is projected in 3D with the player being able to scroll around the map to select and move units around. Some of these units (actually stationary buildings) act as radars and I am working on displaying circles indicating the area that their radars cover.

As a first step I have go semi-transparent filled circles working (with each circle displaced slightly in the vertical to avoid any issues with Z-fighting. Now what I would like to do is draw an outline around the radar circles with the outline not shown when circles overlap ... basically I am trying to develop something similar to that seen in the Homeworld series ... and basically I am trying to base this off this old Flipcode article ... Flipcode

To do this outlining without overlap I understand that I need to use stencils to identify where to draw ... and not draw. As a result I have put together this bit of code ...



	glStencilFunc(GL_ALWAYS, 1, -1);

	yoffset = 3.0f;
	for (bcount = buildlist.begin(); bcount != buildlist.end(); ++bcount)

		pos = bcount->second.get_map_pos();


		pos.y = pos.y + yoffset;
		yoffset = yoffset - 0.2f;



 	glStencilFunc(GL_NOTEQUAL, 1, -1);


	yoffset = 3.0f;
	for (bcount = buildlist.begin(); bcount != buildlist.end(); ++bcount)

		pos = bcount->second.get_map_pos();


		pos.y = pos.y + yoffset;
		yoffset = yoffset - 0.2f;





However, whatever I try to do the effect is the same with stenciling either not working or being ignored (due to a problem with the logic operators?) and the result being a series of overlapping and outlined circles (whether the outline is shown or not being dependent on the vertical offset of each circle) .. basically what I would get with normal depth masking.

Can anyone see any obvious reason for this not working?