Josh Cooper
, ,
No Comments

Games aren’t particularly renowned for their spot-on physics simulations. In fact, they often take quite a few liberties with reality. But therein lies a curious charm—a world where the laws of nature bend to the whims of entertainment. In this article, we dive into the realm of game physics, where simplicity reigns supreme, and accuracy […]

2016
Josh Cooper
, , ,
No Comments

Normally a tile map displays spaces which can be defined in finite terms using a piece of paper. A hypermaze, however, can be defined using a piece of paper, only, if you use a graph to describe how the pieces fit together. This is true for my hypermaze, and I suspect it should hold true for most other hypermazes. A tile map is a lot like a piece of paper, only a lot less powerful; thus in relation to a tile map you should consider the space of hypermaze to be undefined. You can’t measure it, because it doesn’t have a concrete form in 2 dimensions. You might have success defining it in three dimensions, but then you’ll be unable to translate it to the tile map.

So how can a tile map be used to draw an undefined space?
The answer I found was: little by little.

Josh Cooper
, , ,
No Comments

Number distributions are excessively useful to random number generators. Procedural generation tends to revolve around random numbers, ergo number distributions are immensely useful in procedurally generating data.

With distributions you can easily give some spice to your random number rolls. Give a hero a damage range (eg. damage: 400-800), next calculate the weight of values in that range based on the hero’s level. So now you have a hero at level 1 who will roll more 400’s than 800’s; take a max level hero and they can roll more 600’s or 800’s or whatever number from the range that you want. This type of generation can apply to whatever you’d like though.

Josh Cooper
, ,
No Comments

If you have a project you’re working on which has memory constraints, you’ll probably consider data compression to some degree or another at some point in development. Memory constraints are usually due to limitations of hardware on your target system/architecture; for reasons, you’re probably looking at anything from cache sizes, to stack memory, or physical memory.

With my rover project, my constraint was stack memory. Developing a recursive algorithm you can easily run out of space, so it becomes almost a base requirement to compress your data.

Josh Cooper
, ,
No Comments

There you are designing a parallel algorithm, and then it occurs to you: How do I return information to the main thread from a child thread?

If you’ve skimmed through half of The C++ Programming Language (4th Edition) by Bjarne Stroustrup like I have, you may recall a section about futures and promises which are related to threads.

Well those are exactly what we need, although I am sure you could create a custom solution. Like perhaps locking and inserting your data into an external container. Perhaps you prefer a standard C++ answer to your problems though? This way it makes sense and you need less comments.

My case was that I wished to learn the “proper” way to do it, and boy did I have a time learning.

Josh Cooper
, , ,
No Comments

A recursive pathfinding algorithm finds a path by growing & backtracking a path. You can’t evaluate multiple routes, you only have the one, and you explore it til you reach a dead end or the goal. So, how pray tell does one optimize a recursive pathfinding algorithm? The simple answer is instruction sets. If you […]

Josh Cooper
, , ,
No Comments

The problem is this: You have a two dimensional grid, and you need to scan the entire thing. Sure, but what does this ambiguous “scan” do? Well this particular post is about a word search puzzle, so the scans need to create strings to be used as search areas for the puzzle words. Scan the puzzle, and it compiles a list of all the columns, rows, and diagonals.

Now, there are a total of 8 directions you can scan a two dimensional grid by. { N, NE, E, SE, S, SW, W, NW – Exactly eight.} Wouldn’t it be nice if we didn’t need to scan all those directions. Well, if you think about it ‘E’ is a reflection of ‘W’ the same as ‘NE’ is a reflection of ‘SW’. Since the thing I just said, we don’t actually need to scan all 8 directions up front. We do need to look at all 8 directions, but we certainly don’t need to create strings for all 8.

Josh Cooper
, , ,
No Comments

I have an EVGA GTX 580 video card, and either Windows or its driver has a bug. When my computer wakes up after sleeping just about any game I play will crash. It doesn’t happen right away, usually I can start a 5v5 dota match and the game will crash in the middle of a draft; if it’s ability draft, usually just as it is my turn to pick abilities(thus forcing me to have randomly selected abilities). No big deal, just go disable sleep, and hibernation for good measure.

What if you happen to be reinstalling windows frequently, but don’t want to manually configure this? Well you’re gonna have to create a batch file to do it. Well there is a hitch in this plan, and that’s the powercfg is designed rather ridiculously. Apparently it uses entirely GUIDs, which are rather long and difficult to memorize (more so than your windows product key). So what’s a person to do?

Josh Cooper
, ,
No Comments

Last week I had finally had enough of it. You know that feeling you get when you have been running the same installation of Windows for too long? Even if the system isn’t slow, it still feels bloated and dirty.. you know? I have a 32GB SSD installed, and it had everything on it. When I first installed Windows 10 I found out the hard way that half the system would break if you moved around directories and created junctions. That is how I used to move my Users and Program Files to other drives, I even made batch scripts to help the process. I had a script to robocopy the directories and then put down junctions to their new locations. I had a couple other setup scripts I ran as well. None of them were any good to me now though, which was a shame because I just made them before getting Windows 10. I used them a total of 1 times.

So, I thought to myself, how will I make a Windows 10 clean install easier?

Josh Cooper
, , , , ,
No Comments

I’ve been running Windows 10 since July, and I like it. I performed an in place upgrade for both of my computers, so I thought it was high time I did a clean install. I had tried in the past, but I could never get past the activation. It was hard finding information to explicitly say how to clean install windows 10 with a windows 7 ultimate product key.

After a failed clean install with an older version from July. I ended up calling Microsoft Support, they were fairly clueless; probably a situation of the left hand not knowing what the right hand has done. I did acquire one very useful piece of information however, and for the sake of search engines I will spell it out explicitly for you.

To activate your Windows 10 clean installation with a Windows 7 Product Key, you must use and install Windows 10 Build 1511.