Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gerryq

Pages: [1]
1
7DRLs / 7DRL Registration doesn't work on Internet Explorer
« on: March 07, 2014, 09:00:28 PM »
Not for me, anyway.

It works on Chrome (didn't actually register as I am not 100% certain I will enter).

Anyway, just a heads up in case anyone is balked from entering.

2
Programming / Re: fov: radial or square?
« on: May 13, 2008, 03:22:30 PM »
Radial looks better, no doubt about it.

Personally I didn't bother with it in Lair of the Demon Ape - you can see as far as all edges of the game window if nothing is blocking your view.   The square lit region doesn't look great on the map screen, but I don't think that's a major flaw, as you will only be looking at that screen intermittently.

I used radial for Potions of Earth Sense (magic mapping) because it looks better, even if it clashes with game mechanics.  Also there is a small gameplay advantage, as wizards with a magic mapping spellbook cannot easily map out the whole dungeon as a grid.

How much does limited FOV add to a game?  I'm not convinced it adds much - even if FPV is unlimited, a monster could still be lurking around a corner or behind an obstacle.

3
Programming / Re: How to do this?
« on: May 13, 2008, 03:14:15 PM »
You shouldn't have too many globals (or semi-globals - an object instantiated in your main application function such as a CWinApp-derived class is global in all but name).  But for a game where you know there will be just one of particular kinds of things (e.g. the game output window), there's really no harm in using a few.

4
Programming / Re: Worst bug you had?
« on: May 13, 2008, 03:08:44 PM »
If it is crashing half your test runs, you should be able to find it.  Try giving the player a sword instead of a staff - does that fix it?

Try setting a breakpoint just before the bug happens and stepping through the code a line at a time, until you find what line the crash happens on.  What error message do you get? 

Then step through very carefully from a little before that, looking at all the variables.

5
Programming / Re: Worst bug you had?
« on: May 13, 2008, 03:05:36 PM »
Buffer overruns, dangling pointers, uninitialised variables... one reason to use C++ is that you don't need to have any of these things (maybe the occasional use of pointers for efficiency, but try to avoid it).

Always use vectors instead of arrays (you can make an exception for dungeon maps).

Always access objects in vectors using the index (a downside of using arrays is that pointers are dangerous, unlike in C-style arrays, because vectors can reallocate).

Try to use vectors in preference to lists.  Lists tempt you to use pointers.

Always initialise variables in the constructor (exceptions can be made for really small classes such as Point, Rect, etc.).

Whatever you do there will still be bugs.  Chase them hard when you see them.  Sometimes when you have a baffling bug, when you wake up ater a night's sleep you will know the cause.







6
Programming / Re: Do you like your game?
« on: May 13, 2008, 02:57:40 PM »
I like Lair of the Demon Ape - it is still a good challenge for the developer, and I play it sometimes.  I find level 1 too easy and level 2 a bit boring, though. 

Pages: [1]