ID:41694
 
Just jotting down some thoughts. Comments welcome.

Current implementation focus
I was thinking about Splategy's A* development. When you tell a unit the next objective, it calls a proc to analyze the map for the shortest path to it. The analysis does some sleeping along the way so that an impossible path on a large map won't lag the game, just the unit.

The problem
So what if you change your mind and choose another objective while it is still analyzing? You get wasted server processing, wasted resources, and object confusion.

The idea
I'm considering the A* running from an object proc. That allows each unit to keep track of their pathfinding in parallel. That makes a cancel proc possible, which would check a running flag, set a cancel flag, wait for the running flag to clear, remove the cancel flag, and return. The A* proc can set the running flag, detect cancel flag after each sleep, and if so clear the running flag and return.

Organizing thoughts
How about each unit will have a brain object. The contents of the brain object will be minds. Each mind will have a way of thinking and can gain skill from being exercised.

So when I click an objective, the game tells the unit: "go to this spot instead". The unit uses its brain to see if it needs to cancel a thought. If so, then it tells the mind working on the thought "cancel" and waits for it to acknowledge. Then it chooses the appropriate mind to work on the problem depending on the emotional state. Then it gets the mind working on the problem at a rate depending on the experience and current stress level.

So a unit might have "a mind for safety", or "a mind for efficiency", or "a mind for aggression" and the path from here to there would depend on which "state of mind" they are using to solve the problem. Safety? Include defensive quality of turfs in the heuristics. Efficiency? Just the bare-bones shortest path. Aggression? Include offensive quality of turfs.

Figuring out who should do what
Another problem with the game is trying to decide which unit to scout, defend, attack, etc. There will not be standard classes in the game. However, you will be able to specialize a unit just by limiting how you handle it, so it's skills over time will develop along those lines. This is because they gain experience by practice (with a learning curve).

So let the player name a class, choose a symbol for it, and assign the unit to that class. To help with this, allow them to get a report of units sorted by whatever skill they want. Looking for the sniper? Should you pick the slowest unit or the one with the best aim? Either way, you would be able to choose the skill, sort or reverse sort, and see who comes on top. But still you don't have to play the unit as a sniper just because you assigned him to your "sniper" class. The class name means nothing to game mechanics. Run him around and he'll get more experience at running and not aiming.

Where are my units? Where is my team?
You won't get a team when you start. You'll get newbie "walk-ins" for units. These are people who show up at a paintball field, haven't played much, don't know anybody, etc. You can't buy gear for a walk-in. They bring their own. The nice thing is they cost you nothing. This is good because you don't have any sponsors yet.

Temporary Troops
The game will track how you fare in matches. Play your walk-in's well enough and some might get interested in sticking around for a while. Instead of new people each day, you start retaining units for development. Well, at least for a little while. Now that you have team members, you can start thinking about gear. Buy gear and keep it in your trailer. Temporary units will stay longer if they get to borrow some nicer stuff than what they own.

And now, a word from our sponsor
Teams get noticed, and then the sponsors start to come. Nothing special yet. Maybe it's the local salvage yard owner who will invest a little but you have to let his boy play on your team. Winning matches and gaining sponsors will allow you enough funds to offer your temporary units a contract. Not so temporary anymore! Developing the team makes it attract more sponsors. Spiral up!

Bustin' caps
When retaining units, you start to discover things. Units get only so good at this or that skill then no better. You can't predict this, it just happens. It's the dreaded skill cap. How will you attract new sponsors when you can't develop your team? Eventually the unit reaches its prime and it's not all that prime.

Scouting for units
By now you're stacking some papers, so spend some of it and hire a talent scout. A scouted unit might have better skill caps. It's not guaranteed, but it's possible. Negotiate contracts. Fire people. Now you have a team of units worth the big sponsors and can start serious unit trading with the other players, and participate in the national and international levels.

I guess to muds, this aspect of the game is all about "pets".

Final thought of the day
I don't know how much of this I will implement. For now, I'm going to work on organizing the units so they have brains and minds starting out with this basic A* proc.
You should really take advantage of bullet lists and images in your blog posts. Huge walls of text are very intimidating to read.
Thanks foomer. I see how your blog does that. I'll remember that next time.