Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nikita_Sadkov

Pages: [1] 2 3 ... 8
Offtopic / Re: XCOM Inspired Fantasy Game
« on: June 07, 2019, 05:14:50 pm »
The progress is steady  :D

Offtopic / Re: XCOM Inspired Fantasy Game
« on: May 11, 2019, 01:28:03 pm »
Looking god mate, reminds me of Heroes of might and magic.
It doesn't really have much in common. HOMM3 obviously used voronoi diagrams to generate maps, judging by the geometrically perfect biome shapes. I'm not using them, because they don't appear to have any advantage over fractals and harder to control. Especially when it comes to placing roads and rivers. With fractals, you have mountains, rivers and forests forming naturally, which give birth to settlements, which are then connected with roads. With voronoi people typically placed rivers/roads along voronoi cell edges. It is also easier to fine-tune fractals by say replacing random with statistically correct data, so you could get islands having curvature similar to that of Ireland, or some Moon crater :D

Also, for now I've reduced the amplitude of road variation, as it was too noisy.

Offtopic / Re: XCOM Inspired Fantasy Game
« on: May 11, 2019, 01:37:31 am »
Finished the initial version of island generator. For now it is good enough to test gameplay. Random generation is surprisingly methodical, it appears there is just one right way to do it, but countless wrong ones.

Resources / Re: Graphic Gallery
« on: May 09, 2019, 06:27:41 pm »
No, if you really want you could today load 2x bigger sprites to game and it would not crash, but problem lay in other place, offset.
Game is full of magic numbers that fit current graphic size and completely do not work with any other size. And adding arbitrary sizes will be hell of a work to do.
Hope one day you will get to refactor it. Would love to see a Diablo mod with original sprites, instead of downscaled

Resources / Re: Graphic Gallery
« on: May 09, 2019, 12:00:24 am »
I think I can safely speak also for all other OXC and OXCE devs when I say that this is the absolute bottom of our priorities.
What about converting graphics to simpler formats, like those in Wesnoth? That would promote modding. Say on the first run OXC could dump all data to PNG, WAV and CSV, and then uses these files. Now modding would be as easy as opening CSV in a spreadsheet app. That way supporting HD-graphics would be a matter of adding support to blitting routine.

Would be cool to have The Thing like aliens. Which could randomly infect/replace player's soldiers or civilians, and then hatch at some random moment, when player least expects it. There could be kits to test for infection/replacement, and robotic soldiers immune to it, etc... But guess it will require modding the engine.

Resources / Re: Graphic Gallery
« on: May 05, 2019, 11:31:34 am »
Ok, used some sprites from adjacent topic, i have done these terrains:
Cool! But I think it would be nicer, if OXC could handler larger sprites, instead of downscaling them. Most people have more than 320x240 pixels on screen. And most original art could use some retouch for higher resolution too. That should be a priority of OXC devs ;)

Offtopic / Re: Does anyone not from Thailand pls come in
« on: May 03, 2019, 12:54:56 am »
Most countries have elites rigging their elections one way or another, manipulating electorate. But some countries, like North Korea, just do it in blatant manner, and then tax population for 100%, without hiding it, and if someone complains he gets executed. That is like slavery.

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 28, 2019, 03:54:05 pm »
wow, looking good.
Unfortunatelly it is a bit tricky to generate rivers. One may suggest a simple gradient descent, but then rivers will end at a local minima. So it requires waterflow and erosion simulation to get out of local minima, without flooding like half of the island into a swamp. It is easier with the graph methods, where one can just send waterflow along the edges.

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 28, 2019, 12:38:44 am »
Slowly it comes to something usable in the game. Tilesets taken from Freeciv  :P

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 25, 2019, 09:26:09 pm »
If I pick it up again, I'd probably need to add some functions after the initial polygon generation to randomize the coastlines a bit, since they tend to bear the hallmark of the great circle lines, making them look boring and obviously computer-generated.
I doubt there are any better algorithm than the midpoint displacement, which is very robust, corresponds to real life islands and can fill-in very precise shapes with arbitrary constraints.

People also use it to generate electricity or lightning like effects. And it also can serve as an input for sound generation, if you need some beefy synthetic sound  effects for your sci-fi setting video or game

I.e. the algorithm is a goldmine of cheap content, when you have no money to pay artists or sound designers.

Although I've found that the midpoint algorithm on a square grid has apparent bias, because it needs to sample from all 8 nearby cells, but the distance to four cells is 1, while distance to the four other cells is sqrt(2), meaning that N,S,W,E directions have less influence that they should, so the result isn't perfectly random and has predictable patterns, like say 45 degree lines are 1.4 times more likely than 90-degree ones. I.e. again we have that nasty square situation :D Googling has shown that people fix this sampling bug using some advanced math, beyond my grasp. But I'm sure it can be fixed by using hexagon grid instead, and then sampling down to squares. Still for my purposes these subtle errors ain't that noticeable and diagonal walls look more gamey.

Anyway, here is the current state of island generation. Several of these islands will be merged together to create game world.

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 24, 2019, 03:31:44 pm »
Solved the concave polygon render with multi-pass raster scan, without any flood fill queue. Comes out nicely with a tail of islands on demand. Mirroring it would produce figures for a new Rorschach test :D

The shapes are still triangle based, but I can also fed in a rectangle or a hexagon or any polygon.

It is also useful to rotate these brushes, so had to invent the algorithm to rotate a point P around the origin O:

Code: [Select]
rotate A O P =
| Dir = P-O
| DX,DY = Dir
| CosA = A.cos
| SinA = A.sin
| NX = DX*CosA - DY*SinA
| NY = DY*CosA + DX*SinA
| [NX NY]+O

The hardest part is noticing that you don't need to compute the length of P-O, because division by it gets cancelled anyway.

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 23, 2019, 07:14:52 pm »
Decided to use midpoint displacement. It is trivial to implement, and orders of magnitude easier to control, compared to say perlin noise, voronoi or random walk. Although one can surely tweak random walk to produce something similar to midpoint displacement. In the end, all these methods are closely related.

Also, naive perlin noise generator producing circular(!) rivers:

But yeah, some people love crazy abstract stuff. Many fans very unhappy when Minecraft's map generation got tuned down to be less extravagant, killing stuff like overhanging terrain.

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 21, 2019, 05:20:08 pm »
A reverse engineered explanation of the original Civilization map generation algorithm:

basically, Civ1 accumulated several random-walks, and then fixed the resulting map so unit wont be moving across what appears impassable body of water.

I've used similar code in my ancient Warcraft II map generator:

But instead of random walk patches, I've just put several seeds, and then applied cellular automation to the whole map, first for landmasses, then for hills, and then for forests. After that trying to place resources and player bases.

Mapgen4 also uses same tactics with placing emitters, but then builds voronoi polygonal surface, instead of running cell automata or random walk.

Alternatives: fractal generation, with midpoint displacement; overlaying some noise functions (like Minecraft does with perlin noise); and XCOM and Spelunky style of combining premade map pieces (Minecraft also embeds premade pieces inside noses-function generated map).

Instead of voronoi, one can probably uses other methods to interpolate inside point cloud, like quadtrees or metacircles:

Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 21, 2019, 01:15:23 pm »
Digging out procedural map generation. The following appears to be the state of art:

Pages: [1] 2 3 ... 8