house decorating game- zoom question

Just started using Construct 2? Post your questions here

Post » Mon Jan 11, 2016 7:55 pm

This will probably not be my first question here, because I have this idea about a game where you have a house and can decorate each room with lots of furniture and stuff. Like in the sims but not at all 3D. And I'm a complete newbie so sorry in advance!

Anyhow, I want it to be like a doll house, so you see it from the front always. And it should be zoomed out at first, and when you click on a room, it zooms in on the room and then you can decorate and all that. And then a zoom out button so you see the whole house again anytime you want.
I just can't figure out how I should do the zoomey thing.
Do I have to have a big image of the whole house and only have the room in the "game area" when it's zoomed in, and then shrink everything when the player zooms out? If so, how do I make every little object that's in the house stay in place when everything is made smaller?
My brain hurts, so if anyone can point me in the right direction, I would be super grateful!
B
10
S
3
Posts: 62
Reputation: 774

Post » Wed Jan 13, 2016 5:40 am

Sounds a bit like the base in Xcom or fallout shelter.

I would start with a big image as you thought and zoom in/out out using the 'layout scale' command from the system options. Anything you have placed will still have it's X and Y positions so it will stay where you place it.

The other element you need for this is an object for a 'camera' (just an invisible sprite with the scroll to behaviour attached to it). This way when you are zoomed in you can focus it to the particular room you want to see.

If you are a beginner, I highly suggest you start with Kyatrics list of FAQ. Study the examples and you'll pick it up in no time.
ImageImage
B
114
S
23
G
7
Posts: 1,068
Reputation: 12,845

Post » Wed Jan 13, 2016 10:06 am

Thank you so much! Really appreciate it. And that FAQ will be super helpful, thanks for that too!
B
10
S
3
Posts: 62
Reputation: 774

Post » Wed Jan 13, 2016 8:10 pm

I got the zoom to work, which is great! The only thing is that the background image/layout size is huuuge now; 8208x5184 and that won't work.. My RAM can't handle it and I'm sure it would be to slow for ipads and phones right?

Any thoughts on how that could be solved?
Again, thank you so much for helping me!
B
10
S
3
Posts: 62
Reputation: 774

Post » Thu Jan 14, 2016 1:46 am

Hey again Annauva. My pleasure mate.

A big layout size is ok but yeah, if your working with dimensions like that then you definitely don't want to do it as one giant image. All the assets you need for any particular layout are loaded into RAM so the name of the game is reusing graphics in intelligent ways to make the most out of what you have.

This article by Ashley will be helpful : https://www.scirra.com/blog/112/remembe ... our-memory
ImageImage
B
114
S
23
G
7
Posts: 1,068
Reputation: 12,845

Post » Thu Jan 14, 2016 9:44 am

I've read that one (or someone similar), but I didn't understand how I could make a tiled background of a house hehe. But I think now that it could work, I will have to build it piece by piece somehow.
As TIm Gunn would say; it's a make it work moment!
B
10
S
3
Posts: 62
Reputation: 774

Post » Sat Jan 23, 2016 8:12 am

Interested in playing this if you put out a demo!
B
6
S
1
Posts: 17
Reputation: 391

Post » Sat Jan 23, 2016 9:22 pm

Yeah sure, it's gonna take a long while though :)
I'm struggling with every step! And I have no idea how to put out a demo, but I'll figure that out when I get there hehe.
B
10
S
3
Posts: 62
Reputation: 774

Post » Mon Feb 01, 2016 5:30 am

If you want a top-down view, you might want to look into 9-patch instead of tiled background. It lets you have an outer border with a tiled center.
Eh, Steve!
B
113
S
54
G
13
Posts: 112
Reputation: 16,090

Post » Mon Feb 01, 2016 4:32 pm

Cool! But I'm making it from the side, like doll house. I've built it up with lots of tiled backgrounds so it works fine now! :)
B
10
S
3
Posts: 62
Reputation: 774


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests