1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-26 08:41:13 +02:00
Commit Graph

115 Commits

Author SHA1 Message Date
Tomasz Zieliński
c909bd766e Merge remote-tracking branch 'origin/develop' into fix_rmg_teams
# Conflicts:
#	lib/rmg/CMapGenOptions.cpp
#	lib/rmg/CMapGenOptions.h
2023-11-07 20:54:04 +01:00
Ivan Savenko
3634fb2158 Remove int <=> Identifier comparisons 2023-11-03 16:03:29 +02:00
Tomasz Zieliński
07dac8b6d4 Works more or less 2023-10-28 20:30:38 +02:00
Ivan Savenko
ec8d31bbfc First step at unifying game identifiers code 2023-08-25 13:38:01 +03:00
Tomasz Zieliński
3889193a48 Reorganize namespaces 2023-07-07 16:32:17 +02:00
Tomasz Zieliński
64e8b9b2b9 Smarter scaling for forces between zones. 2023-06-23 21:43:12 +02:00
Tomasz Zieliński
25707b6d5e Place zones in order given by template. Yields better results in a number of cases. 2023-06-18 20:23:25 +02:00
Tomasz Zieliński
65d10cf9f2 + Handle Wide Connections
+ Possibly hide fictive and repulsive connections, needs testing
2023-06-17 19:09:38 +02:00
Tomasz Zieliński
2603e11f48 Simplify and correct ZonePlacer main loop, make sure to save optimal solution at every step. 2023-06-14 14:07:31 +02:00
Tomasz Zieliński
aa16f57b8a Remove unused variables 2023-05-20 14:28:18 +02:00
Tomasz Zieliński
71f882d5ba Refactored Functions.cpp, removed unused function. 2023-05-20 07:55:28 +02:00
Tomasz Zieliński
73d9f5bd0a Parallel RMG works fine for maps without water. 2023-05-19 20:30:15 +02:00
Tomasz Zieliński
80b5c53815 Place quest artifacts after all the treasures are already created. 2023-04-23 10:08:16 +02:00
Tomasz Zieliński
88c436691d Simplify logs 2023-04-20 16:26:06 +02:00
Tomasz Zieliński
09b493681b More iterations, higher gravity constant for better results. 2023-04-20 16:13:30 +02:00
Tomasz Zieliński
55d7d7b9b5 Fix coefficients to make dead code actually be used sometimes. 2023-04-20 12:44:32 +02:00
Tomasz Zieliński
00d7901e59 Add another placement technique - swap two misplaced zones. Don't move same zones in consecutive iterations. 2023-04-20 12:24:57 +02:00
Tomasz Zieliński
c34b1cd713 Fix warning-as-errors. 2023-04-19 08:45:23 +02:00
Tomasz Zieliński
d841655c1d Scale fuzzy edges with map size. 2023-04-18 22:34:26 +02:00
Tomasz Zieliński
15592c3aff Change metric to create more interesting zone shapes. 2023-04-18 22:01:51 +02:00
Tomasz Zieliński
39154737a5 Use std::optional instead of boost::optional. 2023-04-18 19:34:54 +02:00
Tomasz Zieliński
6551585f96 Start with low stifness to let zones pass through each other - typical temperature fall.
(cherry picked from commit 435b9f7881)
2023-04-18 19:21:33 +02:00
Tomasz Zieliński
8d5cd6d072 Randomize starting positions a bit so zones don't fall exactly on the grid.
(cherry picked from commit 33eb28b570)
2023-04-18 19:21:28 +02:00
Tomasz Zieliński
fc91152da7 Fixed zones getting actually randomized after construction. Tweaks to algorithm, now it's considerably better.
(cherry picked from commit c13019059f)
2023-04-18 19:21:19 +02:00
Tomasz Zieliński
2d7a819939 Parameters which work well for Jebus - accessible desert and Blue placed away from Red
(cherry picked from commit 42c6127c79)
2023-04-18 19:21:13 +02:00
Tomasz Zieliński
494f4eaa3f Simple solution that works - by ChatGPT :)
(cherry picked from commit 7c6e4bc2fe)
2023-04-18 19:21:06 +02:00
Tomasz Zieliński
a1f094776f Use fixed starting positions for now.
(cherry picked from commit 43c51805f5)
2023-04-18 19:20:57 +02:00
Tomasz Zieliński
7d2745fda6 Simplified target function comparison.
(cherry picked from commit 809f6344ff)
2023-04-18 19:20:50 +02:00
Tomasz Zieliński
48c11f661b Fix zone attraction
(cherry picked from commit 164ecaea60)
2023-04-18 19:20:40 +02:00
Tomasz Zieliński
3f83eaafc4 Fix distance check
(cherry picked from commit 319f289dc4)
2023-04-18 19:20:32 +02:00
Tomasz Zieliński
64adc9983d - Fixes for corectness
- Space apart starting zones of players

(cherry picked from commit 80be12ac68)
2023-04-18 19:20:23 +02:00
Tomasz Zieliński
09d50a5e9f First draft that kinda works.
(cherry picked from commit 7dd5a9c15d)
2023-04-18 19:20:12 +02:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Konstantin
7bfb37df4d vcmi: modernize lib/rmg 2023-02-14 02:50:39 +03:00
Ivan Savenko
1e37e66e6c Replaced Terrain::BORDER and WRONG with NONE 2023-01-10 20:09:09 +02:00
Ivan Savenko
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
Ivan Savenko
e1799379dd Terrain/Road/River handler are now in compileable state 2023-01-10 00:01:35 +02:00
Ivan Savenko
1468f6aded Converted terrainTypeHandler into proper handler class 2023-01-10 00:01:35 +02:00
Nordsoft91
785787e454
Merge branch 'develop' into interface-builder 2022-12-24 21:56:29 +04:00
nordsoft
53b2f68560 Serialize template 2022-12-14 04:37:11 +04:00
nordsoft
5d1b5b6c9c Throw an exception if empty zone is generated 2022-12-06 15:07:16 +04:00
Tomasz Zieliński
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Tomasz Zieliński
2bd30556a3 Store TerrainType by havlue and handle by reference 2022-09-26 09:17:55 +02:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Tomasz Zieliński
6aaf77812b Changed logic for zone placement.
Now every zone can be surface, underground, or both. This is separate from water <-> land distinction.

Iand type is now a combination of flags and can take multiple values: "type": ["LAND", "WATER", "SURFACE", "SUB", "ROCK"]. In nothing is specified, terrains get LAND | SURFACE flags by default.

Non-surface zones will default to DIRT, and non-underground zones will default to SUBTERRA.
2022-09-22 18:23:31 +02:00
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
DjWarmonger
7ba271edf1
Rotation rebase2 (#912)
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
Nordsoft91
4bd0ff680a Random map generator refactoring (#762)
random map generator refactoring and improvements
2022-09-11 11:31:27 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Nordsoft91
5c1a66ab69 Rmg water support (#745)
* RMG: water support and refactoring
* Fix seers hut bug
2022-06-11 18:40:24 +03:00