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
Nordsoft91
9d06e51631
Place proper towns in underground ( #743 )
...
Implement feature of proper town selection in underground and surface
* Some minor refactoring of rmg
2022-05-28 16:03:50 +03:00
AlexVinS
ecaa9f5d0b
Entities redesign and a few ERM features
...
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
John Bolton
a05ae78e67
Fixed lots of warnings.
...
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.
4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
AlexVinS
9d108d59db
Redone RMG template serialization using JSON serializer, added tests
2018-03-10 19:36:19 +03:00
Nikolay Shalakin
3795985de9
Eliminate warnings / errors. Pull request #388
2018-02-11 15:17:14 +03:00
DJWarmonger
8f42cdea67
Refactoring: use private pointer to CMapGenerator
2017-11-03 21:03:51 +01:00
AlexVinS
15138c23de
Finished conversion to new logging API
...
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
143ff682bc
Logging cleanup
2017-08-10 21:59:55 +03:00
AlexVinS
85e952f25f
Logging cleanup 3
2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d
Logging cleanup
2017-08-10 19:52:05 +03:00
Arseniy Shestakov
cdd9dbc7f1
Code style: avoid some ambiguous else if indentation
...
If some code intentionally want to break else if to achieve specific indentation there must be braces.
2017-07-19 03:42:26 +03:00
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
DJWarmonger
4d1fb67594
Sanity check for Coverity #1366290 .
...
(Vector should never be empty, especially for chosen zone).
2017-05-27 21:37:05 +02:00