Category: Shining Online

RSS Feed

Shining Online – How we did AI

Hind Beetle - The Atari ST Version Woah, a Shining Online update! Unfortunately there’s nothing really new in this entry, but if you want to see how the old demo worked you might be interested.

I’ve tried to extract as much useful information from the original source code as possible, but it really was a mess. Blame my youth and inexperience for that :P

How the AI worked, or “Everybody hates Ken”

If you’ve played Demo 4, you probably notice everybody gangs up on Ken. It might think it’s because of his awesome blue hair, but that’s not the case.

Every time an AI in Shining Online decides to move, it has to decide whether to attack, move or defend (and heal/support if I’d got that far ;)).

Who do we attack?

The AI would first cycle through every player on the battlefield. Each player is assigned a score to work out how dangerous they are to the current enemy and how likely they are to die.

Scores were assigned based on the following:

  1. Players with less than 25% health get 15 points.
  2. Players that can be killed by this enemy (health < attack) get 25 points.
  3. If enemy attack multiplied by their bravery was greater than the player defence, there’s a 10 point bonus.
  4. Closer players are given higher scores.
  5. 10 points are added for each enemy the player has killed.
  6. Cody has a 10 point bonus for being the team leader.

All the scores are then sorted, and the enemy has its target. However, not all targets are in range, so a little extra decision making needs to be made. If the player was out of range, but the enemy had high bravery they’d rush towards them, otherwise they’d stay still.

And that’s all there is to it!

Further Improvements

The addition of healing would have made things far more interesting, but I was far too lazy to add it.

Here’s a couple of improvement ideas for the next version:

  1. Take healers and mages into account, especially ones with multiple hit spells.
  2. Look at what other enemies are doing.
  3. Have an “order” queue that can have instructions added to it by the boss enemy. For example, if the boss felt threatened by someone, they could send minions to destroy them. This could also be used to instruct units to heal others.
  4. Don’t move into dangerous squares. Each square could have a "danger" rating assigned to it, calculated by adjacent enemies and land effects. Enemies would avoid squares with high danger values.
  5. Magic and support. Perform attack spells on the heavy hitters, or boost the defence of healers and "tanks".
  6. Personalities and vendettas. The "bravery" attribute was an attempt to do something like this, but it sucked.

The biggest problem with all this is keeping things fun. An AI enemy is playing to win, but it has to do it in a fun way. Having enemies do a pincer move or set you up for defeat can be fun to play, if it’s done in an imperfect way. This is where personalities and randomness come in, as you don’t want enemies to always react the same way.

A look at the SO Editor

Once development of the PC version of Shining Online started, it became apparent that a suite of editors would make creating the content much quicker and easier than adding information directly to the source code. Here’s a little look at two of the old Shining Online development tools.

Shining Online – Level Editor

The first version of the level editor was built directly into the game engine, and could be activated by pressing certain keys. The buttons on the side would slide onto the screen in a similar fashion to the Dreamcast web-browser, and the whole thing was controlled using the arrow keys.

As the levels got larger and more complicated, using this editor became much harder. After the first demo was released it was re-designed and rebuilt from the ground up.

SODA

The “Shining Online Development Application”, or SODA, was the next iteration of these development tools. It was a separate, full screen application that took advantage of a higher resolution and the mouse, so was much easier to use. It made it much easier to edit maps and characters, and integrated an “event editor” that allowed the user to create simple scripted events, such as characters speaking or changing the weather.

The quest featured in Shining Online Demo 3B was developed using SODA, which was difficult considering the unfinished state SODA was in. It was mainly a race between adding functionality to the main game and then adding a method to edit it in SODA.

The Future…

When Shining Online was put on indefinite hold, my focus switched to other projects which would need a set of editing tools to be created. Instead of creating a million new editors for each new project, it seemed logical to create a single, unified application which other editors could be built on top of.

Instead of writing a complete GUI system as in the first two applications, the standard Windows GUI is used instead. Naturally a few extra bits have been added, and the finished version should allow for GUI’s to be loaded dynamically from an XML definition file, which opens up the possibility for the application interface to be developed using itself.

The editor is currently in development (as always), but is still called SODA. Because recursive acronyms are so popular these days, SODA should stand for something groovy like “SODA: Omnipotent Development Application”. I think I’ll keep that.

Shining Online

From this topic on YOB.

“I suppose I’d best make an announcement about this.

Firstly, I’d like to say a massive thank-you to the people who’ve voiced their support for the project. I realise some (most) of you were just posting ‘cos people here made you, but I’ll let that count :P

Anyways, I’m sure some of you are eager to know if work on SO will resume. The old code is more than a little dated, so most of it is being scrapped. Fear not though, the new features should make up for this short delay in restarting things. There’s still some kinks in the design to work out, but it’ll all get sorted in time. As always, anyone who wants to suggest a feature is welcome to. No idea when the next demo will be out. I wouldn’t count on it being in the next few months, as I have a degree and a girlfriend to take care of. I’ll be using the worklog feature on the site to keep you all updated, so once I fix the site up you can check there to see what me and Newts are doing =)

So in other words, yes, it’s back.”

SO truly revived!

Perhaps it’s easiest to quote Ty himself on this one:

With such an in depth title, could this topic get any more intellectual? This is going to be a difficult post for me to write. Not only because it’s a subject that is important to me, but for some strange reason it’s important to other people. Plus I’m in a terrible mood at the moment… I’ll try and keep this short and free of over sentimentality.

First things first, Djobi is 100% correct. I’m sure he’ll be pleased to hear that. It’s not easy for a developer to admit that a project failure is entirely their fault, but in the case of SO it was my fault. I started coding it well before I was ready, and it was more of an experiment than anything else. Maybe in that respect it should have died long ago.

Negative feedback does get me down. I worked hard on that game, and to have someone dismiss it as crap without even giving it a chance gets me. I don’t expect everyone to like it. Hell, I didn’t expect anyone to like it, but some of the comments I got just made me wonder “Why should I bother?” That kind of thing kills all motivation.

So where does this leave SO?

It isn’t an easy decision. There’s a lot of work involved, and it would have to be started from the beginning. As you can imagine, that increases the burden a lot. I’m in no doubt over the amount of work that would be required. I’ve learnt that the hard way.

Enough boring shit. Here’s the answer. Will SO return? Yes.

And there was most definately much rejoicing! :D
Feel free to party away on YOB :P

Shining Online – revived!

Nah, only joking. The forum’s back, though, at the insistence of Seanikins, mostly. If you want to discuss SOnline, what it meant to you, how much you’ll be willing to pay to see it return etc., I suggest you head over here, and let your voice be heard.

No guarantees we’ll be listening, though :P

P:6/18 1 2 4 5 6 7 8 17 18