Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Door to new level #357540
02/07/11 16:10
02/07/11 16:10
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hi, I need someone to help me with a little problem that I've faced (with code snippet or with an advice how to make this). I have a door in the middle of the room, so all I want is, after opening this door (I use animation for that) I want to see in the doorway next level (and player must be able to see it only from one side of the door). I know that I can use an other view on entity, but how to show there a new level? And how to make player move to that level? BTW moving to the next level must be similar to portals in PORTAL, I mean they must be smooth, and player must be able to walk back as well (this is unpaid, but credit may be possible).


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] #357564
02/07/11 17:36
02/07/11 17:36
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
You can't switch between levels this way, because when loading a level, the current level will be closed and all entities within will be removed.
That's principle of levels in Acknex.
Quote:
# The current level is closed, the cache holding level entity files is purged. All current entities in the old level are removed, thus all entity pointers referring to them can't be used anymore. For preventing an entity file from being purged at level change - which could make sense for speeding up level loading - define it as a view entity.

http://www.conitec.net/beta/alevel_load.htm

Re: Door to new level [Re: Pappenheimer] #357566
02/07/11 18:04
02/07/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
Thank you. I have an idea how to make it another way:
I'll make two rooms (in one level), each of rooms has a door, how can I move from one room into another an back via doors (smoothly so I could be even able to stop right in the middle of the doorway and turn around, move etc (as in portals in Portal game))? I know that I can use views to see the next room in the doorway. But I have no idea how to handle smooth moving between levels?


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] #357569
02/07/11 18:13
02/07/11 18:13
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
maybe add a passage common to the two levels, and do the level change when you are in the passage


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Door to new level [Re: painkiller] #357571
02/07/11 18:18
02/07/11 18:18
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
You could create your levels normally, and than put all the wmb files into one big level. From there you make that level parts invisible/visible.

But I do not know how fast that will be.

Re: Door to new level [Re: Rei_Ayanami] #357576
02/07/11 18:33
02/07/11 18:33
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Each of level is going to be a room, so I'll just put them into one level (all of the rooms). So I have an idea how to handle levels. But I have no idea how to make smooth movement between levels...


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] #357638
02/07/11 23:05
02/07/11 23:05
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
The developers of Half-Life accomplished this by putting an invisible marker in both levels that acted as common reference points between the two levels. They then made an exit area in both levels that looked identical between them, and put some "change level" triggers in that area (the triggers can be in different places in each level). Then whenever the player touched the trigger, the game would load the new map and set the player's location in the new map to the same relative place as the old map, using the markers mentioned before as common reference points between the two levels. The result was a seamless transition between the two levels.

If you don't understand what I'm saying I can create some pictures that explains the whole process in simple terms.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Door to new level [Re: Redeemer] #357660
02/07/11 23:55
02/07/11 23:55
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 got the main point with triggers, but I'll be very grateful if you make some pictures.


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] #357704
02/08/11 13:06
02/08/11 13:06
Joined: Apr 2010
Posts: 172
W
wdlmaster Offline
Member
wdlmaster  Offline
Member
W

Joined: Apr 2010
Posts: 172

The red circles show the "transition area" both levels must have in common. The small red lines are the actual triggers. If you touch a trigger, you must:
1) calculate the distance to the trigger
2) load the next level
3) add the distance to the start position of the next level
If you don't add the distance to the level's start position, you always start the new level at the exact same position no matter where you touched the trigger in the previous level.

The yellow dots are the start positions of the next level. Within the transition area, the relative trigger position of the current level MUST be equal to the relative start position of the next level (their real coordinates can be different)

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

Joined: May 2009
Posts: 5,370
Caucasus
Thank you. I have few questions:
*Will this make movement smooth? 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?

* how to make this without loading new level, cause I'll make all levels(rooms) in one big level.
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.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 1 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