aliens

Author Topic: additional (ocean) terrains  (Read 12570 times)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
additional (ocean) terrains
« on: August 16, 2012, 03:02:37 pm »
taking into account the developments of this thread, I suggest the extension and modification of the geoscape code to allow for more terrain types, specifically "water" terrain types that behave like the "non-existent" ocean we currently have but allow for later inclusion of underwater missions.

for those who didn't follow the thread above and don't have an intimate understanding of world.dat : the globe in xcom is constructed of triangles and quadrangles that make up the land mass and have a certain terrain value that determines their texture in the geoscape as well as the battlescape terrain type for missions that occur on that surface. ocean is parts of the globe that are outside of the land mass (not inside any triangle or quadrangle).

as far as I can see, currently the game checks for land location when UFOs are shot down by
Code: [Select]
if (!_globe->insideLand(_ufo->getLongitude(), _ufo->getLatitude()))
{
_destroyUfo = true;
}

and when placing new bases by

Code: [Select]
if (_globe->insideLand(lon, lat))
{
_base->setLongitude(lon);
_base->setLatitude(lat);
for (std::vector<Craft*>::iterator i = _base->getCrafts()->begin(); i != _base->getCrafts()->end(); ++i)
{
(*i)->setLongitude(lon);
(*i)->setLatitude(lat);
}
if (_first)
{
_game->pushState(new BaseNameState(_game, _base, _globe, _first));
}
else
{
_game->pushState(new ConfirmNewBaseState(_game, _base, _globe));
}

so the "insideLand" would have to be followed by a check against terrain type. I suggest keeping the initial check against "insideLand" (perhaps rename to "validTerrain"?) for two reasons:
1) the original globe has no water terrains
2) even for supposedly-completely-covered globes, there may always be gaps where edges haven't been aligned properly, and it's better to have UFOs disappear in those than to suddenly fight a battlescape mission in the middle of the ocean because the UFO crashed into a gap.


I agree with anyone saying that this aims at something well post V1.0, but I believe it is a change that is best done early, and it shouldn't be all that hard... although I am not a programmer, and you might disagree on that last point :P

The result could for now be a visual improvement of the globe (different ocean colors by depth etc.), and later it would make creating a TFTD or UFO/TFTD combo-version a whole lot easier.

Offline Amunak

  • Colonel
  • ****
  • Posts: 101
    • View Profile
    • My homepage (czech only)
Re: additional (ocean) terrains
« Reply #1 on: August 16, 2012, 05:51:28 pm »
It't be nice (and also completly possible by just running an algorhythm) to make at least two types of water - deep (sea) water and coast/river/lake water. In the first step you could just generate it as a short distance from land to  water and later maybe add underwater ravines, etc. Even that it is just a cosmetic change, it'd make the globe nicer and maybe later some mod can add underwater missions or something.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: additional (ocean) terrains
« Reply #2 on: August 16, 2012, 06:01:26 pm »
yes, I was kind of trying to suggest that :)

first step would be to have a "terrain" that is still "water" for basic UFO purposes (impossible to build bases, UFOs cannot land and disappear when crashing there), but of course it would be nice to have several different "water terrains" - different depths, sand vs. coral reef vs. underwater ruins vs. oil pipeline vs. volcanic area vs. ... just like in TFTD :)

Offline Amunak

  • Colonel
  • ****
  • Posts: 101
    • View Profile
    • My homepage (czech only)
Re: additional (ocean) terrains
« Reply #3 on: August 16, 2012, 07:19:30 pm »
Just thinking about new crashsite tileset - if the ufo lands in a shallow water, you can have a map with a coast or maybe even a map on a beach/in a very small amount of water. It'd also solve the "bug" when sometimes the ufo seems on a land (when zoomed out) but is actually on water, and therefore the crash site doesn't appear.

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: additional (ocean) terrains
« Reply #4 on: August 19, 2012, 11:45:28 pm »
Just thinking about new crashsite tileset - if the ufo lands in a shallow water, you can have a map with a coast or maybe even a map on a beach/in a very small amount of water. It'd also solve the "bug" when sometimes the ufo seems on a land (when zoomed out) but is actually on water, and therefore the crash site doesn't appear.

I like this BEACH terrain type idea .

Offline Tentaculars

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: additional (ocean) terrains
« Reply #5 on: August 20, 2012, 04:44:46 am »
I like this BEACH terrain type idea .

Beach would include something like sand, representative water/animation, some beach plants, single rocks, cliffs , a lonely fisherman's house,a lighthouse, a Cave.

The layout of the set would require special rules as for example the harbourterrorsite in TFTD which seperates randomly placed tiles and fixed sets for the water.


Underwater missions -> i doubt that would look good at all with the current ufopalette. TFTD seems to use different palette for different places. The blueish touch to all objects requires a different colorset than UFO-palettes provide.

That rises the question -> how will colorpalettes be handeled in openxcom.
256 Colors can already look "relatively" good if theyre specific designed to fit the required colors of a level instead of having ONE single palette that has to fit ALL levels.

Anyone played / remembers these ?

https://gamona-images.de/378536/f94451dae029909d5bbfd551cb0e39c7.jpg
https://www.mobygames.com/images/shots/l/27656-donkey-kong-country-2-diddy-s-kong-quest-snes-screenshot-nice.jpg
https://www.gamezone.de/screenshots/original/2001/12/M_Dkc2_2001_12_03_11-08-17.jpg

 That's 256 colors and NOT more ;)
SNES had a libary of 32768 colors to pick from but it was only able to use 256 colors at the same time. Of course it used tricks to break that limit (f.e. fading daylight to dawn) by changing the current 256 colorpalette. But i think the point i wanted to make is clear.


« Last Edit: August 20, 2012, 04:47:50 am by Tentaculars »

Volutar

  • Guest
Re: additional (ocean) terrains
« Reply #6 on: August 20, 2012, 04:47:22 am »
Tentaculars, xcom uses "shading" algorithms, which quite strongly affects on "hue" variations, so "snes" or examples from anything else are very wrong (3rd doesn't show).
Before going 24bit this game won't get nice deverse graphics with shading. This is near impossible.
« Last Edit: August 20, 2012, 05:02:15 am by Volutar »

Offline Tentaculars

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: additional (ocean) terrains
« Reply #7 on: August 20, 2012, 06:12:41 am »
I have less knowledge about this stuff.  Well i am not going to talk to much about that since i know less. I was just curious if there can be used alternative colorpalettes for specific missions (as it seems to be in TFTD in some cases). That was my thought.


Volutar

  • Guest
Re: additional (ocean) terrains
« Reply #8 on: August 20, 2012, 07:31:46 am »
TFTD have modified palettes for different depths. As for me - I hate them, because this bluish is everywhere.
Though it's possible to have alternative palettes for specific tilesets or even missions. As for tilesets - whole battlescape should be using alternative tilesets (mcds) + palettes. If you change palette, old tileset will become crap because of crude dissociation.
As for alternatively colored missions - the only thing is possible in these circumstances is some color shift (like reddish all over the place when "red skies" came, or different planet).

UFO1:

TFTD land:

TFTD medium:


15 color hues for ufo1 and 14 color hues for tftd.
« Last Edit: August 20, 2012, 08:22:14 am by Volutar »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: additional (ocean) terrains
« Reply #9 on: December 02, 2012, 12:31:07 am »
Maybe its just me, but the idea of a HUGE combined game ( UFO Defence , TFTD, + Community races) is sounding really appealing, Openxcom++ ;D

Although i am not sure if we are closer to version 0.5 0r 1.0 with all the frantic coding going on , it must be getting close to looking into TFTD additions.

Offline papamaanbeer

  • Sergeant
  • **
  • Posts: 47
    • View Profile
    • Twitch papamaanbeer
Re: additional (ocean) terrains
« Reply #10 on: December 25, 2012, 11:58:58 pm »
LIKE the beach idea

for Future mix of ufo and tftd is already in my dreams

Offline Mr. Quiet

  • Commander
  • *****
  • Posts: 523
  • Likes: Quiet things. Dislikes: Loud things.
    • View Profile
    • =Open_X_Com= Mods
Re: additional (ocean) terrains
« Reply #11 on: December 27, 2012, 05:07:43 pm »
Hell yeah I'm so excited I'm jumping around! If I learn to do script coding I'm gonna make a Cobra total conversion mod. Who doesn't love Marvel's GI Joe 8)

What scripting languages would I have to study to be able to create mods on Openxcom? Hopefully it's a course I can take in school and after a year, I'll be fleshing out mods for the community!

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: additional (ocean) terrains
« Reply #12 on: January 04, 2013, 05:14:09 am »
Maybe its just me, but the idea of a HUGE combined game (UFO Defence , TFTD, + Community races) is sounding really appealing, Openxcom++ ;D

Although i am not sure if we are closer to version 0.5 0r 1.0 with all the frantic coding going on , it must be getting close to looking into TFTD additions.

I imagine TFTD should be a seperate ruleset developed at some point, as the game being feature-complete will mean almost all of the coding needed to faithfully implement TFTD has been done. (palette-shifting and changing the nature of the interception rules would need to be changed, plus any coding required to decode TFTD assets, and of course re-authoring the ruleset) Combining the two games sounds very weird, especially given that they had two seperate tech trees that were based off completely different paradigms.

Presumably then the installer can be changed to ask for TFTD optionally, and the new game dialogue can allow you to pull down a ruleset and grab assets from different folders. (Presumably DATA could be renamed XCOM for the original game and TFTD and then loaded in as appropriate)