Skip to toolbar

Reply To: [unofficial weekender] Yet another Friday

Home Forums News, Rumours & General Discussion [unofficial weekender] Yet another Friday Reply To: [unofficial weekender] Yet another Friday

#1663246

blinky465
17028xp
Cult of Games Member

So I dropped The Wife ™ at the hospital this morning. It’s nothing serious (hopefully!) but she’s in for an overnight stay. Due to covid restrictions, I wasn’t allowed in beyond the first reception, so snuck off and got me some breakfast before spending the day “refactoring” my app-based game code.

Man – it’s difficult enough converting game rules into code, but inventing rules on-the-fly and then implementing them in code (and then trying to find where the bug is when it doesn’t quite work out as expected) is a real head-masher (though probably just what I need, to keep distracted today!). I’ve implemented my “line of sight” routines and given every obstacle a “visibility value” against which the computer rolls a dice to determine if you have successfully seen through the object (think dirty windows, a wooden slatted fence etc).

Everything was working fine; I even had transparent obstacles – which impede your movement but you *can* see through (e.g. windows) and can shoot through (glass) or not (bulletproof glass). And instead of calling it a day, I thought it’d be really cool to have “low level” obstacles which stop you moving, but you can see through (ok, over) and fire through/over but still offer a tiny little bit of cover if being shot at (the specific example I’m working on is a coffee table).

Now my head is in a tangle of spaghetti code and I’m not sure I want to start pulling at the two or three loose threads I found.

If I get this sorted, I might take a few hours off and go for a dip in the sea. There’s always coffee and cake waiting on the other side of cold swim!

 

Supported by (Turn Off)