Computer Science

The Unity Prefab Waterfall

The Unity Prefab Waterfall

A place for everything, everything in its place. Benjamin Franklin That’s why we care about this technique, because otherwise without it we duplicate things in Unity – a lot. Then… We lose track of our project. Bugs appear everywhere. Builds swell to device-breaking sizes. We go a little crazy. … and then die! OK, I may be exaggerating just a little here, but in my experience creating some of the world’s biggest and best online courses on Unity I get to see what my 100s of thousands of students do right – and wrong. The Premise NOT premises, like a  building. And when a cloud provider offers you an “on-premise” solution then they’re dumb, they mean “on premises”. Man, who can use a dictionary these days! Anyway, I digress. When you sit at a computer typing, or using your mouse, think about how much value it’s even possible to create. If you type continually at am ambitious 80 words per minute, then you’re only creating about half a kilobyte per minute! You may create real value a little faster with the mouse, but I doubt it! So if you’re not recording video or audio, your project file shouldn’t be growing faster […]

Read More

Why A-Star Pathfinding Sucks

Why A-Star Pathfinding Sucks

Looking to get a game character from A to B? Want it to work-out its own route around obstacles? This is called pathfinding, and everyone keep harping on about A* (said A star). This is an awesome technique, but it can also suck for beginners! Why? Because it’s much more complex and, in many simple cases, unnecessary. The table below shows how it stacks up against other pathfinding algorithms… As you can see, A* doesn’t win on all counts. Do you need movement cost – the ability to have areas where the character moves faster or slower like roads or swamps? Do you need blistering speed, or would 50% slower than A* be just fine? If the answer to these questions is no, and you’re just starting-out, why would you put yourself through the pain of learning A*? Apart from the added complexity of understanding and programming A*, there are some other ways in which it sucks. If you want to find a path from a start point to multiple possible end points, or from multiple start points to one end point (thing Defence Grid 2 or other RealTime Strategies), then A* sucks as it’s designed for point-to-point pathfinding. The […]

Read More