![]() I'm hoping there's either a way to do it with a single view that I haven't been able to discover or that someone has made a script somewhere that has done all the calculations. (I can imagine a way to code this with multiple views, but I don't know how to do the math. In other words, not only would the ship have to teleport, but the view would also need to be split over multiple portions of the same room, just like the ship. If you shot bullets and they also wrapped, you would never see the wrap. It would always looked as if you were in the center of the screen and the room was just endless. Locked the view to the player's ship in the center of the screen, and then you moved around, you could never tell that you were crossing outside of the room and going to the other side. Set the background of the room to straight black. In other words, if you made a room that was 1000 x 1000. What I trying for is where the view also follows and wraps the room. I guess I wasn't clear enough on goals two and three. Likewise leaving the right side (x-position is more than room_width) or the bottom side (y-position is more than room_height) you just need to subtract the room width or height, respectively.Ĭombining them doesn't really require anything extra or special. ![]() As such, when you go outside the room to the left (x-position is less than 0) or to the top (y-position is less than 0) you just need to add the room with or height, respectively, to the position to teleport to the right or bottom side of the room. You also know that the top-left corner of the room sits at position 0,0. You have the variables room_width and room_height built-in to GameMaker that tells you the size of the room. View Port: The size and location in the actual game window that the view will be displayed overĪs for your second question, if you are just trying to pull off the asteroids effect then it is merely a case of teleporting your player across the room when it leaves the border. View Size: The amount of game-space the view can display / cover If you aren't sure what the difference between the view size and port is, here is a quick definition: For the second method you will need to research that as well as how to change the view port and the view size so you can modify the primary view properly. The first method you should look in the manual for a means to disable / enable views. Alternatively you could only have two views one for the smaller 1/3rd of the screen that gets toggled on and off and the second for both the full-screen and right 2/3rds of the screen that gets its size modified via code. You would then disable / enable the desired views to switch back and forth. You could have 3 views, one for the first scenario and two for the second scenario. There are a couple ways you could achieve what you are looking for. When setting up a room you have options to define views located in the views tab. Assuming this isn't easy, even pointing in the direction of what to learn would be helpful. I know idea how to even start making these work together or if that is even possible and what the best way would be. Think Asteroids but the view doesn't take up the full room and you can fly in any direction for as long as you want wrapping from one side of the room to the other without ever noticing. I can do screen wrapping, but what I'm looking for is more of a globe effect in a 2d sense. This one may or may not be simple? I'm not sure. Goal 2: Make a 2d globe effect for the purpose of moving around. Then have the pod come back to the ship and switch back to one view. ![]() I want to be able to launch a pod onto a planet and when that happens to split the views where one view stays on the ship and one view is the planet. Specifically, I want the second view to take up the full height and the left third of the screen while the original view moves over and shrinks to take up the two right thirds of the screen. I want to push a button and have the screen split into two views. I'm sure this one is pretty simple, but I can't figure out how to do it. Goal 1: Switch from single screen, to split screen, and back. Here are the things I'm trying to accomplish. I've watched several tutorials and read the help file, but none of them seem to explain my exact issues. I've spent a lot of time on this and can't find an answer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |