Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Mar 29, 2024 10:40 am
All times are UTC + 0
-Error/Crash on new map-
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sun Sep 30, 2018 9:54 pm    Post subject:  -Error/Crash on new map-
Subject description: Any advice appreciated?
Reply with quote  Mark this post and the followings unread

Hi guys, I'm hoping for some advice here with regards to an error/crash on a new map I've made. After 90% completing the first version of my map, I noticed a unique error in Final Alert; it would Not allow me to scroll to the lower-left corner of the map, either by selecting it or scrolling from any direction. I have since managed to partially rescue it by transferring some of the work onto a new map file, but still get an IE after at most a few minutes of testing in game.

I was just wondering, what could cause it to crash? Is there anything in general I need to avoid? For example, I have read it is not a good idea to paint ore/gems onto a section of cliff (not that I have, or would do that anyway).

The map is my first built-from-scratch Arctic map, which I originally named Russian Winter Forest. It's designed to replicate a vast winter wilderness of a Russian forest (as the name suggests). As such, much of the map is dominated by trees; with most of the accessible zones marked by the game's dirt roads. The map size is quite large, 200 x 200, which in itself as far as I'm aware shouldn't be an issue (I have made a map larger than this with no issues). The standard elevation was set at 4.

In trying to isolate what the issue is, I tried placing as few differentiating details as possible, as such there aren't many different things on the map, in fact I could sum them up as follows:

Besides about 50 thousand trees, there are;

-Some dirt paths

-That snow-covered plane wreck overlay which I used once (i think it's in overlay)

-A few cliffs in the centre of the map; I did use both cliff types available to arctic maps (standard snow covered, and icy snow covered cliffs, but Not joined to each other). Majority of the elevation work is here obviously. This part of the map is made to look like a meteorite crater, with the lowest part of the crater containing icy water.

-Lastly, apart from that there's not much else added. There's perhaps 4 different buildings used so far; barn, a type of house, some soviet wall, and some of the white fence and prison fence, but not much. There's the odd patch of snowy grass, and odd patch of ice or dirty snow, but 98% of the map is plain snow (most of that is indeed covered in trees/bushes). -In fact, looking at the map file in wordpad it only counts the 2 buildings, not the wall and fence.

-At one of the small cliff areas I placed some snowy rocks (again, they are standard to the game, I've not altered them), as well as some ice cracks/precipices/holes/breaks in the ground whatever they're called.

Apart from that, I have placed a small amount in the starting locations near the corners of the map, along with standard ore mines, which are unobstructed by anything.

The 'rescued' map hasn't corrupted in FA as the original did, so I can still scroll about and edit what I want freely. In the original map that was corrupted, in the mysterious lower-left corner, there wasn't any cliff work, or elevation. There was just some trees, and some of the dirt paths, so I thought maybe I placed a tree too close to a path or on it, so in my rescued version I have made sure the trees are 100% not on the path, even placing them in Framework mode, but this hasn't solved the IE I get.

If there's any more info I could provide, just ask?

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Sep 30, 2018 10:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Late game crashes are almost always AI related, or pathfinding. If there was a bad tile or missing overlay on the map, you'd be crashing with the loading bar.

My guess is you have too many impassable areas for units to traverse in straight-ish directions and the engine is forcing too many recalculations causing any cluster of units to become tangled producing an unresolvable math error.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sun Sep 30, 2018 11:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Late game crashes are almost always AI related, or pathfinding. If there was a bad tile or missing overlay on the map, you'd be crashing with the loading bar.

My guess is you have too many impassable areas for units to traverse in straight-ish directions and the engine is forcing too many recalculations causing any cluster of units to become tangled producing an unresolvable math error.


Interesting about the missing overlay or a bad tile, kind of reassuring in a way so I can rule that out I guess!

How do you mean by 'late game' crashes? When I tested the map, it crashes within a few minutes, which I would consider 'early' game..

Yes, the path finding may very well be an issue. In a way it's kind of disappointing that something so simple as path finding can break the game. Fair enough, there are Alot of trees in this map (after all, it is supposed to be the vast wilderness of a Russian forest), but I did try not to make things Too complicated in this sense... For example, much of the forests are very dense, especially at the edges where the come close to the dirt paths (that was my way of deliberately trying to express to the game that these are generally inaccessible areas, and therefore encouraging the AI to follow my dirt paths). There are a few exceptions, where I have made some hidden paths in the forests, that lead to semi-secret areas; these areas have no dirt path to mark them, and one must simply seek and follow gaps in the trees. I could attempt to simplify the tree network, though it would be greatly helpful to know even the rough coordinates where the game has any difficulty... It's... SO many trees...

Have you ever made (or anyone else for that matter) a map largely based in a heavily forested area, with thousands of trees? If there's anything to avoid, I'm all ears.  Wink

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Oct 01, 2018 12:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Render the map as it is, and shrink the full render to 1600px wide or something and upload to an image host you can link. Any problems like I describe should be mostly obvious to a trained eye.

As an aside, too many randomly placed rocks or using some of the isolated looking lumps from the cliff set as rocks can create pathfinding issues too. It happened on one of my maps.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon Oct 01, 2018 4:01 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Render the map as it is, and shrink the full render to 1600px wide or something and upload to an image host you can link. Any problems like I describe should be mostly obvious to a trained eye.

As an aside, too many randomly placed rocks or using some of the isolated looking lumps from the cliff set as rocks can create pathfinding issues too. It happened on one of my maps.


Cool, I have rendered the map (1st time I've rendered a map, just downloaded the renderer in fact). I will upload it later as I'm unable to do so from this location.

The render is of the 'rescued' work in progress, so the map isn't complete. You will notice when you see part of the small amount of cliff work, that some randomly placed rocks did get carried over from the original map (and look somewhat out of place on their own in the map's current state). If when you see the map you believe anything may be out of place / cause an issue, I will be happy to change it. I was quite careful when doing the cliffwork not to leave isolated cliff pieces, and did the cliffs in framework mode.

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon Oct 01, 2018 6:29 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Oct 01, 2018 6:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow!

It looks AMAZING! So. Many. Trees!

Such a beautiful forest! Imagine what would happen if a flame weapon was turned on there #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Oct 01, 2018 7:32 am    Post subject: Reply with quote  Mark this post and the followings unread

Yea, I'd say pathfinding is the culprit.

There's that valley with the crevasses which may cause problems as it breaks straight path calcs, just like that rock belt and even the trees.

I suggest you use the cliffs to wall off parts of the forests so they won't be considered as paths at all. Also your map is very flat, you might consider raising the flat empty areas to appear like the snowy tops of hills/mountains where the wind is too strong (see attached example). Though some elevation change within the forests will make them less monotonous as well.



thumb_riversofgold.jpg
 Description:
 Filesize:  175.91 KB
 Viewed:  763 Time(s)

thumb_riversofgold.jpg



_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon Oct 01, 2018 7:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Wow!

It looks AMAZING! So. Many. Trees!

Such a beautiful forest! Imagine what would happen if a flame weapon was turned on there #Tongue


Hahah thanks Tarek, yes and this is just a draft of the 'rescued' map (I loved the original which got corrupted).

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon Oct 01, 2018 7:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Yea, I'd say pathfinding is the culprit.

There's that valley with the crevasses which may cause problems as it breaks straight path calcs, just like that rock belt and even the trees.

I suggest you use the cliffs to wall off parts of the forests so they won't be considered as paths at all. Also your map is very flat, you might consider raising the flat empty areas to appear like the snowy tops of hills/mountains where the wind is too strong (see attached example). Though some elevation change within the forests will make them less monotonous as well.


G-E, thanks very much for the helpful advice, that gives me something to work with. So I will try to... Simplify the routes so that they are more direct.. I completely understand your logic to essentially wall off parts of the forest, however I would refrain from doing so with cliffs; firstly because it would be to me a bit un-natural looking (given the setting), but also because I made the map inspired by a Russian documentary episode about the  so called 'Listva' (from 'Combat Approved' series), which was filmed i the wilderness of a russian forest, which was indeed mostly flat. But yes, I am aware of most of it being flat, and definitely appreciate what you're suggesting here.

With that said, i'll get to work. I may even very deliberately use the trees themselves to wall the forests in, although this may be at small expense to the natural beauty element that I was trying to capture.

Will keep this space updated

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Wed Oct 03, 2018 5:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just a quick update,

After following your advice G-E, I did some work on 'cordoning' off certain areas (not much, as I've not had the time), but I did a test run with 1 enemy team, based in the particular direction I had chosen to work on.

My test run, although it Did eventually crash, it was by far the longest test run; lasting over a quarter of an hour, and I noticed a few second before crash the enemy team randomly setup an outpost in a hidden area of forest near my base which I had not cordoned off. So I would overall consider this test a success (after all, we learn from failures).

I would like to add, on an important mapping/AI pathfinding note for everyone; it would seem it does not matter how complicated the map traversal routes are, So Long as the route in the Direction the enemy has to take is relatively straightforward. I say this because there were some indeed complicated routes elsewhere on the map, almost maze-like, and the AI even had to pass some adjacent to their Direct route (to Me). If for example me and the AI had swapped starting positions, the AI would have to have considered other routes which would have been problematic.

Further testing will be based on this theory; I will make the complicated 'hidden' areas sort of face only towards the human player, with the AI being granted direct simplified routes. Next I will focus on other directions.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Oct 03, 2018 6:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

My working theory is that direction changes along the route are mapped out at the time of launch, and then when certain unexpected obstactles or traffic occur, the game recalculates the turns for that unit. The failure would not be so much the calculating as much as the eventual point to point list that keeps growing past some finite table limit.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Thu Oct 04, 2018 4:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
My working theory is that direction changes along the route are mapped out at the time of launch, and then when certain unexpected obstactles or traffic occur, the game recalculates the turns for that unit. The failure would not be so much the calculating as much as the eventual point to point list that keeps growing past some finite table limit.


So as in, as long as each step-by-step segment of their overall route isn't too complicated?

I've done some further investigation:

I can still at the moment observe the AI having no trouble with very complicated areas Provided they are not considered 'on the way' to me. Such as; other side of the map from the area of activities, or even the AI directly passing right next to entryways for such mazes; as long as such routes go back on themselves (thus the AI not choosing logically to 'go the other way').

To simplify things (for the AI), I have implemented 2 further steps with regards to pathfinding calamities (specifically for this map):

1. Because there are 50 thousand trees (est.), I have purposefully tagged them as 'Insignificant', thereby not considered for targeting.

2. I have also made all vegetation 'Immune' to damage, so that not only are the trees not target-able, they will not be destroyed (on this map) by indirect fire.

I will next I believe have to make direct routes from all start points to the player start at Pos. 1, as a last resort to eliminate pathfinding difficulties...

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1592s ][ Queries: 14 (0.0122s) ][ Debug on ]