Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] Limited world size #22718
Conversation
This comment has been minimized.
This comment has been minimized.
|
This option won't appear in existing worlds, only when creating worlds, right? |
This comment has been minimized.
This comment has been minimized.
Changing world limit options in the middle of the game will most probably cause bugs (e.g. some overmaps can become inaccessible after you reduce limits and who knows what will happen with the poor character who is located on overmap which became unaccessible). |
ZhilkinSerg
changed the title
Limited world size
[WIP] Limited world size
Jan 12, 2018
BevapDin
reviewed
Jan 13, 2018
| } | ||
| } | ||
|
|
||
| void limit_coordinates( point &p ) |
This comment has been minimized.
This comment has been minimized.
BevapDin
Jan 13, 2018
Contributor
Please don't repeat the whole logic in those two functions, just forward p.x and p.y to the main function above.
Also, the name of those functions is not good, what coordinates are limited and how and why? Previously (the previous version of this branch) the name made some sense as it was scoped to overmap_buffer, now it's a global function and one does not know what coordinates it refers to. It should at least contain "om" or "overmap" to indicate it operates on overmap coordinates.
The function declaration in the header is also missing some comment explaining why and when to use it and what coordinates to use it on. (Again, this is not so important when it's a local, or even private, function of a class, but now it's global and everywhere may see and use it.)
This comment has been minimized.
This comment has been minimized.
ZhilkinSerg
Jan 13, 2018
Author
Contributor
Thanks. I've utilized inline functions to get rid of duplicate code.
The reason I moved these functions is that it seems to me to be correct place as new functions are also related to coordinate conversions. I didn't come up with the good name yet - will try something mentioning overmap.
Anyway that should've been changes to temporary local branch, but I accidentally committed to wrong branch and also pushed the changes.
This comment has been minimized.
This comment has been minimized.
tyrael93
commented
Jan 17, 2018
|
How will you implement the actual "end of the world line"? |
This comment has been minimized.
This comment has been minimized.
World map will be looped - imagine sphere or torus. You go north |
ZhilkinSerg commentedJan 8, 2018
•
edited
What was changed:
WORLD_LIMIT,WORLD_LIMIT_XandWORLD_LIMIT_Ywhich determine if world is finite and also maximum number of overmap cells in horizontal and vertical axis after which world is looped to origin if set to non-zero (as suggested in https://discourse.cataclysmdda.org/t/limited-world-size/14616/).