Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Wrapped 3D world; opinions welcome

Author
Message
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 30th Jul 2015 15:39
So I have created a 3D arena game and rather have edges for the players to bump up against I thought it would be better to have the arena wrapped so that as soon as players leave the bounds of the arena they find themselves on the other side.

How is it best to do this with 3D objects? If it were a single player game it wouldn't be a problem as you could just move the player object to the other side of the arena. However, I don't want players or environment "disappearing" or "reappearing".
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 30th Jul 2015 17:03 Edited at: 30th Jul 2015 17:03
You may need to make a compromise.

The world could be endless, meaning players will never appear/disappear. The world would be repeated in all directions but it would be infinite so players may end up really far apart.

The other option is to have a single non repeating world with players disappearing from one end and entering the next.

Or you could make your world a sphere which would suit your criteria but may not suit your world creation pipeline

JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 30th Jul 2015 17:08
Matty H: neither of those suggestions would meet my needs unfortunately.

I have seen it done before; Lylat Wars (Star Fox 64) did it for the multiplayer mode. It can certainly be done, I was just wondering if anyone had any tips / suggestions for how best to implement it.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 30th Jul 2015 18:48
I think you are right actually, there are more options.

You could take my first endless world scenario. So you have the world which I will call main, this does not really exist, only instances of this main world stitch together when you get near the edge of the instance you started in.

For other players, you take their local position in the main world and put them in the corresponding position in your instance. Each player may be duplicated, so if your world was small enough you may see two instances of the world at once but you would also see the same player twice. Obviously you could avoid that scenario if you make the world bigger.

I think that would work, if there is a logical inconsistency in there somewhere then let me know

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 31st Jul 2015 13:44
You could always go down the procedurally generated route.



I accomplished an infite 3d landscape in DB-Pro for a 'speeder' demo many years ago. This used a tileable height-map to generate the landscape which then had 2x2 instances which moved depending on player x/z position in the 3d world to create a seamless infinite 3d terrain. I recall having trouble with lightsources as shading would 'snap' when the light-source position moved to the new instance location... I think I ended up doubling up on light-sources to get around it in the end. Not a very efficient solution.

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 31st Jul 2015 16:51 Edited at: 31st Jul 2015 16:51
Hey, I have another idea.
As you maybe know, I like shaders...
In the past there where people who made shaders to render portals in DBpro.
And I helped Jukuma by his: http://Cube Mapping Problem

The point is, you setup the sky-box to render your portal-shader.
So you set the camera to the other side of the sky-box faces each and maybe you even don't need a shader if you find the right camera settings.
Then if they go through the sky-box just place them to the other side, like you would do in an Asteroids Game, or like you described it^^

I tried it myself but got bored fast.
Anyway, if you make progress I would like to hear it


Using AGKv2 Tier1

Login to post a reply

Server time is: 2024-11-25 19:28:32
Your offset time is: 2024-11-25 19:28:32