Hazeron Forums
Ideas for AI empires - Printable Version

+- Hazeron Forums (https://hazeron.com/mybb)
+-- Forum: Shores of Hazeron (https://hazeron.com/mybb/forumdisplay.php?fid=1)
+--- Forum: Arena of Ideas (https://hazeron.com/mybb/forumdisplay.php?fid=15)
+--- Thread: Ideas for AI empires (/showthread.php?tid=2999)



Ideas for AI empires - Ivan - 12-08-2023

Ideas for AI empires

1. pre-industrial competing tribe of the same species on your own planet -> need knifes and armor (and perhaps bows/spears) to fight them, absorbed/defeated during earlygame (starter planet)
(would however require hring troops without spacecraft, perhaps with a sailship in addtion to sailboat?) - like the tribal and or civilisation eras in Spore

2. non-spacefaring industrial or pre-industrial civilisation on another planet (1 planet)

3. friendly/neutral (early or advanced) spacefaring alien race (default neutral) (max 5 planets), taht needs help against nr 4. 

4. warlike spacefaring alien civ, but reasonable enemy that can be hostile and friendly (xenophobic, default enemy) (max 10 planets - 5 systems)

5. severe threat to all other species - no diplomacy possible (harvesters or Galactic Empire type, default enemy) (only heavily defended homeplanet in other distant galaxy (not directly accessible from SoH), captures or destroys all others)

6. race who built ringworlds or their remnants?

7. tribal civ, (maybe other race than your own) for henge form story

If planets become overun, you could flee and come back later with a bigger force to liberate them.

Discovering them could all be tied to the story


If playing as non-human, humans could perhaps be either of the 4 others, including the severe threat


RE: Ideas for AI empires - Celarious - 12-08-2023

While I do fully agree with these ideas, I'm gonna be honest, I have doubts about them working because... have you seen the AI pathfinding in ships? They're extremely stupid
Also more than 1 or 2 total empires is gonna result in the game becoming even less stable than it already is, I have only colonized 3 systems but it already takes 5+ minutes to load the universe off an SSD, and my savefiles are already over 1GB in size

I just don't see this kinda "active universe" working with the game as it currently is, it's technically... not suited for it, I guess


RE: Ideas for AI empires - Rockinsince87 - 12-08-2023

(12-08-2023, 08:25 AM)Celarious Wrote: While I do fully agree with these ideas, I'm gonna be honest, I have doubts about them working because... have you seen the AI pathfinding in ships? They're extremely stupid
Also more than 1 or 2 total empires is gonna result in the game becoming even less stable than it already is, I have only colonized 3 systems but it already takes 5+ minutes to load the universe off an SSD, and my savefiles are already over 1GB in size

I just don't see this kinda "active universe" working with the game as it currently is, it's technically... not suited for it, I guess

Yeah SSD speeds are slow for load. NVME it loads super quick but that should not be a requirement to enjoy the game. 

Ivan, your thoughts on the AI empire are excellent. I love every idea posted. 

There might be ways to implement this without turning the game into a lag fest. There are plenty of tricks you can do. One of them being not actually rendering or acting out all of their decisions. The X series for example does this. Thousands of ships in the game being simulated but not actually rendered. Granted that example is not a prefect due to the size and scale of Hazeron vs the X series. 

Anyways, perhaps decisions these empires are making could just be "done" or executed without the player actually seeing it in the background. When the player is in the same star system only then render the actions visible. Example, if one of the AI empires was going to colonies a system you were already in, have them arrive normally in the system. Depending on their behavior code, they could flee, communicate their intentions, attack, or ignore you and carry out their directive. 

Another example, you arrive in one of the AI controlled systems. Traffic could be spawned in at that time. Traffic that makes sense such as cargo ships and military patrols etc...Again there would need to be some kind of system in place that is tracking the decisions that are happening so the appropriate spawning could happen. From this example, a military strength meter or level set for this system by the AI could determine what you find or spawn. Say 1 though 5 for example. 1 being a basic patrol would be present. So you spawn in a nice patrol. 5 being a fleet, orbital defenses and the works. This helps simplify background tasks. 

Using the same example, it would be easy to spawn in cargo ships that travel between the cities between the planets. What ships, the models, and locations could be stored and called on easily. 

The point is there are methods in game design that allow for background tasks to the simulated and only rendering when it's time with some tricks. 

That is a big feat to pull off code wise but it's not impossible.  


As for the pathfinding, yeah that is a problem. I've had a lot of thoughts on how to optimize this. Travel could be adjusted where flights take place in phases. A maneuvering phase and a cruse phase and an approach phase. Meaning have the AI at certain ranges to planets fly at capped speeds. Once "clear" of a planet, hit the gas and go. Once you get near your destination, slow to the capped speed. The cap could be scalable based on your ship acceleration. Slow ships would obviously have a slower cap with different approach trigger distances. (Making the approach trigger distance larger for slower ships would allow for uncapped cruse speeds which is a must).  

Those are just my thoughts on the pathfinding.


RE: Ideas for AI empires - Ivan - 12-10-2023

Ai patfinding is mostly a problem for crew inside ships. Iirc after a scene change crew generally would end up correctly with access to their stations. (maybe because when not rendered they have no collision? dunno). AI ships in my experience don't have issues (they always seem to arrive at their destination), so AI could attack and defeat your city defenses and military bases just fine. Then the only difficult part would be capturing the flag,unless I'm missing something. I don't expect AI emperor to send troops to board my ships (though that would be cool)

Also, if you put a limit to the number of planets, this shouldn't be too much of an issue. (in my example, just 17-20 additional colonised planets). I currently have 16 planets for my main empire in 7 sectors (some cities are just a few buildings, and no cities above 10k inhabitants iirc), 2 for the new empire in separate sector, and 1 Ogar planet (in one of the 7 main sectors). After removing the 4 backup manual saves, my Saved game folder is 1.47 Gb. (Each manual save is about 477 Mb). My game just loaded of a HDD in under a minute. (2nd empire, small 3k city) Maybe with you it takes 5+ minutes because you have densily packed ringworlds, and load the game while your character is in a RW system? My 16 Arc currently only has 1 city and 1 single airport settlement. It makes me think the size of the rest of the universe doesn't quite matter during loading times, only the current system.

Of course there is the question of disk space. But even if doubled it would be about 3 Gb for the saved games folder with a single save. So even if manual saves were also doubled (954Mb), with 7 of those, you'd have max 10 Gb, which is alot, but, at least to me, acceptable.


RE: Ideas for AI empires - Celarious - 12-10-2023

(12-10-2023, 05:21 PM)Ivan Wrote: Maybe with you it takes 5+ minutes because you have densily packed ringworlds, and load the game while your character is in a RW system? My 16 Arc currently only has 1 city and 1 single airport settlement. It makes me think the size of the rest of the universe doesn't quite matter during loading times, only the current system.
Don't think so, my main avatar I always load in with is in the normal homesystem with a regular habitable world, but I DO have an alt sitting at the control center of my ringworld with preons
Also I only have 1 discovered ringworld, and it only has 1 city, and it's a small city too, like 700 pop (In fact all of my cities are around that size, only 1 of them is above 1k pop, my capital, the rest are under)

The reason I think the universe is the problem, and not the current system being rendered, is because the very long load happens when I first click the "Play" button when you first open the game
As far as I know, that button "boots" the universe but doesn't load any of the scenes, since you haven't loaded in on an avatar yet. When it finishes loading, and then I click an avatar, the avatar load-in is almost instant, regardless of what system the avatar is in


RE: Ideas for AI empires - Ivan - 12-10-2023

(12-10-2023, 06:11 PM)Celarious Wrote:
(12-10-2023, 05:21 PM)Ivan Wrote: Maybe with you it takes 5+ minutes because you have densily packed ringworlds, and load the game while your character is in a RW system? My 16 Arc currently only has 1 city and 1 single airport settlement. It makes me think the size of the rest of the universe doesn't quite matter during loading times, only the current system.
Don't think so, my main avatar I always load in with is in the normal homesystem with a regular habitable world, but I DO have an alt sitting at the control center of my ringworld with preons
Also I only have 1 discovered ringworld, and it only has 1 city, and it's a small city too, like 700 pop (In fact all of my cities are around that size, only 1 of them is above 1k pop, my capital, the rest are under)

The reason I think the universe is the problem, and not the current system being rendered, is because the very long load happens when I first click the "Play" button when you first open the game
As far as I know, that button "boots" the universe but doesn't load any of the scenes, since you haven't loaded in on an avatar yet. When it finishes loading, and then I click an avatar, the avatar load-in is almost instant, regardless of what system the avatar is in


Well dunno, I now closed and restarted the game again, from pressing play up until having my character loaded, in under a minute, from HDD. (I was wrong: actually SSD) The previous time, pressing play did take a bit longer.

I have 8 colonised and 15 (some partly) explored sectors in the game. (the resource search says "searching 1279 systems"). You did visit all 20 galaxies, so likely have alot more generated sectors in your savegame. so I guess you're right about the entire universe needing to load. Or are generated systems deleted, right after leaving the scene, unless colonised? If they are not, maybe they should be. Just the resource reports need to be saved. In the MMO they were saved for 1 week after last visited, iirc. No need for that, really, in the SP for uncolonised systems. Especially since, as u mentioned elsewhere, dark matter was removed and AI can go to ungenerated systems.

Also the 1 Gb you mentioned, is that for your total Savegames folder or per Manual save? (I would assume the latter)

Unless you have alot more explored systems saved, it would almost sound as if somehow HDD works better with Hazeron than SSD, which doesn't make sense


RE: Ideas for AI empires - Celarious - 12-10-2023

(12-10-2023, 06:30 PM)Ivan Wrote:
(12-10-2023, 06:11 PM)Celarious Wrote:
(12-10-2023, 05:21 PM)Ivan Wrote: Maybe with you it takes 5+ minutes because you have densily packed ringworlds, and load the game while your character is in a RW system? My 16 Arc currently only has 1 city and 1 single airport settlement. It makes me think the size of the rest of the universe doesn't quite matter during loading times, only the current system.
Don't think so, my main avatar I always load in with is in the normal homesystem with a regular habitable world, but I DO have an alt sitting at the control center of my ringworld with preons
Also I only have 1 discovered ringworld, and it only has 1 city, and it's a small city too, like 700 pop (In fact all of my cities are around that size, only 1 of them is above 1k pop, my capital, the rest are under)

The reason I think the universe is the problem, and not the current system being rendered, is because the very long load happens when I first click the "Play" button when you first open the game
As far as I know, that button "boots" the universe but doesn't load any of the scenes, since you haven't loaded in on an avatar yet. When it finishes loading, and then I click an avatar, the avatar load-in is almost instant, regardless of what system the avatar is in
I have 8 colonised and 15 (some partly) explored sectors in the game. (the resource search says "searching 1279 systems"). You did visit all 20 galaxies, so likely have alot more generated sectors in your savegame. so I guess you're right about the entire universe needing to load. Or are generated systems deleted, right after leaving the scene, unless colonised? If they are not, maybe they should be. In the MMO they were saved for 1 week after last visited, iirc. No need for that, really, in the SP for uncolonised systems. Especially since, as u mentioned elsewhere, dark matter was removed and AI can go to ungenerated systems.
The thing where I visited 20 galaxies, I actually specifically disabled autosave to avoid generating too many systems, and when I was done and had a screenshot I killed the process so it never saved all the explored systems, so I don't think that could be the cause either
(12-10-2023, 06:30 PM)Ivan Wrote: Also the 1 Gb you mentioned, is that for your total Savegames folder or per Manual save? (I would assume the latter)
Whole "saved games" folder
(12-10-2023, 06:30 PM)Ivan Wrote: Unless you have alot more explored systems saved, it would almost sound as if somehow HDD works better with Hazeron than SSD, which doesn't make sense
Maybe yeah lol


RE: Ideas for AI empires - Ivan - 12-10-2023

Ooh nvm, while the game is installed on a HDD (D:), the savegames themselves are on an SSD (C:)

Well dunno what else it could be. I have a bigger savegame and larger cities. I do have 32GB RAM installed (for star citizen), but otherwise my computer isn't really top of the line.

Windows 10 Home
Intel® Core™ i5-7400 CPU @ 3.00GHz 3.00 GHz
32,0 GB RAM
Gefore GTX 1060 6GB


RE: Ideas for AI empires - Celarious - 12-10-2023

(12-10-2023, 06:59 PM)Ivan Wrote: Ooh nvm, while the game is installed on a HDD (D:), the savegames themselves are on an SSD (C:)

Well dunno what else it could be. I have a bigger savegame and larger cities. I do have 32GB RAM installed (for star citizen), but otherwise my computer isn't really top of the line.

Windows 10 Home
Intel® Core™ i5-7400 CPU @ 3.00GHz 3.00 GHz
32,0 GB RAM
Gefore GTX 1060 6GB
I also have 32GB RAM, but otherwise your PC is better than mine in every aspect, I have an i7 6700k stock and a 750ti lmao