Automapping Layouts to a pause screen map

  • megatronx

    After playing around with it, I noticed it breaks after I put the events for making the make in another event sheet for another layout.

    Sorry, what? Also, can't see the image

  • Destroy Detector on end of layout

    You don't need to put those events in to different event sheet, just include event sheet with those events on to main event sheet.

  • > megatronx

    >

    > After playing around with it, I noticed it breaks after I put the events for making the make in another event sheet for another layout.

    >

    >

    >

    Sorry, what? Also, can't see the image

    Was a misclick, it's a link with the .capx

    Destroy Detector on end of layout

    You don't need to put those events in to different event sheet, just include event sheet with those events on to main event sheet.

    I'll give it a try, but the pause menu's supposed to be isolated. Will let you know how it goes.

  • Destroy Detector on end of layout

    You don't need to put those events in to different event sheet, just include event sheet with those events on to main event sheet.

    Alright so I've sort of integrated it into the game, but there are numerous bugs in the automapper:

    Sometimes it doesn't pick up the last or first room in the layout. It'll create the room on the map but it won't register the player being in the room, thus the map shows all the rooms but none of them blink and have the sprite pinned to show the player's location.

    Other times it will register the room and spawn it in the correct place, but then won't pin the sprite to it and make it blink, instead choosing the wrong room.

    Other than that it seems to be working fine. This is all on one event sheet, it doesn't seem to work when it's on two event sheets.

    Also I put that event in: "Destroy Detector on end of layout", it breaks the auto-mapper as well.

    My map goes like this in the array, the array itself is 20x20 but I'm not using all of it:

    0|0|0|0|0|3|3|3|3|3|3|3|0|0|0|0|0|0|0|0 . . . . . . ( ( X is just a room that's not the size of the original window so it's naturally

    0|0|0|0|0|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0 . . . . . . ( ( not picked up. Rooms labled 3 in the array I drew in the post aren't being

    1|1|1|3|1|X|0|0|0|0|0|0|0|0|0|0|0|0|0|0 . . . . . . ( ( picked up.

    0|0|0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0

    I'm going to post a very limited version of my game's .capx here in my next post, can you tell me what I'm doing wrong?

  • megatronx

    https://drive.google.com/file/d/0B0gW1A ... sp=sharing

    Here's the .capx. It works very weirdly. I tried fixing it myself but I honestly have no idea how I'd fix it.

    I understand part of it, but I just don't know enough programming/events/expressions/suchthings to know how to fix it :\

  • megatronx

    https://drive.google.com/file/d/0B0gW1A ... sp=sharing

    Here's the .capx. It works very weirdly. I tried fixing it myself but I honestly have no idea how I'd fix it.

    I understand part of it, but I just don't know enough programming/events/expressions/suchthings to know how to fix it :>

    I can't open it because I never use betas, and have r200.

    Did you added 3 and X to array loop, where originally there are conditions : current value =1, display empty room, and if current value = 2 then display room with pinned sprite?

  • > megatronx

    >

    > https://drive.google.com/file/d/0B0gW1A ... sp=sharing

    >

    >

    > Here's the .capx. It works very weirdly. I tried fixing it myself but I honestly have no idea how I'd fix it.

    > I understand part of it, but I just don't know enough programming/events/expressions/suchthings to know how to fix it :> >

    I can't open it because I never use betas, and have r200.

    Did you added 3 and X to array loop, where originally there are conditions : current value =1, display empty room, and if current value = 2 then display room with pinned sprite?

    Here's the entire event sheet in a screenshot:

    If you're talking about the 3 I put in the array in my previous post, it's not in the game. I just did that to show in the post what rooms were affected by the bugs. In the game all rooms have either a 1 or 2 value (1 if activated, 2 if activated and the player is in them).

    I copy-pasted the events from the .capx you sent me, so it should be working. The only thing I changed was the "On 'M' pressed" to trigger the map, I changed it to check if it's on the pause screen or not using a 0 or 1 global variable, but that shouldn't affect anything.

  • yes, i see now why its not working. Map was designed to be displayed on the same screen. When it is on separate screen obviously there are no detectors to fill the array neither player position. Move events, starting at line 10, between 7 and 8. Remove "trigger once". Remove event at line 19. Also I see you didn't applied anything from latest file I've uploaded, but not only that, you are not setting up PlayerCell's variables at all. Go back to file "MiniMap4" and compare with yours. Keep in mind the changes I told at the beginning of this post.

  • yes, i see now why its not working. Map was designed to be displayed on the same screen. When it is on separate screen obviously there are no detectors to fill the array neither player position. Move events, starting at line 10, between 7 and 8. Remove "trigger once". Remove event at line 19. Also I see you didn't applied anything from latest file I've uploaded, but not only that, you are not setting up PlayerCell's variables at all. Go back to file "MiniMap4" and compare with yours. Keep in mind the changes I told at the beginning of this post.

    [quote:18wzgj3v]Also I see you didn't applied anything from latest file I've uploaded

    I copied the events in the screenshot from "MiniMap4", - although - I think I accidentally photoshopped out the events that set the PlayerCell's variables out. If you look at the screencap you notice that lines 13 and 14 are missing.

    As for moving the event at line 10 between 7 and 8, I tried that before but it broke the automapper, disabling it from blinking the room the player's in, spawning the sprite that fills the room and setting the current room in the middle of the map. It makes the problem worse than leaving it as is in the screenshot.

    If you happen to update to r203 here's the .capx again, and for anyone who wants to bother with trying to fix it.

    Here's the screenshot:

    Also just an FYI, r201 is mostly fixes for issues that r200 has, r203 essentially a stable build but I think Ashley didn't make it one because there weren't a lot of changes.

  • Got yer message. I'll take a peek after installing r203. For what it's worth, I recommend making the mini-map by hand in a global layer, and tracking each cell or room with a dictionary; procedurally generated maps are better suited for roguelikes and such, and can be quite limiting if not using external room files.

    I also recommend you not use separate layouts for each room. I know I did this in my ZM Engine but that was before 'recreate initial instances', rendering cells, and certain optimizations were made. You can now create entire areas in single layouts if you're smart about it. You also wouldn't have to keep up a world reference elsewhere.

  • Got yer message. I'll take a peek after installing r203. For what it's worth, I recommend making the mini-map by hand in a global layer, and tracking each cell or room with a dictionary; procedurally generated maps are better suited for roguelikes and such, and can be quite limiting if not using external room files.

    I also recommend you not use separate layouts for each room. I know I did this in my ZM Engine but that was before 'recreate initial instances', rendering cells, and certain optimizations were made. You can now create entire areas in single layouts if you're smart about it. You also wouldn't have to keep up a world reference elsewhere.

    Thanks, for taking a look and the recommendation about putting it on a global layer, I might try that later.

    As for using procedurally generated maps, I choose it because I'd want to save time instead of having to redesign the map every-time I make a change to the game map. Not to mention I haven't created the full map yet. And I want to be able to use my .capx for other games with minimal modifying such things.

    As for the world reference, I only have a reference on the doors so the game knows where to go next, unless you meant exactly that as in all the values for the variables. Dunno, using layouts just saves me the work of having set up events to delete all the enemies when the player exits a room, setting up the camera to not go beyond the rooms. I'm still fairly green to game design so I'm just trying out what's easiest and this has been working out for me so far.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I also recommend you not use separate layouts for each room. I know I did this in my ZM Engine but that was before 'recreate initial instances', rendering cells, and certain optimizations were made. You can now create entire areas in single layouts if you're smart about it. You also wouldn't have to keep up a world reference elsewhere.

    I kept thinking about this so I decided to give it a go, it's going fairly well so far.

    As for render cells, do the colliding objects need to be on the same layer?

  • Tokinsom

    Now that I've spent a couple hours on doing it the one layout way:

    Room transitions are much better, Enemies seem to do double damage, Can't get the pause screen to work in a global layer, it either becomes visible and pauses the game, but then can't unpause, or does nothing. I think I'm going to stick with per room layouts for this game, although my next project I will look at using one layout. Currently it's a huge amount of work to convert the game to work in one layout, bugs just pop out of every event.

    Did you get a chance to look at the .capx?

  • Tokinsom

    megatronx

    I gave using one layout another go, I got the auto-mapper working! Looks like I'll be using one layout for the game area, thanks a lot for the advice Tokinsom , not only that but I get to use the cool transition I had when I started the project

    Thanks a ton for the help guys!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)