Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: 1 [2]   Go Down

Author Topic: Rooms within Rooms  (Read 4666 times)

0 Members and 1 Guest are viewing this topic.

Mamoruanime

@Mamoruanime
Re: Rooms within Rooms
« Reply #20 on: December 06, 2009, 10:38:51 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Just to be clear, you are aware that it's pseudocode, right? And that it will not work by itself, since it's simply there to demonstrate *how* to do what you want to do, not actually doing it for you. Both of the pseudocode that Niek and myself have shown you is built to move the view in the same manor you're explaining, but it's up to you to actually interpret the pseudocode into code that works in your software, as well as expand it to do your needs.

We understand what you're trying to do, and we've each explained how to do it :P You just need to apply those explainations into code that you make yourself...
Logged
Re: Rooms within Rooms
« Reply #21 on: December 06, 2009, 11:40:00 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
As I pointed out earlier that if the view is beyond a certain point than it wont go beyond that point which ruins the purpose of this concept but thanks for the effort but the code did not work
Well, your problem is that your have a room and you want to divide them in smaller rooms, without making the different rooms in gamemaker.

To put it in a concrete example:
The big room is a floor fo a dungeon. The smaller divisions are the small rooms of the mentioned floor. When you walk in one room, you don't want the player to view what is in the room next to it.

Well you have 4 variables (BOUNDRARIES) that represent the small room. As Link has the focus, you update the viewport in the Link object, with the given pseudocode. When Link goes through a door to another room, you get a transition that shifts the viewport to the new room and update the 4 variables to the boundaries of the new room.

And if it is still not what you want, then you need to explain yourself better, but don't expect anyone to just give you the code ready to be copied into your game.
Logged

Mamoruanime

@Mamoruanime
Re: Rooms within Rooms
« Reply #22 on: December 06, 2009, 11:47:28 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
I'm fairly certain he's looking to fix his view on a specific path that can change dynamically according to pseudoboundaries. Games like Castlevania do this a lot to have areas of a room not visible until the player finds a hidden passage, or something along those lines. It basically locks the view from going into that "hidden area" until certain conditions are met. The view follows a track that avoids revealing that area unless the player is pysically in there.
Logged
Re: Rooms within Rooms
« Reply #23 on: December 06, 2009, 07:35:07 pm »
  • Make your best move ass-bite!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 139
Yes but since there are multiple
borders in the room the view is larger or less than many of them so it just stay fixed in one place because it is confused
Logged
Re: Rooms within Rooms
« Reply #24 on: December 06, 2009, 10:25:37 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Yes but since there are multiple
borders in the room the view is larger or less than many of them so it just stay fixed in one place because it is confused

If I understand it correctly, the viewport is bigger than the roomboundary. That is just bad level design. One solution to that. Do it over and make sure that the room boundaries are equal or larger than the viewport.

And when going to the next room you should just shift the view to the next position in a transition and just ignore the boundaries.
Logged
Re: Rooms within Rooms
« Reply #25 on: December 06, 2009, 11:11:57 pm »
  • Make your best move ass-bite!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 139
thats not the case, All the Boundries are active and the x and y values scattered on the map and makeing hard for the view to choose the correct set of four boundries
Logged

Antidote

>.>
Re: Rooms within Rooms
« Reply #26 on: December 06, 2009, 11:32:41 pm »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
decide on a standard size based on the power of 2, this will eliminate these issues and allow the view to correctly "choose" the coordinates using a simple equation checking the current player/viewport position.
Logged
  • Axiomatic Data Laboratories
Re: Rooms within Rooms
« Reply #27 on: December 07, 2009, 12:02:03 am »
  • Make your best move ass-bite!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 139
um...yea I will just make varibles for the boundries like vx1 and vx2 and vy1 and vy2 that way it kinda creates a rectangle for the view to move around in
Logged

Antidote

>.>
Re: Rooms within Rooms
« Reply #28 on: December 07, 2009, 02:00:20 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
but then you still run into a possible situation where the viewport rect is bigger than the room rect creating a jerky view.
Logged
  • Axiomatic Data Laboratories

Mamoruanime

@Mamoruanime
Re: Rooms within Rooms
« Reply #29 on: December 07, 2009, 02:27:42 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Yes but since there are multiple
borders in the room the view is larger or less than many of them so it just stay fixed in one place because it is confused

That's why you need to have some form of controller object for your view to compensate for that. It's not a one-line script, it's going to be a system you need to code in yourself.
Logged
Re: Rooms within Rooms
« Reply #30 on: December 07, 2009, 02:08:56 pm »
  • Make your best move ass-bite!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 139
I finally Got it
Logged

DJvenom

super-sage
Re: Rooms within Rooms
« Reply #31 on: December 07, 2009, 04:40:51 pm »
  • Colbydude was here.
  • *
  • Reputation: +7/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2898
for figuring it out, you win:
[spoiler=a prize!]

[/spoiler]
Logged
I do art
I ermmm... DID do art
I do art

Antidote

>.>
Re: Rooms within Rooms
« Reply #32 on: December 07, 2009, 08:30:39 pm »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
lol nice DJ
Logged
  • Axiomatic Data Laboratories
Pages: 1 [2]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.31 seconds with 63 queries.

anything