How would realistic AI work for a game like Starcraft

Published May 26, 2022
Advertisement

The AI will operate from within a screen frame that covers only a small portion of the map. It can move that frame on the map in order to get access to units anywhere on the amp but it can not interact with units that are not in the frame. There are three types of things visible in the frame: units, buildings and terrain patches. The AI keeps constant track of all of there 3 factors. The AI understands the situation on the map as a whole but it only reads new information and drives change on the map through the narrow viewport.

0 likes 18 comments

Comments

Calin

I`m not looking to strike points every single time by laying out properly the words in a phrase. The message is more important than how I`m expressing it. Sometime I leave it to chance, use expressions I`m not sure about. I will I`m keeping in mind your point though, sound like a constructive observation.

May 26, 2022 12:30 PM
JoeJ

The AI will operate from within a screen frame that covers only a small portion of the map. It can move that frame on the map in order to get access to units anywhere on the amp but it can not interact with units that are not in the frame.

Then your goal is more ‘fair’ AI than realistic AI, i guess?
The game should feel as with playing against a human in multiplayer?

There are some problems:
The frame may be fair, but what if AI frame is far from the players frame? Wouldn't the AI appear dumb and inactive in this case?
Even with the frame, we still have no human alike behavior, and the frame does not help against that.
Isn't it better to spend resources on the player frame instead? To entertain the player, provide fun, etc.? We have so much other options to balance the match for fairness.

May 26, 2022 12:46 PM
Calin

but what if AI frame is far from the players frame?

In a game a player`s frame (screen) and the AI`s frame(screen) aren`t related. Like if you`re playing against another human in multiplayer you don`t know where his screen is centered at. If there is an important battle going on you may only assume you and your opponent are looking at the same part of the map (cuz that`s how you control your units in the problem area)

Then your goal is more ‘fair’ AI than realistic AI, i guess?
The game should feel as with playing against a human in multiplayer?

A gosu player can take you out before you get to make your third click on the amp, even if he just like you has a limitative screen/frame to operate through. The purpose of frame is to limit to the max the amount of dynamic things going on.

May 26, 2022 01:43 PM
JoeJ

If there is an important battle going on you may only assume you and your opponent are looking at the same part of the map

So there is no way to know this, e.g. you see opponent units changing their direction, because the other player gave them a new goal?

Isn't that lame? Maybe the R in the RTS could use some more attention, so the opponents actions become more visible, and more local action goes on, at lesser latency.

The purpose of frame is to limit to the max the amount of dynamic things going on.

But you still need to simulate the whole map anyway. So what are the ‘dynamic things’ you talk about?

May 26, 2022 05:19 PM
Calin

Why are you getting upset? this is not a single person show. This is the abandoned toy factory, no one really knows what hides behind the corners here.

this project is about rewireing old technology.

May 26, 2022 06:40 PM
JoeJ

Why are you getting upset?

Why do you assume so? I'm not. Guess it's because i said 'Isn't that lame?'.

rewireing old technology.

Yes. So in other words: new tech, new things? And that's what i'm after…

So if you say, in RPG multiplayer you can not notice the presence of the other player, i notice the opportunity to change / improve this.
Maybe it would be more fun if you do notice the other player. Or the AI, with its ‘dynamic things’ going on, but idk what things those are.

Maybe this extends to some new ARTS genre. We have ARPG, and that's highly successful both in 2D and 3D. So maybe, RTS with more action could give the genre some revival.

That's what i meant.

May 26, 2022 08:26 PM
Calin

I have to give proper credit to codeproject.com people for teaching me how to code.

May 27, 2022 05:44 AM
Calin

This small scale frame/window into the bigger world is based on the idea that we imagine the world around as two separate worlds. The first world is the world that we see, the holospace (Star Trek terminology) the second world is the larger world that we don`t see. The larger world gives reason/motivation to the stuff going on in the small world.

May 27, 2022 08:12 AM
JoeJ

That's a vague idea, but it lacks definitions.

I'll ask again: What is the difference between your larger world and the focused frame?
What are the ‘detailed things’ going on in the latter, but not in the former?
Which abstractions does the large world use? What is the refinement and detail in the visible frame?

And after you have clarified this, which data structures and algorithms do you propose to represent and process all those things?

You should provide some outlines about those practical questions, only then a blog is justified. One liners about loose thoughts go to twitter.
There should be something to discuss, to inspire, or even to implement. This site is about game development, and unlike general intelligence, the actual topic does not sound undoable or science fiction.
It sounds like a practical idea, and you said why (eventually), but not how.

May 27, 2022 10:25 AM
Calin

There is real life and there is the virtual thing (Starcraft).

In real life the larger world is out of sync. The smaller world is syncronised. Like if you visit a construction site

in real life you will see some construction action going on. If you leave that area you no longer know is the construction is still going on or not. The construction site goes out of syncs/stops being updated in your brain.

If you return to the site next day and take a look at the zone you will have a visual update and the brain will update the information about the construction site. smaller frame is always in sync with real time physics and everything.

In Starcraft the bigger world is still being updated even if you`re not looking at it. Like you know that the construction of a building once started will not stop for unknown reasons. You still need the 'detail view'/small frame to properly understand and play the game.

Actual code for this stuff is probably still years away.

One liners about loose thoughts go to twitter.

It`s not all just one liners. give me a break.

edit: I`ll try to keep my one sentence posts to a minimum but there are times when you only need to express one thought without too much ‘filling’ next to it.

May 27, 2022 11:11 AM
Calin

with its ‘dynamic things’ going on

everything dynamic FTW

May 27, 2022 02:57 PM
JoeJ

everything dynamic FTW

You don't know a single example?
A construction site is no example, because for AI that's just an increasing number of ‘building A at (x,y) currently n % done’. No way to simplify that even more. At least there is no need to do so.

Why do you think about a simplified world representation for your game, before you even know what could be simplified and how?
Shouldn't you focus on the problems you have right now, with the stuff you actually work on? Because here you already know there is a problem indeed, which needs some work?

Just saying. To me this rather looks like pre-premature optimization about stuff which is ‘probably still years away’. But til you get there, your plans will change anyway, so the stuff may never come up at all.

May 27, 2022 03:45 PM
Calin

Engaging in intellectually stimulating conversation with little or no practical purpose.

my theoretical presentation is made while keeping a tangible end in sight. When I said it could take years I was probably exaggerating I don`t know, I have unknowns and I don`t want to throw statements I won`t be able to backup later. I`d rather be exaggerating on the far end than on the near end.

May 27, 2022 06:01 PM
Calin

Why do you think about a simplified world representation for your game, before you even know what could be simplified and how?
Shouldn't you focus on the problems you have right now, with the stuff you actually work on?

It happens at the same time. Both happen at the same time. I`m figuring out how the code should be organized so that it may run and do the stuff it needs to do but at the same time I`m figuring out relationships between abstract concepts, things I can not code yet (like thinking ahead, things I will catch up with in code later)

May 27, 2022 06:25 PM
JoeJ

I won`t be able to backup later. I`d rather be exaggerating on the far end than on the near end.

Does not work.

This works:

expectedTime = x;
//…
expectedTime *= 2;
//…
while (true) expectedTime *= 2; // ← yes!
May 27, 2022 06:56 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement