[go: up one dir, main page]

Menu

Code Merge Request #4: Big overhaul and many fixes (open)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Sven Eden wants to merge 101 commits from /u/yamakuzure/atanks/ to master, 2023-08-10

Fixes:

  • Fixed a bug that caused background updates to glitch.
  • Added missing Theft Bomb missile image, that caused an assertion failure whenever someone tried to shoot one.
  • Fixed all g++ and clang-tidy warnings.
  • Fixed a bug where global.surface was being used as height instead of the surface y-coordinate.
  • Fixed a bug in land creation that caused possible crashes.
  • Fixed a bug that allowed AI players to have a ton of amps but no armour and vice versa.
  • Remove C89 style TRUE/FALSE integers where possible.
  • Fixed typo: Swapper costs 4 grand, not 40k.
  • Fixed a bug that caused AI to ignore 90% of the items they might have wanted to save their money on.
  • Fixed a bug that caused the AI to break off their attack planning early just to shoot a Riot Bomb anywhere.
  • Fixed a bug that caused the AI to use the first guess on their last attack planning attempt without actually planning it through.
  • Fixed a bug that could cause a segfault when fast-forward-play ends.

Additions:

  • The Makefile got some debugging targets for easier debug mode building.
  • Random number generation has been modernized and was made thread local.
  • Beautified land and moon creation.

Changes:

  • Source code is now formatted uniformly using clang-format.
  • Got rid of C90 style pointer juggling where possible (aka where performance is non-critical).
  • Bot values have been lowered and the spread between worst and best AI player has been increased. The DEADLY player is also no longer immune to making errors.
  • SDI will no longer shoot a missile down that is going to be repulsed.
  • Some recursive functions have been rewritten to be non.recursive.
  • Some "spaghetti-code" style functions have been split up.
  • Many C++17 perks have been made use of where they make sense.
  • Got rid of sscanf(). Everywhere.
  • Decoupled many objects that deserved their own compilation unit.
  • SDI repulsor calculation is now independent from AI level of its owner.
  • Enhance armour/amp/weapon boosting, so that AI players no longer forget what they wanted to buy (but couldn't) between rounds.
  • The maximum SDI range calculation has been rewritten, and the repulsor shields have been strengthened a bit.
  • AI takes target level and already dealt damage ratios more into account. This stops the bots to get "stuck" on a (mainly human) opponent.
  • AI does not longer know the exact coordinates of their opponent, but "drift" a bit according to their level.
Commit Date  
[9ca3dc] (dev-6.6) by Sven Eden Sven Eden

Fix remaining c-string range issues and make PLAYER::name an std::string

Signed-off-by: Sven Eden <sven@...>

2023-08-09 18:08:58 Tree
[e874a9] by Sven Eden Sven Eden

Version 6.7 Changelog - first version

Signed-off-by: Sven Eden <sven@...>

2023-08-09 12:21:32 Tree
[42da58] by Sven Eden Sven Eden

Remove orphaned dependency files

Signed-off-by: Sven Eden <sven@...>

2023-08-09 10:08:15 Tree
[ad68b1] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/winclock.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[56f4d7] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/virtobj.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[f748a8] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/random.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[56ebff] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/perlin.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[0f834c] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/missile.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[63ddb4] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/main.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[93aefd] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/item.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[c64b7f] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/globaltypes.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[12ec92] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/files.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[a5fa29] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/debug.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[4bfb89] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/box.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[75aa59] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/beam.*

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:05:57 Tree
[04c8c5] by Sven Eden Sven Eden

Make ENVIRONMENT::loadBackgroundMusic() non-recursive

Signed-off-by: Sven Eden <sven@...>

2023-08-09 09:02:03 Tree
[3511f0] by Sven Eden Sven Eden

Add another error level to the AI logic.

Signed-off-by: Sven Eden <sven@...>

2023-08-08 20:01:58 Tree
[73e611] by Sven Eden Sven Eden

AI: Take target level and damage ratio more into account.

The higher the opponent level (HUMAN is highest), the more they might
fear retaliation, assuming that higher opponents hit better.

Also tweak damage score to make damage to high level opponents more
valuable, so an enemy hit often gets a large negative score.

This should prevent the bots from targetting the same enemies over
and over again, especially humans, and have their target choices a
bit more balanced.

The more rounds are played, the more this effect should play out.

Signed-off-by: Sven Eden <sven@...>

2023-08-08 16:27:21 Tree
[8b0ed5] by Sven Eden Sven Eden

Make SDI range inependent from AI level and strengthen Repulsor shield a bit more.

Signed-off-by: Sven Eden <sven@...>

2023-08-08 09:55:11 Tree
[6df1f9] by Sven Eden Sven Eden

Fixed a bug that could cause a segfault when dropping out of fast play.

Signed-off-by: Sven Eden <sven@...>

2023-08-08 09:40:31 Tree
[2e3b1c] by Sven Eden Sven Eden

AI two fixes that caused the AI to do really stupid things

* When checking whether this is a last attempt of aiming, we only
checked the full targetting attempts and did not take enemy and
weapon selection into account. Change this so the last targetting
can really be done.

* When the last attempt is calculated, the bot tries to free its
firing path if the best score achieved is negative. This is a very
good idea, but the code also allowed to break off all thinking with
such a "freeing" attempt if a random value check against their pain
sensitivity failed. The later has been taken out, because it
a) caused bots to randomly shoot riot bombs into walls and ceiling,
and
b) made no sense at this point anyway.

* When checking whether to flip angle adaption direction, don't allow
to flip to upwards if angle is not lower 65° while moving down.

Signed-off-by: Sven Eden <sven@...>

2023-08-07 12:52:33 Tree
[59c9a5] by Sven Eden Sven Eden

Add fall_vector to env to no longer multiply FPS_mod and gravity
again and again.

Signed-off-by: Sven Eden <sven@...>

2023-08-05 15:55:16 Tree
[4a9988] by Sven Eden Sven Eden

Fixed AI saving money for much needed upgrades.

Signed-off-by: Sven Eden <sven@...>

2023-08-04 12:44:25 Tree
[8a3005] by Sven Eden Sven Eden

Enhance finance debug log and AI armor/amp/weapon boosting

Signed-off-by: Sven Eden <sven@...>

2023-08-04 09:57:24 Tree
[0b009e] by Sven Eden Sven Eden

Make SDI repulsor calculation independent from ai_level

Signed-off-by: Sven Eden <sven@...>

2023-08-01 13:37:52 Tree
[4d977a] by Sven Eden Sven Eden

Cleanup and fix addUpdateArea() in virtobj.*

2023-08-01 11:13:03 Tree
[1520a5] by Sven Eden Sven Eden

Cleanup, decruft and fix clang-tidy warnings in update.*

Signed-off-by: Sven Eden <sven@...>

2023-08-01 11:00:54 Tree
[df914a] by Sven Eden Sven Eden

Fix typo: Swapper costs 4 grand, not 40k.

Signed-off-by: Sven Eden <sven@...>

2023-08-01 10:55:28 Tree
[62ff9c] by Sven Eden Sven Eden

Cleanup, decruft and fix clang-tidy warnings in text.*

Signed-off-by: Sven Eden <sven@...>

2023-08-01 10:54:10 Tree
[3e1144] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in teleport.*

Signed-off-by: Sven Eden <sven@...>

2023-08-01 10:48:22 Tree
[98eadf] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/tank.*

Signed-off-by: Sven Eden <sven@...>

2023-08-01 10:42:05 Tree
[4fb96e] by Sven Eden Sven Eden

Cleaned up and (slightly) optimized spinlock.*

Signed-off-by: Sven Eden <sven@...>

2023-08-01 08:17:04 Tree
[2031d6] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/sound.*

Signed-off-by: Sven Eden <sven@...>

2023-08-01 08:11:29 Tree
[2d41ff] by Sven Eden Sven Eden

Simplify and optimize draw_amoon() [a bit] ...

The foolowing changes were made:

* Calculating radius2 once at the start of the function as it will be
a constant throughout. This usage avoids needing to call sqrt and
instead uses the more efficient multiplication operation.
* Checking xval != 0.0 after it is calculated to avoid the possible
division by zero error.

These changes should enhance the performance of the function.
I do not see any potential for real further improvement.

Signed-off-by: Sven Eden <sven@...>

2023-08-01 07:50:39 Tree
[c13ffb] by Sven Eden Sven Eden

cleanup and fix clang-tidy in sky.* and split out moon and zbuffer

Signed-off-by: Sven Eden <sven@...>

2023-08-01 07:39:02 Tree
[2fe989] by Sven Eden Sven Eden

SDI: Only rely on Repulsors if the buried level is really low.

Signed-off-by: Sven Eden <sven@...>

2023-07-31 18:31:38 Tree
[b86402] by Sven Eden Sven Eden

Split the spaghetti-copde shop into maintainable pieces.

Signed-off-by: Sven Eden <sven@...>

2023-07-31 18:22:51 Tree
[6a7d71] by Sven Eden Sven Eden

Fixed some tiny issues with land creation.

Signed-off-by: Sven Eden <sven@...>

2023-07-31 07:24:18 Tree
[f9d851] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/satellite.*

Signed-off-by: Sven Eden <sven@...>

2023-07-31 11:57:07 Tree
[fcad2c] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/player_types.*

Signed-off-by: Sven Eden <sven@...>

2023-07-31 11:54:13 Tree
[056eea] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/player.*

Signed-off-by: Sven Eden <sven@...>

2023-07-31 11:51:21 Tree
[fcee47] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in optiontypes.*

Signed-off-by: Sven Eden <sven@...>

2023-07-31 10:22:54 Tree
[eddebf] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in optionscreens.*

Signed-off-by: Sven Eden <sven@...>

2023-07-31 10:14:22 Tree
[ea1ca0] by Sven Eden Sven Eden

Cleanup and fixed clang-tidy warnings in optionitem*.*

Signed-off-by: Sven Eden <sven@...>

2023-07-30 13:24:37 Tree
[43579f] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in optioncontent.h

Signed-off-by: Sven Eden <sven@...>

2023-07-30 12:23:20 Tree
[7b8cce] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in network.*

Signed-off-by: Sven Eden <sven@...>

2023-07-30 12:20:26 Tree
[7134f1] by Sven Eden Sven Eden

Remove C89 style TRUE/FALSE integers where possible.

Signed-off-by: Sven Eden <sven@...>

2023-07-30 12:13:51 Tree
[11bcb6] by Sven Eden Sven Eden

Cleanup MISSILE and de-spaghetti physics and SDI

Signed-off-by: Sven Eden <sven@...>

2023-07-30 11:59:33 Tree
[dd69d7] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/menu.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 21:24:08 Tree
[6eab07] by Sven Eden Sven Eden

Overhaul client.cpp and modernize SAFE_WRITE()

Signed-off-by: Sven Eden <sven@...>

2023-07-28 21:01:58 Tree
[1dbcd9] by Sven Eden Sven Eden

Move ITEM from main.* to item.* ; delete main.cpp

Signed-off-by: Sven Eden <sven@...>

2023-07-28 20:19:23 Tree
[9f5d4f] by Sven Eden Sven Eden

Move WEAPON from main.* to weapon.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 19:56:48 Tree
[16f2f8] by Sven Eden Sven Eden

Move POINT_t from main.h to beam.h

Signed-off-by: Sven Eden <sven@...>

2023-07-28 19:45:41 Tree
[5f10d4] by Sven Eden Sven Eden

Move eTurnTypes from main.h to globaltypes.h

Signed-off-by: Sven Eden <sven@...>

2023-07-28 19:42:37 Tree
[92984b] by Sven Eden Sven Eden

Move BOX from main.* to box.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 19:40:38 Tree
[303228] by Sven Eden Sven Eden

Cleanup and clang-tidy warning fixes for land.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 11:00:44 Tree
[49557d] by Sven Eden Sven Eden

Cleanup and clang-tidy warning fixes for globals.h and globaltypes.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 10:53:55 Tree
[d40e09] by Sven Eden Sven Eden

Cleanup and fix clang-tidy in GLOBALDATA and give CSpinLock its own realm.

Signed-off-by: Sven Eden <sven@...>

2023-07-28 10:35:09 Tree
[b3e460] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in gfxData.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 09:54:25 Tree
[b8a01b] by Sven Eden Sven Eden

Also exract the LevelCreator from gameloop.*

Signed-off-by: Sven Eden <sven@...>

2023-07-28 09:42:33 Tree
[ed1842] by Sven Eden Sven Eden

Cleanup and fix gameloop.* and extract sScore

Signed-off-by: Sven Eden <sven@...>

2023-07-28 09:32:55 Tree
[2c94a1] by Sven Eden Sven Eden

Cleanup and fix clang-tidy wanrings in FLOATTEXT

Signed-off-by: Sven Eden <sven@...>

2023-07-28 09:14:34 Tree
[fe7222] by Sven Eden Sven Eden

Finally got rid of sscanf. Everywhere. ^^

Signed-off-by: Sven Eden <sven@...>

2023-07-28 08:18:42 Tree
[49ef86] by Sven Eden Sven Eden

Add -fexceptions and utilize clang-format 15

Signed-off-by: Sven Eden <sven@...>

2023-07-28 07:56:53 Tree
[12a772] by Sven Eden Sven Eden

Give the 'dirent' wrapping its own header.

Signed-off-by: Sven Eden <sven@...>

2023-07-27 12:15:30 Tree
[a26675] by Sven Eden Sven Eden

Cleanup and fix externs.h

Signed-off-by: Sven Eden <sven@...>

2023-07-27 11:59:00 Tree
[79f72d] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in EXPLOSION. Additionally some..
..optimizations were done making the code somewhat leaner in various
places.

Also make EXPLOSION::drawFracture() non-recursive.

Signed-off-by: Sven Eden <sven@...>

2023-07-27 11:25:45 Tree
[070ab6] by Sven Eden Sven Eden

SDI does not shoot if the missile would get repulsed.

Signed-off-by: Sven Eden <sven@...>

2023-07-27 09:26:58 Tree
[9ae476] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in ENVIRONMENT

Signed-off-by: Sven Eden <sven@...>

2023-07-26 16:54:02 Tree
[35643b] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in DECOR. Also halve DIRT sound volume.

Signed-off-by: Sven Eden <sven@...>

2023-07-26 12:44:16 Tree
[fc5459] by Sven Eden Sven Eden

Cleanup and fix clang-tidy warnings in PHYSICAL_OBJECT. Also switch ...
... draw() from PURE to override.

Signed-off-by: Sven Eden <sven@...>

2023-07-26 12:43:19 Tree
[7a6378] by Sven Eden Sven Eden

Cleanup and simplify debris_pool

Signed-off-by: Sven Eden <sven@...>

2023-07-26 12:14:55 Tree
[3699d2] by Sven Eden Sven Eden

Partly revert 0110414 and raise bot values again.

Putting everything on ai_level made all bots astonishingly dumb and
boring, so I reverted back to the previous calculated and variable
values.
However, the pow() usage is out the window, the values are overall
lower now. And even the deadly+1 bot (DEADLY + lucky) has no longer
a focus rate of 1.0 and all error potentials got raised.

Signed-off-by: Sven Eden <sven@...>

2023-07-26 11:49:08 Tree
[452e5a] by Sven Eden Sven Eden

AI: Do not let amp/armor get too far apart, but heed defensiveness.

Signed-off-by: Sven Eden <sven@...>

2023-07-26 11:20:22 Tree
[6995c4] by Sven Eden Sven Eden

Make the VS13 clock bug workaround more self-explanatory

Signed-off-by: Sven Eden <sven@...>

2023-07-26 10:38:56 Tree
[c31903] by Sven Eden Sven Eden

Cleanup and clang-tidy fixes in src/button.*

Signed-off-by: Sven Eden <sven@...>

2023-07-26 09:42:02 Tree
[f4da34] by Sven Eden Sven Eden

Simplified bitmap.h

Signed-off-by: Sven Eden <sven@...>

2023-07-26 09:35:55 Tree
[c79d07] by Sven Eden Sven Eden

Fix all clang-tidy warnings in BEAM and rename eClasses => eClass

Signed-off-by: Sven Eden <sven@...>

2023-07-26 09:34:16 Tree
[200f70] by Sven Eden Sven Eden

Fixed, secured and beautified land creation

2023-07-26 08:48:05 Tree
[7ee7e6] by Sven Eden Sven Eden

Fix global.surface being misused as height instead of y coordinate

Signed-off-by: Sven Eden <sven@...>

2023-07-26 07:54:56 Tree
[586ea9] by Sven Eden Sven Eden

DECOR::isOnFloor(): Clarify what scr_b and scr_r actually are. (Readability... so important...)

Signed-off-by: Sven Eden <sven@...>

2023-07-26 07:53:35 Tree
[0978da] by Sven Eden Sven Eden

atanks.cpp: Fix all g++ and clang-tidy warnings.

Signed-off-by: Sven Eden <sven@...>

2023-07-26 06:45:42 Tree
[5ca41b] by Sven Eden Sven Eden

MSLEEP/USLEEP: Remove semicolons from defines, so they can be used like functions.

Signed-off-by: Sven Eden <sven@...>

2023-07-26 06:45:06 Tree
[4bfe92] by Sven Eden Sven Eden

Apply more elegant fix for 24babc5 - My first go was a bit crude.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 17:53:55 Tree
[728da2] by Sven Eden Sven Eden

Fixed all "narrowing conversion" issues in aicore.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 16:55:35 Tree
[f21cd5] by Sven Eden Sven Eden

Get rid of troublesome srand()/rand()

Signed-off-by: Sven Eden <sven@...>

2023-07-25 12:56:56 Tree
[f8d702] by Sven Eden Sven Eden

ENVIRONMENT: Complete initialization. Revert if VS makes trouble.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 11:40:11 Tree
[05b461] by Sven Eden Sven Eden

Fixed some issues with the first .clang-format design and re- ...
... formatted everthing. Hopefully for the last time.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 11:36:14 Tree
[917b71] by Sven Eden Sven Eden

Revert 82afc03 and fix the underlying issue

VIRTUAL_OBJECT::draw() must not be called with nullptr or invalid
bitmap. So if there is a code path that leads to such a situation,
then it is a bug that has to be fixed.

Add a Theft Bomb missile graphic.
It was missing, which caused the assert() in VIRTUAL_OBJECT::draw()
to go off.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 11:26:52 Tree
[35b1fb] by Sven Eden Sven Eden

Turn env.game_name into a string, too.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 10:12:23 Tree
[cc3211] by Sven Eden Sven Eden

ship: Make description a string and get rid of more 90s string juggling

Signed-off-by: Sven Eden <sven@...>

2023-07-25 09:56:44 Tree
[7661e2] by Sven Eden Sven Eden

VS can initialize arrays nowdays, no problem.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 09:50:26 Tree
[9bf654] by Sven Eden Sven Eden

Make env.dataDir a string and get rid of C90 style pointer juggling

Signed-off-by: Sven Eden <sven@...>

2023-07-25 09:28:54 Tree
[1ea238] by Sven Eden Sven Eden

Fixed a bug that caused background updates to glitch

Signed-off-by: Sven Eden <sven@...>

2023-07-25 09:21:07 Tree
[245a44] by Sven Eden Sven Eden

Fix some typos

Signed-off-by: Sven Eden <sven@...>

2023-07-25 09:17:07 Tree
[fe26bb] by Sven Eden Sven Eden

Get rid of global path_buf and some of the 90s style pointer juggling

Signed-off-by: Sven Eden <sven@...>

2023-07-25 08:59:13 Tree
[adc668] by Sven Eden Sven Eden

Added debugging targets and fixed some minor buffer size warnings.

Signed-off-by: Sven Eden <sven@...>

2023-07-25 07:19:23 Tree
[0e60ef] by Sven Eden Sven Eden

Apply clang-format and fix (some) of the circular inclusion mess

For later diffs with previous commits, please use `git diff -w`.

Signed-off-by: Sven Eden <sven@...>

2023-07-24 13:50:07 Tree
[fddb4a] by Sven Eden Sven Eden

Add a .clang-format to use with clang-format 14 (Debian bookworm compatible)

Signed-off-by: Sven Eden <sven@...>

2023-07-24 10:01:42 Tree
[674fbf] by Sven Eden Sven Eden

Various tweaks and minor fixes

Signed-off-by: Sven Eden <sven@...>

2023-07-06 08:55:46 Tree
[1e4606] by Sven Eden Sven Eden , pushed by Sven Eden Sven Eden

Replace perror() with std::cerr where perror makes no sense.

Signed-off-by: Sven Eden <sven.eden@...>

2021-08-24 10:24:08 Tree

Discussion

  • Sven Eden

    Sven Eden - 2023-08-08

    I think the overhaul is almost ready. I haven't seen any stupid shots into walls for a couple of rounds, but will continue to test some more.

     
  • Sven Eden

    Sven Eden - 2023-08-08

    I think that's it.
    A bit more testing, and if everything is alright, I'll update the description with a (hopefully) complete ChangeLog.

     
  • Jesse Smith

    Jesse Smith - 2023-08-08

    I checked and I don't have a missle/31.bmp file. I sppose you could toss any appropriate bomb image in there and it'll do the trick.

    Something to keep in mind with regards to your point #1 is that the AI isn't supposed to be perfect. With the last release I ended up making some changes to the AI code which both reduced CPU time and made the AI less precise because it was always shooting perfectly, even the low-level bots, which made the game not fun at all. The AI should made some bad choices and mistakes.

     
  • Sven Eden

    Sven Eden - 2023-08-09

    Yeah... your changes made the AI, even the supposedly "DEADLY" one, dumb as rock. (sorry.)

    I think I remedied that by a few changes that made the USELESS to DEADLY curve steeper, while adding new error potential and countering situations where bots get "fixed" on one target (mostly human players). And I did not fully revert your changes, the limits are now generally lower and more spread out between USELESS and DEADLY bots.

    There is one odd thing I witnessed, a bot just slammed a Death Head senselessly into a steel-cage wall. Out of frustration, I guess, they couldn't get nowhere, but a 30k ordnance is a bit expensive.

    Once I have fixed what caused this, I think I am ready for the final "ChangeLog" presentation.

     
  • Sven Eden

    Sven Eden - 2023-08-09

    Found and fixed it. Squashed the fix into an earlier commit, though. (It was about knowing when the real last attempt was going on)

    For over 50 rounds the bots did not get "stuck" on attacking me first any more, so people complaining about "never" getting to play should have their well deserved fix now. The bots really could get a bit .. erm... attached.

    I'll whip up a ChangeLog soon.

     

    Last edit: Sven Eden 2023-08-10
  • Sven Eden

    Sven Eden - 2023-08-09
    • Description:

    Diff:

    --- old
    +++ new
    @@ -1,17 +1,35 @@
    -Hey Jesse,
    -I have taken the liberty of upgrading the code vastly, making it C++17 ready, and fixing a handful of bugs on the way. I also split up some of the overly long spaghetti code into maintainable portions.
    +**Fixes:**
    
    -There are two more things, however, I&#39;d like to take care of before the merge.
    -But I figured it would be a good idea to let you have a look already.
    +* Fixed a bug that caused background updates to glitch.
    +* Added missing Theft Bomb missile image, that caused an assertion failure whenever someone tried to shoot one.
    +* Fixed all g++ and clang-tidy warnings.
    +* Fixed a bug where global.surface was being used as height instead of the surface y-coordinate.
    +* Fixed a bug in land creation that caused possible crashes.
    +* Fixed a bug that allowed AI players to have a ton of amps but no armour and vice versa.
    +* Remove C89 style TRUE/FALSE integers where possible.
    +* Fixed typo: Swapper costs 4 grand, not 40k.
    +* Fixed a bug that caused AI to ignore 90% of the items they might have wanted to save their money on. just to shoot a Riot Bomb anywhere.
    +* Fixed a bug that caused the AI to use the first guess on their last attack planning attempt without actually planning it through.
    +* Fixed a bug that could cause a segfault when fast-forward-play ends.
    
    -When I have taken care of the following issues, I will write a detailed changelog here.
    +**Additions:**
    
    -1) Currently the Bots like to senselessly throw Riot Bombs around, even when it makes absolutely makes no sense and a clear firing path would be open. In the next few days I will try to isolate and tackle this issue.
    +* The Makefile got some debugging targets for easier debug mode building.
    +* Random number generation has been modernized and was made thread local.
    +* Beautified land and moon creation.
    
    -2) Some items are not used at all, like teleporters and the rocket. I&#39;d like to know why and to add (sensible) usage of these items.
    +**Changes:**
    
    -Something else: The game crashed whenever the Theft Bomb was chosen, because &#34;missile/31.bmp&#34; does not exist. Do you have it lying around? If not I would &#34;repurpose&#34; the stock image bmp for the Theft Bomb.
    -
    -Cheers
    -
    -Sven
    +* Source code is now formatted uniformly using clang-format. performance is non-critical).
    +* Bot values have been lowered and the spread between worst and best AI player has been increased. The DEADLY player is also no longer immune to making errors.
    +* SDI will no longer shoot a missile down that is going to be repulsed.
    +* Some recursive functions have been rewritten to be non.recursive.
    +* Some &#34;spaghetti-code&#34; style functions have been split up.
    +* Many C++17 perks have been made use of where they make sense.
    +* Got rid of sscanf(). Everywhere.
    +* Decoupled many objects that deserved their own compilation unit.
    +* SDI repulsor calculation is now independent from AI level of its owner.
    +* Enhance armour/amp/weapon boosting, so that AI players no longer forget what they wanted to buy (but couldn&#39;t) between rounds.
    +* The maximum SDI range calculation has been rewritten, and the repulsor shields have been strengthened a bit.
    +* AI takes target level and already dealt damage ratios more into account. This stops the bots to get &#34;stuck&#34; on a (mainly human) opponent.
    +* AI does not longer know the exact coordinates of their opponent, but &#34;drift&#34; a bit according to their level.
    
     
  • Sven Eden

    Sven Eden - 2023-08-09
    • Description:

    Diff:

    --- old
    +++ new
    @@ -8,11 +8,12 @@
     * Fixed a bug that allowed AI players to have a ton of amps but no armour and vice versa.
     * Remove C89 style TRUE/FALSE integers where possible.
     * Fixed typo: Swapper costs 4 grand, not 40k.
    -* Fixed a bug that caused AI to ignore 90% of the items they might have wanted to save their money on. just to shoot a Riot Bomb anywhere.
    +* Fixed a bug that caused AI to ignore 90% of the items they might have wanted to save their money on.
    +* Fixed a bug that caused the AI to break off their attack planning early  just to shoot a Riot Bomb anywhere.
     * Fixed a bug that caused the AI to use the first guess on their last attack planning attempt without actually planning it through.
     * Fixed a bug that could cause a segfault when fast-forward-play ends.
    
    -**Additions:**
    +&#39;&#39;Additions:**
    
     * The Makefile got some debugging targets for easier debug mode building.
     * Random number generation has been modernized and was made thread local.
    @@ -20,7 +21,8 @@
    
     **Changes:**
    
    -* Source code is now formatted uniformly using clang-format. performance is non-critical).
    +* Source code is now formatted uniformly using clang-format.
    +* Got rid of C90 style pointer juggling where possible (aka where performance is non-critical).
     * Bot values have been lowered and the spread between worst and best AI player has been increased. The DEADLY player is also no longer immune to making errors.
     * SDI will no longer shoot a missile down that is going to be repulsed.
     * Some recursive functions have been rewritten to be non.recursive.
    
     
  • Sven Eden

    Sven Eden - 2023-08-09
    • Description:

    Diff:

    --- old
    +++ new
    @@ -13,7 +13,7 @@
     * Fixed a bug that caused the AI to use the first guess on their last attack planning attempt without actually planning it through.
     * Fixed a bug that could cause a segfault when fast-forward-play ends.
    
    -&#39;&#39;Additions:**
    +**Additions:**
    
     * The Makefile got some debugging targets for easier debug mode building.
     * Random number generation has been modernized and was made thread local.
    
     
  • Sven Eden

    Sven Eden - 2023-08-09

    This sourceforge editor is driving me nuts... ^^

     

Log in to post a comment.