Making a 2D Katamari Damacy in Construct!

For questions about using Classic.

Post » Wed Apr 29, 2009 3:17 pm

May I first say you guys (especially lucid) are my fuggin' superheroes for being so damned helpful! You blow away the Clickteam community : D

now, ON TO THE KATAMARI! : O

okay, the problem about the circle enlarging is that it will pick up stuff the katamari isn't touching. So really the only way to do this is to "simulate" the sticking? I guess? I don't know.

everybody watch the video. my mind is broken. D:
B
2
G
3
Posts: 17
Reputation: 884

Post » Wed Apr 29, 2009 3:36 pm

The phyics ball doesnt have to be the thing that picks stuff up... it just has to be the physics device and "roller". the objects attached to the ball can be what picks stuff up.

If you watch the video you notice how the katamari spins like a perfectly round wheel... that's probably because it most likely is. The objects that attach to the ball, also attach to other objects. You really only need the first object (your base katamari sphere) to link to the ball, and everything else will link to the katamari sphere. The balls dimensions should be determined (somehow) by measuring the inner most pixel diameter of all the objects combined.

You could probably fake this by say, adding 1 pixel in height and width to the katamari for every 1cm of object that touches it?

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Wed Apr 29, 2009 5:14 pm

By the "katamari sphere" you mean the invisible one right?

[quote:1n2t5mi2]The balls dimensions should be determined (somehow) by measuring the inner most pixel diameter of all the objects combined.[/quote:1n2t5mi2]

Here lies the problem...
B
2
G
3
Posts: 17
Reputation: 884

Post » Wed Apr 29, 2009 7:37 pm

[quote="xiao":2yxki070]May I first say you guys (especially lucid) are my fuggin' superheroes for being so damned helpful! You blow away the Clickteam community : D[/quote:2yxki070]
that's just how we roll here at scirra
never been to clickteam, or used mmf or whatever their thing is

[quote="xiao":2yxki070]now, ON TO THE KATAMARI! : O[/quote:2yxki070]
I just noticed now, that the katamari video you posted and were talking about was a 2d version. I hadn't watched it
I think you should aim higher than a better looking version of the 2d one, you should make it like a 2d version of the original, which would be much cooler and interesting looking
[url:2yxki070]http://www.youtube.com/watch?v=IqpPyhE5x2M&feature=PlayList&p=A5A35FE4FAA7796E&index=0[/url:2yxki070]

I played around a little with the katamari thing
unfortunately I don't have alot of time to explain too much
and it's getting really ugly(the code)
but I will list the basic changes I made and you can investigate and analyze and ask questions

the level is larger now

I made the little guys you pick up not physics objects, they weren't in the original katamari. Also, I made the sticking system based on a canvas. it's cleaner this way, and when you have hundreds of objects it won't be tracking them all at all times, also, when your katamari reaches a whole new zoom level, like the original you will be able to draw the same katamari and trash, and forget about all the objects that are sticking to it. you'll notice there's a strange blurring effect that happens to the canvas over many uses, so the older stuff stuck to you gets blurry. I'm not sure why it's doing this, but there are ways around it, even if we don't figure out why it's doing that.

also, I made it so the controls change torque, not angular velocity, this means that the ball won't just keep spinning faster even when it should be slowed down by physocs, you're not telling it how fast to roll, you're telling it how hard to roll
also, I put limits on the speed, so if it's spinning too fast it won't add any more angular force

then I set it up so the physics ball get's 0.5 pixels larger length and width for every piece stuck on. I still think eventually you should add the ellipse thing, but this at least illustrates the basic concepts. all that weird temp variable setting and destroying the physics and remaking it, is to keep it from colliding with the ground when it gets 0.5 pixels bigger. you can press spacebar now to view the physics ball

finally, there was a problem with the growing physics ball and collisions, o things would start connecting to further and further invisible points away from the ball or other people stuck to it, so they looked like they were floating in an orbit of the ball. the solution is to make the canvas update it's collision mask with each new guy stuck to it. then you make it so new guys stick only if they intersect the physics ball AND the canvas. this means there's an invisible circle they are allowed to stick to, but only if they are also touching the canvas, which consists of the ball, and the guys stuck to it. they won't be able to stick to eachother in a long chain away from the ball. and they won't stick to random points in space where the invisible physics ball is.

enjoy: [url:2yxki070]http://dl.getdropbox.com/u/1013446/katama.cap[/url:2yxki070]
gotta go for now,
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Apr 29, 2009 8:15 pm

uh you could calculate the mean center (ponderating by volume) of everything and then displace the physics ball's center halfways from the true ball's center and make the ellipse deform accordingly.

Also, let the objects pick up other objects but ONLY if they're within a set distance of the physics ball (to avoid center to shift excessively to one side). That's what the 3D Katamari did. Also, allow long shaped objects to affect movement, like lamp posts, because they'll probably stick out. Have them in a family or something.

I want to play this btw :D
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Apr 29, 2009 9:12 pm

updated with zoom out feature, and large area to drop down and get alot of stickies to test out zooming out
[url:21sm2fbj]http://dl.getdropbox.com/u/1013446/katama.cap[/url:21sm2fbj]



EDIT: there's a glitch where if you get alot of stickies at the same time your ball starts acting weird, if you press space, you can see it's because more than one ball spawned and the invisible balls are hitting eachother. fun stuff
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Apr 29, 2009 9:38 pm

We should have a katamari challenge

Btw lol at getting stuck between two platforms >_<
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Apr 30, 2009 12:02 am

[quote="lucid":15sqn8h3]updated with zoom out feature, and large area to drop down and get alot of stickies to test out zooming out
[url:15sqn8h3]http://dl.getdropbox.com/u/1013446/katama.cap[/url:15sqn8h3]



EDIT: there's a glitch where if you get alot of stickies at the same time your ball starts acting weird, if you press space, you can see it's because more than one ball spawned and the invisible balls are hitting eachother. fun stuff[/quote:15sqn8h3]

This is amazing, I love what you're doing. The zoom seems to work very well and the katamari itself is also working well.

I noticed that glitch on your last upload. Somewhere, the deletion and re-insertion of invisible balls messes it up. Perhaps you can add a code that deletes any balls that aren't the "main" ball, by allowing no more than one in the playfield.

Also, the ball rolls too fast and too spinnish, it needs to be slower, more like the katamari and less like a car tire... and one thing that concerns me still is how, with all these events, this is going to work with tons of different pickupable objects.
B
2
G
3
Posts: 17
Reputation: 884

Post » Thu Apr 30, 2009 1:21 am

it will be much cleaner when it's not like a prototype hack on thing where we're trying out different features, and leaving other ones halfway on. I don't think the tons of pickupable objects will be a problem, you could do the same thing with families and it shouldn't need any extra events as far as the picking up itself is concerned. as far as the spawning multiple physics ball glitch, it should be easy to fix once we've decided on a final method of doing the sticking.

As far as moving slower, yes, you're probably right, but for it to work, the katamari needs to be able to climb walls and do the superspin for it to work slower without limiting it too much. also, eventually it should have the thing where it bumps into something too big and pieces fall off

also, figured out while it gets blurrier and blurrier,
it's because of constructs linear sampling, when it copies the ball and trash at an angle, it's copying extra little semi transparent pixels here and there, that construct puts in to make games look smooth normally, but when added together over and over, gives it that blurry look. it's either antialiasing, or it's like antialiasing. there are two ways to fix it I can think of off hand. one is by using that original stick method from the first example, but only when you pick up a new object, so it's not keeping track of all those objects every frame, when you run over something, it can put them all back in place take a picture, and delete them all again. if that's not fast enough, you can use the stick method to rotate the new object around to where it it's rightside up with the canvas. The second one is far better I would think. I didn't mention this before, but the reason i did the copy back and forth between two canvases is because if you paste to a canvas that's at an angle, it pastes it on the canvas as if it were right side up, so it's stuck to the wrong part of the ball.

anyway
gotta go to bed for now
this is some fun stuff though
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu Apr 30, 2009 1:59 am

You guys want to form a little team to try and make this game? I think it's be great fun and an interesting experiment that could test the power of Construct.

We don't have to but I can't do this stuff on my own and you guys are awesome. haha.

Lucid - What I'm concerned about is... with private variables or whatever they're called, we should be able to have a large family of pickupables that all add different amounts of size to the katamari, right?

Well in the final product I'd like the katamari to take up more of the screen than it does now so it'd be pretty important that it moves slower, but yeah I want to at least add the dash move. Not sure if we'll need to climb walls, the game will probably be pretty straight forwards (literally. i mean horizontal) But the dash would be great, with some nice motion blur in there too.

smashing into things and losing pieces, absolutely. I may just make "junk" sprites that fly off your Katamari so we don't have to deal with actual pieces falling off the katamari. Unless there's an easy way to do this. It'd be nice if there was, so you could pick them back up again.

Ahhh, the blur makes a lot of sense now. And yeah your second method sounds much easier.
B
2
G
3
Posts: 17
Reputation: 884

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests