Skip to content
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

How do I run this with a debugger? #12

Closed
FilmCoder opened this issue Feb 15, 2021 · 5 comments
Closed

How do I run this with a debugger? #12

FilmCoder opened this issue Feb 15, 2021 · 5 comments

Comments

@FilmCoder
Copy link
Contributor

FilmCoder commented Feb 15, 2021

@FranciscoDA Sorry, please excuse me if this question seems stupid. I can't seem to get create-data-mod running with the gdb debugger. Are there steps you all have taken to get that working? I tried building with debug flags:

cmake -DSTATIC_COMPILE=TRUE -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .

And I also tried adding set(CMAKE_BUILD_TYPE Debug) to CMakeLists.txt

Is there something I'm missing? Shouldn't that add the -g flag to the g++ compiler under the hood so we can run gdb with symbol tables?

But when I do gdb create-data-mod I get: (No debugging symbols found in create-data-mod)

Once again I apologize if this question seems stupid, I'm pretty rusty with my c++ and makefiles

@FilmCoder
Copy link
Contributor Author

FilmCoder commented Feb 15, 2021

I figured it out, I strangely had to set custom cmake flags to FORCE the compiler to be g++:
cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Debug ..

I would like to make a merge request with an updated readme on getting the debugger working, along with VSCode configurations so the debugger works out of the box, but I don't want to step on this merge request's toes: #11 which seems to already have changes to the readme? @simonsan should I work off of that pull request to update the docs?

@FilmCoder
Copy link
Contributor Author

Also, just fyi the main reason I was trying to get the debugger working was to better understand the logic happening under the hood for random cost mod. My friends' and I are big fans and we had some ideas to make it better, mainly setting lower bounds for unit costs and making sure castles aren't too cheap, because in these instances the games quickly devolve into two metas: castle spam, or unit spam while disregarding economy. Of course, not trying to step on yall's toes so if these aren't adjustments you want in the official random cost mod I can publish a separate mod for just me and my friends.

@simonsan
Copy link
Contributor

I don't want to step on this merge request's toes: #11 which seems to already have changes to the readme? @simonsan should I work off of that pull request to update the docs?

Don't worry, I can rebase it and move stuff around once your PR is merged. ;) Thanks for asking though!

@HSZemi
Copy link
Member

HSZemi commented Feb 15, 2021

Also, just fyi the main reason I was trying to get the debugger working was to better understand the logic happening under the hood for random cost mod. My friends' and I are big fans and we had some ideas to make it better, mainly setting lower bounds for unit costs and making sure castles aren't too cheap, because in these instances the games quickly devolve into two metas: castle spam, or unit spam while disregarding economy. Of course, not trying to step on yall's toes so if these aren't adjustments you want in the official random cost mod I can publish a separate mod for just me and my friends.

I would be surprised if the debugger tells you more about how it works than reading the source code, but you do you 😅
There is only one safeguard implemented currently, and I am under the impression that the whacky generations that this permits are part of the appeal of this mod.
If you want to look into adding further safeguards, I think they would ideally be implemented as toggleable via command line parameters, so we can continue to ship an "official" version while others can activate additional safeguards as they please for their versions.

FilmCoder added a commit to FilmCoder/auto-mods that referenced this issue Feb 15, 2021
@FilmCoder
Copy link
Contributor Author

FilmCoder commented Feb 15, 2021

@HSZemi thanks for the feedback! I have a couple of questions and notes.

My friends and I discovered the random mod a few weeks ago and have been avid fans. For the first few games, it was fun every time, but after a couple days we quickly noticed that most of random mod games had devolved into one or both of these two fairly predictable metas:

  1. Castles are cheap. Castles are normally 650 stone, so in the random mod if they are significantly cheaper (they almost always are) the game devolves to castle spam around your base with a race to a wonder.

  2. Discover spam unit with a very low cost as quickly as possible. In many scenarios, the random cost mod devolves into an aging up race to see who can discover a cheap spammy unit the fastest. If someone discovers a spam unit just slightly before someone else, the game is over, as they will overrun others without time to respond. Furthermore, the spam unit negates the need to maintain an economy, and so a major element of gameplay.

I believe random mod has a replay value problem. Those above metas are hilarious and a joy the first few times. After that, they become tedious and repetitive. I think a random mod, ultimately, should give a variety of random experiences and fresh strategies to players so they always need to think on their feet, but if the random mod usually falls into two metas this is no longer the case. I think one of the beauties of the random mod itself is that it DESTROYS the traditional AOE2 metas. Every day, there's a new meta. It feels fresh and new and it forces you to think out of the box, after you've been playing AOE for so long and dust has settled on your brain and you can basically play the game without thinking.

But I agree that the random mod is so fun at first that it should probably remain as it is. I propose a new mod, something like "Random Mod Balanced" targeted with some sane defaults, like preventing castle spam and units costing 1 wood, that players can transitions into if they become fans of the default random mod and want to transition into something more nuanced. Is this something you would considering publishing through Siege Engineers if I make the code mods for it? A lot of my friends have stopped playing Random Mod because of the metas and they said they'd be interested to come back if we there was a more balanced version that prevented those two metas I mentioned.

If not, do you mind giving me some information on how to set up a build system? Is it a lot of work to set up? Do ya'll have a server somewhere that publishes the new random mod every day? Is that script in the repo here? I don't see any devops scripts. And how do you detect when new AOE patches go out, and thus when a new fresh dat is available for moding? Does AOE provide an api or something for getting the fresh dat file?

Thanks for your time!

FilmCoder added a commit to FilmCoder/auto-mods that referenced this issue Feb 15, 2021
…new 'scripts' folder for build scripts, add build.sh for production build and corresponding task in vscode tasks.json
FilmCoder added a commit to FilmCoder/auto-mods that referenced this issue Feb 15, 2021
@HSZemi HSZemi closed this as completed Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants