-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
level editor: character change does not persist after road is randomly generated #1621
Comments
Hey, I'm interested in this issue. I will happily be assigned :) |
The code is fixed to ensure the Player selection data remains the same after generating a random road. While that problem is solved, I've found that after a road is generated, the dropdown menu is blank. I am finding a way to ensure the selected item remains consistent. I assume the "create" function should parse the dropdown item to reflect the UI. Furthermore, I've noticed there's a similar issue with the scenery generation. I tried to fix this but, upon further observation, it seems that the generation code is hard-coded for the "grass" scenery. Is this done on purpose? It would make sense, to generate the road, then edit the scenery - but if the user changes the scenery to snow, they shouldn't have to change it again. |
In the method declaration |
@Noah-Bakr, here's the code breakdown as promised:
It seems this fails because the mapData does not contain the appropriate character info. You'll need to:
|
@Noah-Bakr , how's it going? need any help? :) |
Hi @SKairinos I've had some time investigating the issue with your insights. I tried a number of different approaches and code but unfortunately, I didn't get anywhere - I just learnt the ways that didn't work. Tomorrow I should have some time to put towards this issue and get it fixed. What I have noticed is that there's a fair bit of grey area in regard to what methods generate the map itself and what methods generate the level. What this means: In both the python and js, there would be a method that creates the road itself, taking the random map params (curviness etc), this method would be inside another method that contains other data such as scenery etc. The grey area lies within the connection between python and js. My focus has shifted towards the charactersetup() functions in the js file (tomorrow I will write my knowledge gained, alongside the file names). I discovered that if I called the set up function when the button is pressed (parsing the character), it did not update the character nor the dropdown. I feel that the character selection object is getting lost somewhere, which could explain the grey area between python and js, or I've missed a |
Describe the bug
In some cases, even after selecting a different character in the Level Editor, when the level is saved and played it displays the default Van character.
To Reproduce
Expected behaviour
The level editor should remember the character choice even when recreating a new random road.
Once this has been fixed, please also check if changing other settings through the level editor also overwrites the character setting.
Good places to start
It seems like the function to generate the random road might be resetting the value of the character to the default, i.e. the van.
random_road.py
: https://github.com/ocadotechnology/rapid-router/blob/master/game/random_road.pyThe text was updated successfully, but these errors were encountered: