Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds an ocean. #70070

Merged
merged 23 commits into from
Dec 10, 2023
Merged

Adds an ocean. #70070

merged 23 commits into from
Dec 10, 2023

Conversation

I-am-Erk
Copy link
Member

@I-am-Erk I-am-Erk commented Dec 8, 2023

Summary

Features "There's an ocean in the East (or wherever you set the json) now. NBD. Feel free to add content for it."

Purpose of change

We have all these boats and nowhere to use them.

Describe the solution

Initially I wanted to add a "nocean", a freshwater ocean using lake settings, but @ralreegorganon, who added lakes in the first place, as like "noooo erk, do it properly". So I did. Now you get a full salt water ocean. There's no content for it, but it's hooked up for everything and supports custom map specials and things. It will probably need some fine tuning in that regard but it's a very fine start I believe

This system works by rapidly but smoothly increasing the threshold for what can be considered a lake every OMT after we hit the threshold. It's random but takes 1-3 OM before you start seeing the nocean.

Credit to ehughsbaird for figuring out the solution for world gen lag. Tons of credit should go to ralreegorganon not just for programming the lakes code that this is standing on top of, but for guiding me in the general process of doing this while keeping his temper as I run roughshod over his baby.

Describe alternatives you've considered

I want to do this with salt water, but I also want to get it PRd for testing. Salt water should be straightforward, but not small, so this gets us started.

It was straightforward, and not small, but I did the salt water thing. Alternatives include half assing this with fresh water but, well.

Testing

Description fixed since this:
image
now you can stare out into the ocean and contemplate mortality. Game improves 300%.

image
Or you can just dive in, and sink, and let the end take you.

image
It's peaceful, down here. Nobody has added any seaweed yet.

image
oceans are deeper than lakes. They get deep a little too fast, that's for another day.


known... bug?
image
this is salt water, if you're near an ocean and a lake forms, the game thinks it is an ocean sometimes. I don't have a great solution for this yet but also, it's hard to find and it only happens close to the ocean so I'm not sure it's a bug or just brackish water.

On exam I see that lake_shore is still making the ocean have fresh water on the edge. I will try to fix that but I have to hang xmas lights first.


Mapgen portion only: I've checked all the transitions from E, W, N, and S oceans just to make sure it looks natural. Haven't seen any artifacts, I think it's pretty good.
image
image
image
image
Have fun out there guys.

Additional context

Another step towards #70056

Oh yeah

If you're interested in making content that would go in a saltwater ocean, now's a good time to start. It works exactly like lake specials, but with the word "ocean" instead.

@I-am-Erk I-am-Erk added Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` labels Dec 8, 2023
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Dec 8, 2023
@MNG-cataclysm
Copy link
Contributor

Could we have the ocean roll over into another continent after traveling a great distance in a given direction?

@Inglonias
Copy link
Contributor

Is there a way to make the ocean into saltwater?

@MNG-cataclysm
Copy link
Contributor

Is there a way to make the ocean into saltwater?

I think the best way would be to add some new water terrain types that give salt water instead of fresh, and then add ocean tiles that are composed of these saltwater terrain types. Connect the spawning of those to a predefined ocean type the same way we do with lakes, and that should work.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Dec 8, 2023

Is there a way to make the ocean into saltwater?

yep, it's not even as hard as I thought it would be.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Dec 8, 2023

Ralreegorganon convinced me to do some things properly the first time like a goober. This will be ready pretty quickly.

@I-am-Erk I-am-Erk marked this pull request as draft December 8, 2023 18:59
@John-Candlebury
Copy link
Member

It's pretty neat to set it to 1 om in each direction, which gives you a large island about 5x5 OM across with some really cool formations.

Amazing, Cataclysm II

@MNG-cataclysm
Copy link
Contributor

I've heard that there's been some plans to incorporate Rhode Island into the game for lore reasons. Will we be getting this with this PR, or is that something further down the road?

@Rimplestilt
Copy link

Could we have the ocean roll over into another continent after traveling a great distance in a given direction?

Can we have a world size parameter along with the ability for X and Y chunk grids to eventually wrap around, and essentially simulate an entire globe? xD

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. labels Dec 8, 2023
@I-am-Erk I-am-Erk changed the title Adds an ocean. Rather, a nocean. Adds an ocean. Dec 8, 2023
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Dec 8, 2023
@github-actions github-actions bot removed the json-styled JSON lint passed, label assigned by github actions label Dec 8, 2023
@I-am-Erk
Copy link
Member Author

I-am-Erk commented Dec 8, 2023

Could we have the ocean roll over into another continent after traveling a great distance in a given direction?

Can we have a world size parameter along with the ability for X and Y chunk grids to eventually wrap around, and essentially simulate an entire globe? xD

Sure, you just have to code and add it :)

Also tweaks an urbanosity error I noticed during bug testing
tests/overmap_test.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Dec 9, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Dec 9, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 9, 2023
I-am-Erk and others added 2 commits December 9, 2023 08:46
Co-authored-by: Procyonae <45432782+Procyonae@users.noreply.github.com>
@Procyonae
Copy link
Contributor

How are you getting to the ocean quickly in testing and how viable would it be to add a starting scenario at the coast to make testing for future PRs quicker?

@Procyonae
Copy link
Contributor

Procyonae commented Dec 9, 2023

Also several peeps on existing saves are complaining about getting dumped into areas of the new mapgen that they're not happy about (middle of crazy dense forest for instance) so I presume this will also leave players that have gone say straight east in their save stuck on a thin peninsula and have to retrace their explored 180x180 OMs to get back to new land, some way to make this less annoying before stable rolls round would be good

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Dec 9, 2023

There's not really any way to prevent that, this can be disabled quickly in global settings by turning generate oceans off but people do need to read changelogs, I can't help them if they don't

@Procyonae
Copy link
Contributor

Personally I don't think that's a reasonable expectation of stable players but fair enough

@I-am-Erk
Copy link
Member Author

If it's a major issue, prior to stable we may be able to work out a solution

@fairyarmadillo
Copy link
Contributor

Personally I don't think that's a reasonable expectation of stable players but fair enough

Would it be possible to reorient legacy saves so that their new coords place 0, 0, 0 at the player's location the first time they load?

@I-am-Erk
Copy link
Member Author

That sounds like it would have serious repercussions. I'd prefer a script that sets the ocean edge value to be equal to the furthest they'd travelled, but that's a lot of work. Or the global setting for oceans could be turned off by default in older games, I'm not sure how to do that but it might be possible.

@Maleclypse Maleclypse merged commit fed496b into CleverRaven:master Dec 10, 2023
23 of 26 checks passed
@I-am-Erk
Copy link
Member Author

Hyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype

@I-am-Erk I-am-Erk deleted the nocean branch December 10, 2023 21:12
@Zireael07
Copy link
Contributor

Well deserved hype I'd say unlike some games...

@MNG-cataclysm
Copy link
Contributor

Well deserved hype I'd say unlike some games...

Absolutely, this opens up a whole new world for content and story development.

(/s I still think we need a $3.99 battle pass for the Steam release, gives out unique loading screens)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Enhancement / Feature> New features, or enhancements on existing Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mods: Aftershock Anything to do with the Aftershock mod Mods: Dark Days of the Dead Anything related to the DDotD mod (classic style zombies) Mods: Desert Region Anything relating to the Desert Region mod Mods: No Hope Relating to the mod No Hope Mods: TropiCataclysm 🌴 Having to do with the tropical region mod for DDA. Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet