Click here to Skip to main content
15,892,059 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
Eddy Vluggen16-Aug-18 2:16
professionalEddy Vluggen16-Aug-18 2:16 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
CodeWraith16-Aug-18 3:12
CodeWraith16-Aug-18 3:12 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
Eddy Vluggen16-Aug-18 6:27
professionalEddy Vluggen16-Aug-18 6:27 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
CodeWraith16-Aug-18 7:35
CodeWraith16-Aug-18 7:35 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
Eddy Vluggen16-Aug-18 7:48
professionalEddy Vluggen16-Aug-18 7:48 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
CodeWraith16-Aug-18 8:02
CodeWraith16-Aug-18 8:02 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
jschell19-Aug-18 5:56
jschell19-Aug-18 5:56 
GeneralRe: A common bug-inducing pattern: building a grid out of linked nodes. Pin
KBZX500020-Aug-18 0:14
KBZX500020-Aug-18 0:14 
For pathfinding, I just draw a bitmap in memory, at the lowest acceptable resolution, put all the obstacles on it, and draw a modified version of A* on top of that.
Then I collect the result, and *bam* a path in < 100ms.

The result usually gets stored on disk (as bitmap), which makes debugging waaaaay easier.

This probably sounds god-awful for most people, but it's a really simple solution to a complex problem.
Easy to maintain, easy to debug, easy to tweak on the fly (by modifying brush thickness of various obstacles!).

Also, it avoids the common rookie mistake: trying to build an efficient solution to a problem you haven't solved yet.
First you build the easiest possible solution, with considerations made towards debugging / testing / maintenance.
Then you profile your resource consumption, so you know for a fact what's slow and what's not.
After that, you refactor until you run out of time or budget to do so.

EZPZ
JokeI've started telling everyone about the benefits of eating dried grapes! PinPopular
Johnny J.15-Aug-18 23:21
professionalJohnny J.15-Aug-18 23:21 
GeneralRe: I've started telling everyone about the benefits of eating dried grapes! Pin
RickZeeland16-Aug-18 0:39
mveRickZeeland16-Aug-18 0:39 
GeneralRe: I've started telling everyone about the benefits of eating dried grapes! Pin
Foothill16-Aug-18 3:49
professionalFoothill16-Aug-18 3:49 
GeneralRe: I've started telling everyone about the benefits of eating dried grapes! Pin
Rick York16-Aug-18 4:36
mveRick York16-Aug-18 4:36 
GeneralRe: I've started telling everyone about the benefits of eating dried grapes! Pin
DRHuff16-Aug-18 4:17
DRHuff16-Aug-18 4:17 
JokeAt last! Scientist have discovered how trees communicate... Pin
Johnny J.15-Aug-18 22:14
professionalJohnny J.15-Aug-18 22:14 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
OriginalGriff15-Aug-18 22:24
mveOriginalGriff15-Aug-18 22:24 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
CodeWraith15-Aug-18 22:26
CodeWraith15-Aug-18 22:26 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
OriginalGriff15-Aug-18 22:40
mveOriginalGriff15-Aug-18 22:40 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
Kenneth Haugland15-Aug-18 23:02
mvaKenneth Haugland15-Aug-18 23:02 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
OriginalGriff15-Aug-18 23:04
mveOriginalGriff15-Aug-18 23:04 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
Johnny J.15-Aug-18 23:40
professionalJohnny J.15-Aug-18 23:40 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
OriginalGriff15-Aug-18 23:51
mveOriginalGriff15-Aug-18 23:51 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
CodeWraith16-Aug-18 0:22
CodeWraith16-Aug-18 0:22 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
megaadam15-Aug-18 22:27
professionalmegaadam15-Aug-18 22:27 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
the goat in your machine15-Aug-18 22:58
the goat in your machine15-Aug-18 22:58 
GeneralRe: At last! Scientist have discovered how trees communicate... Pin
ZurdoDev16-Aug-18 1:59
professionalZurdoDev16-Aug-18 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.