AInur
Community Members-
Posts
76 -
Joined
-
Last visited
Everything posted by AInur
-
Do you think it's possible to automatically synchronize all replay files between players? Or at least download the replay file content from the host. When I am joining a game, I see a lot of data being downloaded. Perhaps those can be saved?
-
I think there is a room for improvement here: save the game state to the replay files, so that everything can be reconstructed?
-
I watched a spectacular game as an observer and I would like to watch it again offline. However, the replay of this match does not show up in the in-game replays page. I found the relevant files in the replay folder and attached them below: commands.txtmetadata.json I joined the game soon after it started. How can I watch this replay again? The commands file seems intact, so theoretically, we should be able to reconstruct the whole replay from turn 32.
-
I would like to draw your attention to the code on spread mechanism in /public/simulation/components/Attack.js let randNorm = randomNormal2D(); let offsetX = randNorm[0] * distanceModifiedSpread; let offsetZ = randNorm[1] * distanceModifiedSpread; data.position = new Vector3D(predictedPosition.x + offsetX, predictedHeight, predictedPosition.z + offsetZ); The offset for each projectile is calculated by sampling from a random 2D Normal Distribution. If each player computes their own offset, then the values of the offsets would be different, the data.position vector would be different and hence total damage dealt would be different for each player, based on their own random sample. My question is: wouldn't this instantly cause OOS? How is it being handled? I do observe a greater chance of OOS in large battles, could this be the reason? I have tried to change the parameters and that results in instant OOS.
-
scaling Animals topic
AInur replied to Lion.Kanzen's topic in Game Development & Technical Discussion
Instead of upscaling, we can replace these small animals with entities that have larger size that have the same behaviour and total food value. For example, replace chicken with sheeps, rabbits with deers -
Some experiments conducted in Atlas editor regarding sniping: With no upgrades at all: 18 archers can kill a class_b ranged unit at their maximum firing range in 1 shot 11 slingers can kill a class_b ranged unit at their maximum firing range in 1 shot Between 19 and 21 archers can kill a class_a ranged unit at their maximum firing range in 1 shot 11 slingers can kill a class_a ranged unit at their maximum firing range in 1 shot An indefinite number of archers is required to kill a class_e ranged unit at their maximum firing range in 1 shot. The number required is huge due to the inaccuracy of the archers - in the most lucky case, 23 would be enough. In less fortunate cases, 35 is required. 13 slingers can kill a class_e ranged unit at their maximum firing range in 1 shot. With only archer accuracy upgrade: 18 archers can kill a class_b ranged unit at their maximum firing range in 1 shot with certainty; 17 is sufficient for most instances. 19 archers can kill a class_a ranged unit at their maximum firing range in 1 shot. Between 23 to 25 archers are required to kill a class_e ranged unit at their maximum firing range in 1 shot.
-
I switched to X11 display protocol and the errors didn't happen again. Even the previously mentioned mod selection page crash did not occur again. I think there is a conflict between 0ad and latest versions of Wayland. Pyrogenesis 0.0.26 27104-release Build 12 Sept 2024
-
As soon as I press any key, this key error appears. I did press the shift key to cause this particular crash. Steps to reproduce: 1. Run the Atlas editor 2. Place down some random entities and start playing simulation 3. Press any key combination, for example the attack move. Then this error would appear for me. This seems like something related to X11 and lack of keyboard support?
-
When I tried to play a scenario in the Atlas editor, it crashed suddenly with this message: /usr/src/debug/wxwidgets/wxWidgets/src/unix/utilsx11.cpp(2645): assert ""Assert failure"" failed in wxGetKeyStateGTK(): Unsupported key 314, the only supported ones are: Ctrl, Alt, Shift, Caps Lock, Num Lock and Scroll Lock for GTK 3.18+ /usr/bin/0ad: line 9: 6857 Trace/breakpoint trap (core dumped) "$pyrogenesis" "$@"
-
I would like to run the A26 version with a Vulkan backend because it quadruples my framerate, but it is not implemented until the A27 engine. I have tried force the A27 engine to run A26 public as a mod, but the idea didn't work due to A26 javascript calling non-existent engine functions. Is it possible at all to make the engine backwards compatible? I can try to debug A26 but I would like to know whether I am going down a dead end. Thanks.
-
@ffm2 In the counters panel, do you think it is possible to display the count of each unit type? For example, accurate to the number of spearman and the number of archers? If so, how would I be able to retrieve the stats? For multiplayer, yes that is the case. However, the singleplayer games are not written instantly, from what I have seen. Maybe my file manager didn't refresh quickly enough.
- 492 replies
-
- building hotkeys
- visible corpses limiter
- (and 9 more)
-
I think this is a great idea! I have thought about it as well and I've made a simple script to analyze the replay commands. I think it would be possible to make an in-game service which advises the player what they should do. This would be very helpful for new players (such as myself) to improve their skills! Regarding your cheating concerns, I found that replay files are not fully written to the replay folder until the game has finished. Therefore you can go ahead with your replay analysis mod without worries
- 492 replies
-
- building hotkeys
- visible corpses limiter
- (and 9 more)
-
Thank you ffm2, I have got it working! With regards to calculating the gathering rate, could we save the total resources on the previous turn, then do a gradient calculation: gathering_rate = (current_count + spending - previous count) * turns per second This allows us to ignore the details of upgrades, unit types and other factors. We need to account for the resources spent between the turns, e.g. the player gathered 20 wood in 200ms but spent 200 wood for a barrack. In your screenshot, what are the Hou, Bar, Fiel and Civ values? What are the average % values?
- 492 replies
-
- building hotkeys
- visible corpses limiter
- (and 9 more)
-
Thank you @hyperion, your solution worked. Below are the fully updated build instructions for anyone who is having similar issues: 1. Install the build dependencies as specified in the dependencies section https://trac.wildfiregames.com/wiki/BuildInstructions But on top of this, you will need to install cxxtest, python-virtualenv, python3.10, git-lfs 2. Download the source code from Gitea; the SVN source resulted in permission errors. Run all commands in your terminal: git lfs install git clone https://gitea.wildfiregames.com/0ad/0ad.git 3. Enter the downloaded folder and create a Python environment there. I named my virtual environment 0ad_build. cd 0ad python -m virtualenv 0ad_build --python=python3.10 source 0ad_build/bin/activate 4. Now you are in the activated Python 3.10 environment. Build the libraries under this environment: ./libraries/build-source-libs.sh --with-system-cxxtest You can add a -j$(nproc) flag to speed up things at the cost of your CPU consumption 5. Workspace update: ./build/workspaces/update-workspaces.sh --with-system-cxxtest 6. Making: cd /build/workspaces/gcc/ make 7. Running: cd ../../../ binaries/system/pyrogenesis We can put this into a full build script for your convenience, see attached .sh file. Don't forget to chmod +x 0adbuild.sh
-
Documentation for the engine and code
AInur replied to AInur's topic in Game Development & Technical Discussion
I have tried adding Engine.PostMessage("text") to one of the .js files. This failed with an error of PostMessage method is not defined. Then I tried to add console.log into the js files, and peculiarly, javascript cannot find the command console.log() -
Documentation for the engine and code
AInur replied to AInur's topic in Game Development & Technical Discussion
Hi @Stan`, thank you very much for the replies above, they were very helpful. I have some additional questions: How can I log information via javascript files in the public mod? How can I print out a string into the command line? For example, I want to print out the number of my infantry units every 10 seconds. How can I write a string into a file at a specified location? How can I append to a json file without overwriting it? I have found the engine function of WriteToJson, which is helpful but it overwrites the output file on each call. I would like it to append instead of overwrite. -
Please try to install via Flatpak and flathub: https://flathub.org/apps/com.play0ad.zeroad
-
Hi, I would like to add an units lost counter to the autociv overlay panel: I am trying to do this by appending " Lost": state => state.unitsLost to the stats dictionary of autociv_statsoverlay.js: stats = { " P": state => state.phase, " Pop": state => state.popCount, " Sup": state => state.classCounts_Support, " Inf": state => state.classCounts_Infantry, " Cav": state => state.classCounts_Cavalry, " Sig": state => state.classCounts_Seige, " Chp": state => state.classCounts_Champion, " Food": state => Math.round(state.resourceCounts["food"]), " Wood": state => Math.round(state.resourceCounts["wood"]), " Stone": state => Math.round(state.resourceCounts["stone"]), " Metal": state => Math.round(state.resourceCounts["metal"]), " Tec": state => state.researchedTechsCount, " Kil": state => state.enemyUnitsKilledTotal, " Lost": state => state.unitsLost ?? 0, } But the problem with this code is that the lost number stays at 0 as seen in the screenshot above. Evidently, the name of the units lost attributes is something different. What is name of the attribute counting the units lost? How can I find the list of possible session state attributes to query from? Thanks.
- 492 replies
-
- building hotkeys
- visible corpses limiter
- (and 9 more)
-
There is another similar crash after leaving the mod page without downloading anything. The error message is different: Sound: AlcInit success, using OpenAL Soft /usr/bin/0ad: line 9: 113054 Bus error (core dumped) "$pyrogenesis" "$@" The behavior this time is the game window just disappearing, instead of raising the exception dialog window.
-
Thank you, after following your steps, the build processed advanced a bit further until a new error is encountered: Checked out revision 28209. Building SpiderMonkey... SpiderMonkey build options: --disable-tests --disable-jemalloc --disable-js-shell --without-intl-api --enable-shared-js --disable-jitspew patching file js/src/moz.build patching file js/src/old-configure patching file python/mozbuild/mozbuild/virtualenv.py patching file third_party/python/virtualenv/virtualenv/discovery/py_info.py patching file python/mozbuild/mozbuild/action/process_define_files.py patching file python/mozbuild/mozbuild/backend/base.py patching file python/mozbuild/mozbuild/preprocessor.py patching file python/mozbuild/mozbuild/util.py patching file python/mozbuild/mozpack/files.py patching file build/moz.configure/flags.configure /home/username/build/0ad/libraries/source/spidermonkey/spidermonkey-build/mozjs-91.13.1/python/mozbuild/mozbuild/configure/__init__.py:915: SyntaxWarning: invalid escape sequence '\.' RE_MODULE = re.compile("^[a-zA-Z0-9_\.]+$") Traceback (most recent call last): File "/home/username/build/0ad/libraries/source/spidermonkey/spidermonkey-build/mozjs-91.13.1/build-debug/../js/src/../../configure.py", line 22, in <module> from mozbuild.configure import ( File "/home/username/build/0ad/libraries/source/spidermonkey/spidermonkey-build/mozjs-91.13.1/python/mozbuild/mozbuild/configure/__init__.py", line 13, in <module> from six.moves import builtins as __builtin__ ModuleNotFoundError: No module named 'six.moves' ERROR: SpiderMonkey build failed This looks like Python attempting to import a non existent module 'six.moves'. However, I do have the python-six package installed.
-
I downloaded the latest release version from my package manager $ 0ad --version Pyrogenesis 0.0.26 The build is 12 Sept 2024 (27104-release)
-
The game crashed instead of rebooting when I tried to return to the main menu from the mod selection page. Below are the error logs: TIMER| modmod/modmod.xml: 8.02997 ms TIMER| common/modern/setup.xml: 124.122 us TIMER| common/modern/styles.xml: 128.217 us TIMER| common/modern/sprites.xml: 728.767 us TIMER| termsdialog/termsdialog.xml: 8.80445 ms TIMER| common/modern/setup.xml: 128.575 us TIMER| common/modern/styles.xml: 115.465 us TIMER| common/modern/sprites.xml: 384.535 us TIMER| modmod/styles.xml: 6.29 us TIMER| modio/modio.xml: 4.79993 ms Assertion failed: "curl_multi_remove_handle(m_CurlMulti, m_Curl) == CURLM_OK" Location: ModIo.cpp:238 (TearDownRequest) Call stack: (0x5ca4846ac704) /usr/bin/pyrogenesis(+0x876704) [0x5ca4846ac704] (0x5ca4846553e8) /usr/bin/pyrogenesis(+0x81f3e8) [0x5ca4846553e8] (0x5ca484656f60) /usr/bin/pyrogenesis(+0x820f60) [0x5ca484656f60] (0x5ca484657935) /usr/bin/pyrogenesis(+0x821935) [0x5ca484657935] (0x5ca48423edcf) /usr/bin/pyrogenesis(+0x408dcf) [0x5ca48423edcf] (0x5ca4842465aa) /usr/bin/pyrogenesis(+0x4105aa) [0x5ca4842465aa] (0x5ca4841f4c21) /usr/bin/pyrogenesis(+0x3bec21) [0x5ca4841f4c21] (0x5ca483ef12f2) /usr/bin/pyrogenesis(+0xbb2f2) [0x5ca483ef12f2] (0x5ca483edfb9b) /usr/bin/pyrogenesis(+0xa9b9b) [0x5ca483edfb9b] (0x7e11518281ce) /usr/lib/libc.so.6(+0x261ce) [0x7e11518281ce] (0x7e115182828a) /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7e115182828a] (0x5ca483ee9905) /usr/bin/pyrogenesis(+0xb3905) [0x5ca483ee9905] errno = 0 (No error reported here) OS error = ? Steps to reproduce: 1. Run a fresh installation of the game 2. Go to settings -> mod selection 3. Use the mod downloader to download some mods. I downloaded autociv, god's eye and linux-libertine. 4. Leave the mod downloader, but do not activate any mods 5. Press 'back' or 'save and restart' This crash may not happen every time, but it happens almost every time I download a new mod via the mod downloader. However, if I activate locally created mods (i.e. mods that I made myself in the mods folder), there would be no crashes. The crash has occurred on two of my computers (with dramatically different hardware configurations) so I think it's worth attention.
-
I am trying to build the game from your Gitea source code and have encountered similar failures with cxxtest. I am trying to build the source libraries by running $ ./libraries/build-source-libs.sh And the output is: Building third-party dependencies... ./build-source-libs.sh: line 61: ./source/cxxtest-4.4/build.sh: No such file or directory ERROR: cxxtest build failed I then tried to parse in the arguments mentioned above: $ ./build-source-libs.sh --with-system-cxxtest And I was hit with FCollada build failure due to missing files: Building third-party dependencies... ./build-source-libs.sh: line 64: ./source/fcollada/build.sh: No such file or directory ERROR: FCollada build failed Before starting the build, I have installed the dependencies exactly as specified by this page: https://gitea.wildfiregames.com/0ad/0ad/wiki/BuildInstructions It may be worth noting that the zlib dependency is in conflict with my zlib-ng-compat package. Below is the error from my package manager: resolving dependencies... looking for conflicting packages... :: zlib-1:1.3.1-2.1 and zlib-ng-compat-2.2.2-6 are in conflict. Remove zlib-ng-compat? [y/N] error: unresolvable package conflicts detected error: failed to prepare transaction (conflicting dependencies) :: zlib-1:1.3.1-2.1 and zlib-ng-compat-2.2.2-6 are in conflict
-
As an user who joined just yesterday, I would like to offer my humble opinions: 1. The registration process is already quite complicated and difficult to automate with a bot. The email confirmation step requires a new email address each time, which would be challenging. The verification questions are also non trivial for current AI technologies. Although GPT-4o may be able to solve the problem, the effort and cost is simply not worth it. 2. With the above, and the observation that the spam posts appear infrequently (on the timescale of RPA) and irregularly, I am inclined to believe that a human is doing the spam manually. They create new email addresses each time then register with their new email. 3. The effective way to crack down the spam is for the website admin to observe the source IP of the spammer(s) and take actions accordingly. 4. We need to understand why the spammer is doing this, their motivation and goal. Some communication is necessary in order to negotiate a solution.
-
Documentation for the engine and code
AInur replied to AInur's topic in Game Development & Technical Discussion
Thank you for the reply, this link contains everything that I need for now. To be specific, I would like to understand the game state object first. How is it synchronised between players and how can we prevent/catch OOS errors? Where can I find the list of attributes associated with this object? For example, how can I query the current turn, the current number of units in the map, the positions of each entity? Secondly, I have opinionated a list of possible improvements that I could potentially code up, but would need some assistance from you: 1. The game and its freezes for a few seconds when there is a large battle. This could be caused by serial processing of too many objects at once. Perhaps we can offload some of the computation into async threads or parallel threads? Parallel processing would be a great improvement. 2. The 'AI' algorithm needs much improvement. I have seen past forum posts discussing solutions to this, but they are limited to improving the economy of the AI instead of its strategy. Ideally, the AI could interact with the player a bit more and respond to the strategies of the player. For example, if the AI sees the player making a lot of cavalry, then it should respond by making spearman. Currently, it is unable to adapt its strategy nor scout. 3. Occasionally, the game crashes when we are changing mods. There should be a more robust way to handle exceptions; if the mod is corrupt, then the engine should forbid this operation temporarily instead of crashing. 4. For Windows clients, due to the 32bit 4GB RAM usage limit, we can create a temporary VRAM and page data to that temporary file instead of crashing. 5. I would like an API interface where I can read out game data and inject commands into the game session without using the default game GUI. This would facilitate the training of better AI models powered by TensorFlow neural networks, as well as help with debugging.