Automapping Layouts to a pause screen map

Discussion and feedback on Construct 2

Post » Fri Apr 24, 2015 1:14 am

Nesteris wrote:@megatronx

I'm noticing that when I enter another layout, the mini-map gets kind of reset or something and the Minimaproom gets created on top of existing ones.


Nesteris wrote:What do you mean? Like I set the variables for each of the 12, 10, | 12,11 | 13, 10 | 13, 11| co-ordinates? I saw in the .capx it's just left as zeroes.


No, you need to map out whole world in spreadsheet first. Room instance is there to tell events about the position of the room in relation to the whole "world". But only top-left coordination is important. The rest is generated trough events.
Coordinates 12, 10 | 12,11 | 13, 10 | 13, 11| are coordinates of 1 room of the size of 4 screens. Go in to something like excel or open office math and map those numbers according to their coordinates. You'll see that you will have 4 "1" creating a square.

As for issue with minimaproom object multiplying itself, maybe that's because it is global, so switch it to not be global. Experiment.

If you still have issues, just send me capx

Thx for credits!
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Fri Apr 24, 2015 1:21 am

@megatronx

Image

The test map I have right now shows up as the one on the right when I set up the minimap, exactly like yours.

The mock up on the left is how it's supposed to look. I think they are getting reset somehow.

I'll look into it more tomorrow.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Fri Apr 24, 2015 1:26 am

megatronx wrote:
Nesteris wrote:@megatronx
1.Coordinates 12, 10 | 12,11 | 13, 10 | 13, 11| are coordinates of 1 room of the size of 4 screens. Go in to something like excel or open office math and map those numbers according to their coordinates. You'll see that you will have 4 "1" creating a square.

2.As for issue with minimaproom object multiplying itself, maybe that's because it is global, so switch it to not be global. Experiment.

3.If you still have issues, just send me capx

4.Thx for credits!


1. Not sure I understand, so each layout only needs one room object in the top left corner?

2. It's more kind of pasting itself over already existing ones, it's kind of weird.

3. I actually might, but tomorrow.

4. No problem! I give credit where credit is due.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Fri Apr 24, 2015 1:34 am

Nesteris wrote:
megatronx wrote:
Nesteris wrote:@megatronx
1.Coordinates 12, 10 | 12,11 | 13, 10 | 13, 11| are coordinates of 1 room of the size of 4 screens. Go in to something like excel or open office math and map those numbers according to their coordinates. You'll see that you will have 4 "1" creating a square.

2.As for issue with minimaproom object multiplying itself, maybe that's because it is global, so switch it to not be global. Experiment.

3.If you still have issues, just send me capx

4.Thx for credits!


1. Not sure I understand, so each layout only needs one room object in the top left corner?

2. It's more kind of pasting itself over already existing ones, it's kind of weird.

3. I actually might, but tomorrow.

4. No problem! I give credit where credit is due.



1. Each layout needs one room object, but doesn't matter where it is! What you need to do is map out your "world" in spreadsheet, so you can apply coordinates of the room to room object, and if your room is bigger then one screen, you give it coordinates of top-left part of the room.

2. Destroy on making invisible.

KK
M
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Fri Apr 24, 2015 10:46 am

megatronx wrote:1. Each layout needs one room object, but doesn't matter where it is! What you need to do is map out your "world" in spreadsheet, so you can apply coordinates of the room to room object, and if your room is bigger then one screen, you give it coordinates of top-left part of the room.

2. Destroy on making invisible.

KK
M


I figured out how to use it! How do array's work though, can I go into negative values?

I had an error where a minimap box would always be made in at the origin of the MapBG:

Image

Image

But I think I solved it, problem might've been that I was setting the detect in the layout editor too close to the map, when I put it far away from the interactive part of the map, it stopped showing up.

I've figured out it (I think) :D

Image

Aside from one minimapbox missing, which I think is my fault since that part of the room wasn't the size of the game window, it's exactly how it's supposed to look like, according to the co-ordinates! :D


Is there anyway for the map to pan around instead of being static, without going outside of the MapBG? And to show which room the player is in? This is really complicated for me..
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Fri Apr 24, 2015 12:03 pm

Nesteris wrote:
megatronx wrote:1. Each layout needs one room object, but doesn't matter where it is! What you need to do is map out your "world" in spreadsheet, so you can apply coordinates of the room to room object, and if your room is bigger then one screen, you give it coordinates of top-left part of the room.

2. Destroy on making invisible.

KK
M


I figured out how to use it! How do array's work though, can I go into negative values?

I had an error where a minimap box would always be made in at the origin of the MapBG:

Image

Image

But I think I solved it, problem might've been that I was setting the detect in the layout editor too close to the map, when I put it far away from the interactive part of the map, it stopped showing up.

I've figured out it (I think) :D

Image

Aside from one minimapbox missing, which I think is my fault since that part of the room wasn't the size of the game window, it's exactly how it's supposed to look like, according to the co-ordinates! :D


Is there anyway for the map to pan around instead of being static, without going outside of the MapBG? And to show which room the player is in? This is really complicated for me..



There you go. Several changes, so go trough all new stuff.

https://drive.google.com/file/d/0B0jUjWN7LcQhSDduQVh2Z2J0Rzg/view?usp=sharing
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Fri Apr 24, 2015 6:07 pm

megatronx wrote:There you go. Several changes, so go trough all new stuff.

https://drive.google.com/file/d/0B0jUjWN7LcQhSDduQVh2Z2J0Rzg/view?usp=sharing


Oh my, that's incredible. :!:

I was going to ask if there's any way to make the rooms spawn in the middle of the MapBG instead of the top left corner, but then I took a couple swings at it myself and it was just changing the origin of the mapBG.

This is amazing, I'll send you a link to my game's HTML5 demo after I'm done implementing this beast into the game.

Oh by the way, how would I reset the map back to zero if say the player dies and starts a new game from the menu?
Would I just clear the array?
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Fri Apr 24, 2015 6:37 pm

Nesteris wrote:
megatronx wrote:There you go. Several changes, so go trough all new stuff.

https://drive.google.com/file/d/0B0jUjWN7LcQhSDduQVh2Z2J0Rzg/view?usp=sharing


Oh my, that's incredible. :!:

I was going to ask if there's any way to make the rooms spawn in the middle of the MapBG instead of the top left corner, but then I took a couple swings at it myself and it was just changing the origin of the mapBG.

This is amazing, I'll send you a link to my game's HTML5 demo after I'm done implementing this beast into the game.

Oh by the way, how would I reset the map back to zero if say the player dies and starts a new game from the menu?
Would I just clear the array?


Cool.

Yeah, clear the array and reset detectors or layouts, so the old detectors will be replaced with new ones. Can't remember from top of my head, but there might be a system action to do that. Reset layouts, or persistent object it might have been.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Fri Apr 24, 2015 9:20 pm

Here's a new version

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

Few changes ( and couple of leftovers from failed experiment too). Now the room cell that player is in, is appearing in the center of the map.

Origin of MapBG must be at 0,0, while origin of the minimaproom has to be in the middle, cause I don't know what I did, but technically it shouldn't work the way I did it... but it does! At least in my example.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Sat Apr 25, 2015 1:54 pm

@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.

https://drive.google.com/file/d/0B0gW1AkX_7Nybms5cjhLaXU1RkU/view?usp=sharing
Last edited by Nesteris on Sat Apr 25, 2015 5:40 pm, edited 1 time in total.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests