Implementation Light & Shadow

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Yay, update after more than a year :love: The following is collected from the ongoing discussion on Slack. It should be seen as a wrap-up of different suggestions, opinions, and ideas ;)

Topic of the technical discussion in the Slack-channel: How can we achieve a limited, finite, and symmetric world for LaS?
Mainly I'm interested in suggestions and technical advice on how we can limit the world. Here are two suggestions:
  1. create _one_ island surrounded only by ocean, without any other islands. Probably the easiest solution, although it does not limit the playable area itself.
  2. create a _symmetric_ world with a (spherical) barrier centered at the world midpoint. The barrier could be some kind of magic force field that simply cannot be passed.
I'd prefer (2) as I think it's leaves more freedom for the general world generation (could be islands, forests, mountains, ...) and allows for having a minimap of the playable area on screen for the whole map. Do you have any suggestions on how we could implement such a restriction? The inspiration for (2) is obviously the magical dome from Gothic I ;)

@Cervator suggested a board game like level design (as depicted in some concept art by @SuperSnark) which is composed of 5 sectors. The symmetry axis divides the middle sector.
The sector concept is already visible in the PolyWorld generator, although the problem of bordering the map remains. Nonetheless, PolyWorld might be a good choice for LaS world generator. The tiled look fits good into the overall checker board scenario.
Code:
 _____ ____ __:__ ____ _____
|     |    |  :  |    |     |
|  W  |    |  :  |    |  B  |
|_____|____|__:__|____|_____|
              :
Instead of addressing the magical dome with completely new concepts, indestructible (and invisible) blocks can be used in the first instance. Adding visual effects and "force feedback" (e.g., knocking the player back) could be an additional milestone.
I wonder if this can be realized by using a system that catches and eliminates the damage the player deals to the block. It would be interesting to just make the border blocks "solid" and "indestructible", i.e., air, water, and all terrain blocks located on the border sphere.

I think we should make a roadmap to get things piece-wise done. I'd like to start with what we already have, i.e., a quite "realistic" symmetric world gen. Then we can tackle different aspects bit-by-bit. For instance, replace the tree generators with poker chip trees, refine the world generator to be more of a game board, enhance the map borders (invisible wall -> fancy magic barrier -> floating island with drop-off to Nirvana), and so on.

I try to get some concept work done in the next to clarify the possible steps we can take from now. Any help is appreciated ;)
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
So, we now have a magic force field around the center of the world. :)

The dome is slowly rotating, and I think with tweaking the texture just a bit it'll give a nice magic effect. I've added some TODO note for myself, but I still want to share them with you to get some feedback ;)
  • restrict character movement: I'm not sure how to do this. I tried to intercept movement events but obviously I either caught the wrong ones or it does not work as I think it does. Any hints towards how to modify the character movement in order to push the player back from the force field is appreciated.
  • add particle effects to the force field: I'd like to have some particle effects floating around when the player comes near the dome - this thread can be used for further discussion.
  • add glow to the force field: I think it would be a nice effect to have the barrier slightly glowing. Could even be combined with sizzling sounds - because such magic, much force, very energy!
  • scale the dome and its texture: currently the texture is of fixed size and scaled with the sphere. I'd like to have the energy waves always the same size, regardless of how big the sphere is. Furthermore, the sphere should initially be of unit size (~1 block) - poking @glasz for quick resize ;)
Terasology-150215215203-1152x720.jpeg

 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Much wow, excellent future!
 

glasz

Active Member
Contributor
Art
Here's a quick resize.

For restrics character movement, wouldnt it be possible to add a physics force, that kicks in at a certain distance from the center of the world, and completely negate any character movement?
 

Attachments

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Here's a quick resize.
Thanks for the resize - will try it soon :)

For restrics character movement, wouldnt it be possible to add a physics force, that kicks in at a certain distance from the center of the world, and completely negate any character movement?
That's what I'm trying to do - I'm only missing the right spots to get it technically working I think :( I'll try it again today and will ask for help with some code xamples if I still can't get it to work... ;)
 

chessandgo

Member
Contributor
Hunter
1 and 2 seems fitting. Although when I started it up it instantly gave me a kind of D&D feel. Towns being encounters, paths between them perhaps for monsters and RP, the world has a tiled look of a board. Perhaps farther player grouping/clans can be developed and have moster attacks trigger something. Perhaps not even in depth, just some tools to aid for the ones who want it for RP
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
I'm back at it :) This time, the dome restricts the player's movement, you cannot escape. And with @glasz second version of the sphere I've got the scaling right as well.

In case someone wants to test out the current state of the magic dome, just grab the feature-magic_dome branch for both LaS and LaSR, and make sure to have the changes from my CharacterImpulse PR. Start a new game with LaS preset, best select the flat world for testing. You should spawn inside a huge dome. At its border, the force field will push you back inside, you cannot escape!


TODO:

  • Humming Sound when near the dome. Is there a convenient way to have sounds with location events that automatically play when a player is near? If not, should this be a general thing, maybe AmbientSoundComponent
  • Particle Effects when a player touches the dome. Maybe even if the player is near enough to see more "details" and feel the magic!
  • Allow for an arbitrary center point (currently hard-coded at world origin) and size of the dome
  • Make sure the dome is always rendered (always relevant) for all clients (currently seems to work only for the host).
  • Adjust player spawn algorithm, as spawning outside the dome is no fun at all...
 
Last edited:

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Awesome to see movement! Pinging @SuperSnark for great justice :D

Tested it out and merged stuff, the dome functions in a very nice manner! The equal but opposite impulse when you hit the dome feels great, especially with "hspeed" on. Definitely spawn some particle effects :)

I was particularly impressed you can't even escape with the "ghost" or "teleport" commands! Although you can sort of hack it by teleporting waaay out of range. You'll get some impulse movement spam for a while, but for some reason it stops after some time. Then you technically can stay very still, look around a bit, and not be shifted further, but the second you move even slightly you start getting yanked across the world again. That did show me one oddity: after you finally get pulled back to the right surface coordinate the slight upwards impulse means you'll slowly get shifted higher and higher, rather than get pulled toward the middle of the field. In this case I had teleported about 5500m away so each spam-impulse sent me up slightly so by the time I got back I was a bit above the dome. Could also see it waaay in the distance even from 5km away!

DistantMagicDome.jpg

The develop branch in LightAndShadow still has some pending work by @msteiger including the spawn platform. Maybe look into merging that? I think it would make sense to always spawn a player on the spawn platform, regardless of where they were when they left the game. Could hover up in the air over the center of the map, but under the top of the dome. Since it is meant to be a somewhat faster paced game that actually ends probably an FPS style lobby room would fit in. Maybe having that in place would also make it easier to guarantee locations / stuff having loaded right (wouldn't ever have sneaky players logging back in Outside somehow)

I don't know about the SFX. There are known issues at play already, like some location-based SFX seemingly playing for all players in multiplayer, no matter where they are (like the death sound or a fuse burning). Needs work.
 
Top