Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Door to new level [Re: 3run] #357714
02/08/11 13:54
02/08/11 13:54
Joined: Apr 2010
Posts: 172
W
wdlmaster Offline
Member
wdlmaster  Offline
Member
W

Joined: Apr 2010
Posts: 172
Quote:
Will this make movement smooth?

no, because a completely new level is loaded.
Quote:
Cause if I got you right, the method you showed me, will just place player at the new level, with distance from door from old level's door. Am I right?

yes
Quote:
how to make this without loading new level, cause I'll make all levels(rooms) in one big level.

simply set the player's position to the next start position (and add the distance to it). In that case, the transition is smooth.
Quote:
I need to be able to move smoothly between door, as I said before. I need to be able even to stop right between doorways.
You can always walk everywhere between the triggers. You just have to make sure, that the look of the transition area and the RELATIVE placement of the triggers/start positions are 100% identical. If not, you'll notice the position jump...

Re: Door to new level [Re: wdlmaster] #357719
02/08/11 14:19
02/08/11 14:19
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
If I put first door in the middle of the first room and will place second door on the celling of the second room and will turn door downwards, movement will not be smooth?
All I need is something similar to portals in Portal game. So even models needs to move smoothly between doors like this:

Red thing is a model.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Door to new level [Re: 3run] #357722
02/08/11 14:52
02/08/11 14:52
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
you need 2 entities and reference points in both rooms, one entity can't be in 2 places at same time, space time continuum etc. heavy sutff.


3333333333
Re: Door to new level [Re: 3run] #357724
02/08/11 14:54
02/08/11 14:54
Joined: Apr 2010
Posts: 172
W
wdlmaster Offline
Member
wdlmaster  Offline
Member
W

Joined: Apr 2010
Posts: 172
You want to make a portal clone. Well, then the concept from Redeemer and my clarification is totally irrelevant! Because for "portals" you need a completely different approach. If you move objects through portals, you must always sync 2 copies of all the models near the portals. You can't just "jump" to the next exit (you could, but then you have some restrictions). As soon as you move objects near a portal, you must generate a 1:1 copy of the models, because you NEED them to show both portal exits. And you have to deal with way more problems. You must adapt the player function to be compatible with portals: Everything you do in front of one of the exits must be mirrored/replicated on the other side --> so even the player must have another copy of him/herself and you have to transform all movement/rotation between the portals [the list goes on] ...

Re: Door to new level [Re: wdlmaster] #357733
02/08/11 15:38
02/08/11 15:38
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Ohh man...sounds too hard for me, but any way, what if I want to make only player movement through doors (there will be no way for player too see himself in level, so no need to make copy)? I hope that wouldn't be that hard.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Door to new level [Re: 3run] #357774
02/08/11 17:52
02/08/11 17:52
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Why not just do it the way I suggested? If it was good enough for half-life, it's probably good enough for you.

I drew some pictures for you that explains the entire process in detail. I just haven't had time to put them up.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Door to new level [Re: Redeemer] #357778
02/08/11 18:04
02/08/11 18:04
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I'm waiting for you pictures dude laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Door to new level [Re: 3run] #357923
02/09/11 01:17
02/09/11 01:17
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Ok. Imagine a level like this:


We are looking at this level from a top view. The white lines are the walls in the level. The green dot is the start point. The red lines form the X and Y axis and meet at the origin, a bright red dot. What I want to do is put another level at the end of the hallway to the east.

So, I start making a new level. It includes part of the hallway from the previous level. It isn't in the same spot (relative to the origin point) but it doesn't have to be. In fact, it can be anywhere you want; more on that later.


So, how do we join these two levels together? First, we add a marker between the two levels that is in the same position relative to the hallway. Here's the two levels again, with the markers (represented as purple dots):



Now we add a trigger in the hallway on each of the levels that will move the player between them (represented as blue lines):



Now when the player touches these triggers, first we need to change the level:

Code:
// load the level
level_load(newlevel);


Then, we set the player's position like this:

Code:
// load the level
level_load(newlevel);

// set player's position
player.x = marker_from_new_level.x - ( marker_from_old_level.x - player.x );
player.y = marker_from_new_level.y - ( marker_from_old_level.y - player.y );
player.z = marker_from_new_level.z - ( marker_from_old_level.z - player.z );



That's just untested pseudo-code by the way. I'm not sure it will work as it is.

Some miscellenaneous things to keep in mind when implementing this:

-The markers have to be in the same position relative to the space you want the player to move to, or else when you change levels the player could be anywhere! Look at my examples levels. The purple dots are in the exact same space relative to the wall below them. That's how your levels should look with the markers in place.

-When you switch levels, the old marker entity will be dumped by the engine. You will probably have to retain it's position in a global VECTOR before using level_load:
Code:
// save the marker from the old level
vec_set( saved_vector, marker_from_old_level );

// load the level
level_load(newlevel);

// set player's position
player.x = marker_from_new_level.x - ( saved_vector.x - player.x );
player.y = marker_from_new_level.y - ( saved_vector.y - player.y );
player.z = marker_from_new_level.z - ( saved_vector.z - player.z );



-To create multiple exits in one level, you will have to link each trigger to its own marker. I would suggest that you use handles for this.

-To move other enemies and objects between the levels and create a truly seamless level load like Half-Life, you will have to do more coding that checks the area surrounding the trigger and re-spawns all the old enemies from the last level in their proper places. This will be tricky and possibly memory consuming, since you will have to keep track of all of the objects within all of the levels accessible from the player's current location. For long games you will have to create several points in the game where the player cannot backtrack anymore so that you can offload all of the entity information you have accumulated from the last several levels. Ugh...

Ok... That's about it I think. That was a bit of a brain dump, but it's getting late where I live and I'm tired and I seem to have lost the ability to form long strings of coherent sentences, especially ones that convey complex ideas such as these. Blug.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Door to new level [Re: Redeemer] #357949
02/09/11 08:50
02/09/11 08:50
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
This idea of level changing is clear for me now, thank you for your help bro laugh I appreciate it.
But how to make this in one level? Cause loading new level will stop game for some moment and I don't need that.
As I said before, movement must be smooth, so must looks like door really leads too new place (level or room).
Something like portal, but without coping models, only movement between them. Thank you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Door to new level [Re: 3run] #357955
02/09/11 11:20
02/09/11 11:20
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
you just can't. At some point the new map must be loaded and since you can't stream a level there will never be a smooth transition.


Follow me on twitter
Page 2 of 3 1 2 3

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1