Latest Posts

Topic: Difficulty levels

GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-24, 07:15

With the new starting condition, additional resources are given during the game already. So, the ai won't fall back as soon as those extra resources are used, because it will get more continually. What it needs is fine-tuning. We could also consider giving some partially promoted soldiers rather than a training site building.

I'm not working on this right now, because I'm focussing on fixing the important bugs.

Edited: 2016-02-24, 07:16

Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-02-24, 13:02

GunChleoc wrote:

With the new starting condition, additional resources are given during the game already. So, the ai won't fall back as soon as those extra resources are used, because it will get more continually. What it needs is fine-tuning. We could also consider giving some partially promoted soldiers rather than a training site building.

I'm not working on this right now, because I'm focussing on fixing the important bugs.

Yes, but as I already argued, it still is not optimal because on a large map, say, 2 iron per minute is a lot in early game, but it is little in late game. Also, conquering a player's land gives you an advantage because said player will have less production; there is a dicotomy in the game between expanding more, making more buildings, but also being able to defend the extra land. All this is lost with a bonus that is independent on how much land is controlled. I argued more extensively at the posts 7 and 9 in this same thread, but they got covered by more recent postings.

I am not saying to not do it. If it is easier to code, then so be it. But can you say that giving a static amount of resources (one that may be dependent on several factors, but still static once those factors are defined) is actually better than making the buildings work faster? Ok, with a lot of calculations you may make an algorithm that tailors the resources given to the size of the map, number of players, terrain controlled, buildings possessed, time in the game. The ending result of that would be something extremely convoluted to achieve exactly the same result as just speeding up the ai economy.

And if we spend too much time fine-tuning this algorithm, in the end we spend more time than what would have been needed to simply implement the other solution. Speeding up the ai economy would also be a much more streamlined solution because it would not require any fine tuning at all. You increase the speed, you increase the difficulty, in the same way for any kind of map or game mode. I think it would actually take less time to code for it than to go with imperfect solutions that require lot of fine tuning. After all, this game has lacked difficulty levels for years; it can wait some more months until someone has time to implement the best solution.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-24, 15:13

I still think we could have the new starting condition as well as eventually coding something in C++ for speeding up / slowing down the production. The starting condition could also give new player and edge so they don't get stuck because they have made a mistake and run out of wood or spidercloth, for example.


Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-02-24, 15:35

ah, well, in that case we could have different ways to make difficulty levels, and the player on start may individually choose how to set all of them. works for me.


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-02-25, 19:12

I dont like much the idea of different production speeds, however I played a bit with this branch and it is really fun. Here you can see today's test, blue player got that cheat mode, and all players were 'Normal AI', no teams. As you can see, it is struggling in first 2 hours but then it took off:



Map: four mountains.

What is nice about this, format of this "configuration" file is absolutely trivial, see here

http://bazaar.launchpad.net/~widelands-dev/widelands/new_starting_conditions/view/head:/data/tribes/scripting/starting_conditions/barbarians/headquarters_very_easy.lua#L1

So ANYBODY can try to modify and tweak it. I played a bit with barbarians starting condition to make them more stronger.

Another nice thing is that is safe. If you screw it, nothing bad happens until a player picks this mode.

Also - no compilation is needed - you only edit the file and run widelands again...

So I vote for merging it, after some tweaking.

However, small issue - initialization can crash the game if positioning those additional buildings fails. Should be fixed somehow.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-26, 14:15

However, small issue - initialization can crash the game if positioning those additional buildings fails. Should be fixed somehow.

Maybe start with some partially upgraded soldiers instead of the additional buildings?

The 4 soldier values are health, attack, defense and evade in that order.


Busy indexing nil values

Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-02-27, 21:01

But this crash is not problem specific for this new starting mode. Also Fortified Village is affected, and even bit more, because this tweak adds (with my changes, so far only for barbarians) 3 buildings, village gives 5 buildings I think - higher probability of lack of proper spots.

I added:

  • Fortress - to conquer some area
  • Battlearena +
  • Brewery (with brewer master) - so that the AI player can start training very soon.

This is useful for small maps / short games. But of course any changes are possible. And also some real playtests are needed. I tested only with AI.

What I added is "rotation" over all warehouses (incl. headquarters and ports), there are 2 benefits

  • from transportation point of view
  • if headquarters is destroyed the player still gets new wares..

That crash says something like this - image not found: coroutine


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-28, 08:51

Tibor wrote:

That crash says something like this - image not found: coroutine

This crash does not sound like a lack of space issue. It would be good to get a backtrace.


Busy indexing nil values

Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2016-02-28, 20:17

I put a print into lua code and indeed it said a building was not built and very shortly afterwards there was a crash... I will try to get a backtrace

EDIT:
built => placed

EDIT2:
the backtrace is here:

terminate called after throwing an instance of 'ImageNotFound'
what(): Image not found: Coroutine

Program received signal SIGABRT, Aborted.
0x00007ffff515c5f8 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff515c5f8 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff515da7a in abort () from /usr/lib/libc.so.6
#2 0x00007ffff5a70add in __gnu_cxx::__verbose_terminate_handler () at /build/gcc/src/gcc-5.3.0/libstdc++-v3/libsupc++/vterminate.cc:95
#3 0x00007ffff5a6e936 in __cxxabiv1::__terminate (handler=<optimized out>)
at /build/gcc/src/gcc-5.3.0/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4 0x00007ffff5a6e981 in std::terminate () at /build/gcc/src/gcc-5.3.0/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5 0x00007ffff5a6ebe6 in __cxxabiv1::__cxa_rethrow () at /build/gcc/src/gcc-5.3.0/libstdc++-v3/libsupc++/eh_throw.cc:125
#6 0x0000000000f573fa in NetHost::run (this=0x7fffffffaf20) at /var/widelands/BZR/new_starting_conditions/src/network/nethost.cc:792
#7 0x0000000000cf206b in WLApplication::mainmenu_multiplayer (this=0x19b4260)
at /var/widelands/BZR/new_starting_conditions/src/wlapplication.cc:1197
#8 0x0000000000cf1484 in WLApplication::mainmenu (this=0x19b4260)
at /var/widelands/BZR/new_starting_conditions/src/wlapplication.cc:1017
#9 0x0000000000cedec0 in WLApplication::run (this=0x19b4260) at /var/widelands/BZR/new_starting_conditions/src/wlapplication.cc:449
#10 0x0000000000cec5b1 in main (argc=1, argv=0x7fffffffe818) at /var/widelands/BZR/new_starting_conditions/src/main.cc:51

Edited: 2016-02-28, 20:41

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-29, 07:19

Thanks for the backtrace - which map was that?

I think we should put this into a new bug report.

Edited: 2016-02-29, 07:19

Busy indexing nil values

Top Quote