The Daily Click ::. Forums ::. Klik Coding Help ::. No Detector Gravity - Experts Please
 

Post Reply  Post Oekaki 
 

Posted By Message

Keatonian



Registered
  15/07/2002
Points
  571
6th June, 2004 at 17:18:17 -

Now, I'll try to explain this as best as I can.
I need to, in TGF, create an object, which will
have many copies of throughout the stage, that has
a working and realistic gravity, that can be
manipulated. Worst part, Since there will be so many,
I can't use detectors. They are not all square and may
rotate.

Think of a rectangular box, that can be lifted by the
player, or flung by an explosion. Then it will settle
based on gravity.
And I need to be able to change at will X and Y speeds,
based on their original speeds.

Man this is hard.

A little help please?

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
6th June, 2004 at 18:21:42 -

Can you do collision masks in tgf?

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
7th June, 2004 at 11:21:33 -

I'll try and make an example, it's pretty easy to get a basic debris-type effect.

 
- Tigerworks

Batchman



Registered
  08/08/2003
Points
  231
7th June, 2004 at 13:52:54 -

are you using active object for the obstacles ?

then it can be done

 
n/a

Tina Petersen



Registered
  19/09/2003
Points
  350
7th June, 2004 at 16:26:11 -

i duno know if u could use the objects alterable values

say every 10 miliseconds
add 1 to alt val A
object position (object y)+alt val A
if object overlaying bg y=y-1

maybe stupid just a thought

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
8th June, 2004 at 00:42:50 -

I know I've done it before using backdrop collisions, although it was a little buggy. Can't remember how I did it though. Am I helpful or what?

 
n/a

Keatonian



Registered
  15/07/2002
Points
  571
8th June, 2004 at 04:33:06 -

Julia: I'm not sure if you get my problem.
That is what I was doing. It was trying to
develop a collion method, on 2 axis', that
was a problem.

Tigs: Hmm, sounds like what Julia was talking
about. I've seen your explosion + boomerang
examples.

I need them to not just slow down vertically,
but land on their flat sides.

JonWoG: I simply don't have MMF.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
8th June, 2004 at 06:32:35 -

It's basically impossible to do it without detectors, but you could probably fake it.
I have exams but I will try to make an example some time.

 
- Tigerworks

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
8th June, 2004 at 11:33:58 -

Hey, I created a gravity-engine a month ago. It's sort of a bouncing ball that gets pulled down with gravity, it works on multiple objects and uses no detectors. You can manipulate its movement easily by changin its alt Values .
The bad points are, that it looks a little fake (it bounces before it hits the ground), if the box has animation, it can get stuck, and the worst: it uses 2 Alt Values. You only have one left.



 
This space is for rent

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
8th June, 2004 at 11:41:54 -

woops, forgot to give the engine
heres the address: members.lycos.nl/zhouman/bouncingballengine.zip
use arrows to control the balls, click on the button to give a boost in the alt value A (thus making it bounce)

Hope you find it usefull, otherwise i probably totally misunderstood your story

Image Edited by the Author.

Image Edited by the Author.

Image Edited by the Author.

 
This space is for rent

Keatonian



Registered
  15/07/2002
Points
  571
8th June, 2004 at 18:31:19 -

Hernan: That is what Julia was talking about,
aka that is the minimum required knowledge to understand
this thread.

Tigs: I admit, if you can find a way to fast loop them to
the object, detectors are fine. Of course, spreading and
loop steps are the basics of that, but how do I check after
placement?

JonWoG: About.
I wish someone would make an extention. That would cut 90%
of this work, but I would not know how to do it and it
would need a lot of controlability.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
9th June, 2004 at 13:58:26 -

Of course it's doable without detectors, you just move the objects one pixel at a time and check for collisions as normal. (Or use Move Safely object to make it easier, but that's MMF only)

 
n/a

Keatonian



Registered
  15/07/2002
Points
  571
9th June, 2004 at 14:03:46 -

Keep in mind that it's the rotating to land on the flatter side that
I can't figure out. I got the movement basically down.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
10th June, 2004 at 02:12:14 -

Object collids with ground - Directioncalculator(rotate towards right)

Wouldn't that work?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
10th June, 2004 at 07:32:55 -

hmmm..I just read the whole post again, and I think I (finally) understand your problem. It's the box landing on the ground that's bothering you. Next time, be more specific about what the problem is.

Anyway, why don't you try it doing the simple (and unrealistic) way like Assault Andy suggests?

If you really want it to do the hard way, I'm sure it's possible to do it without detectors. But you'll need exact precision of the pixels and you'll need goniometry

 
This space is for rent

Keatonian



Registered
  15/07/2002
Points
  571
10th June, 2004 at 09:53:13 -

Err.. AA's method would make this:
Box falls:
Box hits ground:
Box spins for eternity.

Not what I had in mind...

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
11th June, 2004 at 08:33:04 -

It wouldn't spin for eterety. It would only spin until it's direction = right. I'm making 'realistic' suggestions. Because I don't think it would be a good idea to use a whole bunch of objects to make one special effect work. Especially since the limit as we all know is 256.

I'm not sure if TGF has the "Collision Mask" condition, But this is how you could do it. (first include your spinning in the air rotation)

Always - run loop "pizza" (# of boxes times)
On loop pizza
+ Collision mask is obstacle (y pos of box + 5) - Directioncalculator(rotate towards right)

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
11th June, 2004 at 12:17:31 -

AA: No collision mask in TGF.

 
Kramy

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
11th June, 2004 at 14:16:08 -

Is this what you're talking about?:
www.gullen.pwp.blueyonder.co.uk/files/gravwotsits.cca
It's pretty hacked together, I just did it really quickly. It'd need detectors to work properly.

 
- Tigerworks

Keatonian



Registered
  15/07/2002
Points
  571
11th June, 2004 at 18:07:55 -

Good tigs, but it is missing the following:
Landing on backdrops
Bouncing off floor
actually rotating...

It is a good fake but it is missing what I want.
If you can chop detector #s by placing it on
the object and running the checks than detectors
are fine, but I want to have as few objects
as possible since I'm working in TGF.

You see, I don't own MMF, or have the money
to buy it. All I have is the trial version
which I use to look at examples...

I see what AA meant now, but it might do a 2##
degree spin to get to right...

PS: Tigs, I don't really understand your avatar

Image Edited by the Author.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
11th June, 2004 at 18:44:00 -

Isn't his avatar of the game 'Terminal Orbit' that has been in production for yonks?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
11th June, 2004 at 20:34:25 -

Yeah, it's a really shrunk down screenshot of when I got bored and lined up two huge armies of really powerful units against each other in the level editor. Then I played it. The picture is about one second in.

Landing on backdrops and bouncing off the floor could be done with detectors. What do you mean by 'actually rotating'?
Also you may have problems fastlooping round one detector. The 'Overlapping backdrop' event doesn't seem to work in a fastloop.

 
- Tigerworks

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
11th June, 2004 at 20:57:06 -

I've got it to work in my falling sand example, so it's probably your coding.

 
n/a

Keatonian



Registered
  15/07/2002
Points
  571
12th June, 2004 at 01:35:31 -

Actually rotating, as in not intantly turning to a side but slowly turning on a point of pressure to a side, like in real life.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
12th June, 2004 at 01:47:21 -

That's freaking hard. It could be easier if hotspots could be moved but they can't. For that your looking at having more detectors than actual game.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
12th June, 2004 at 09:23:42 -

Yeah, I'm not sure anyone's ever managed that before, there's definitely some complex maths and algorithms involved with centres of gravity, turning forces, etc.

 
- Tigerworks

Keatonian



Registered
  15/07/2002
Points
  571
17th June, 2004 at 05:08:11 -

HaHah! Tigs, I've got it!

I just stopped playing Madness Interactive, and was thinking
about this, and Sine and CoSine because of the hand in MI,
and it came to me!

First the object collides with the ground:
Image

Then, we check to see where it collides with the ground:
Image

Then, our rotating is going to be based on the hot spot as is relivant to the
collision point:
Image

Using Sine and CoSine, we move the box on an Arc, until it reachs the ground
properly, by checking the distance between the two points, drawing a circle, and then
positioning the hot spot on the moving position on the arc while making the
direction vary based on its original direction, stored in a value:
(The orange line is the halfway point, it rotates to whichever side of the line the
hotspot is on)
Image

When the main detector and the detector next to it overlap the ground, it stops
rotating. Then the detector next to it checks (there will be six detectors) if there
are more detectors off than on. If there are, then it rotates on the next point.
Image

The only thing is, this could only work in MMF, due to collision point detection,
which I THINK mmf has. Also, I'm not sure how to run the events by placing the
detectors on the object and then running the events. Also, some of the details are
unclear. I'm happy I came up with all of this though.

What do you think?


Image Edited by the Author.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
17th June, 2004 at 05:41:42 -

It's nice but if your box is moving quickly towards the left, it will hit the ground, fly into the air a little bit and spin anticlockwise very quickly. How are you going to deal with the velocity of the box before it hits the ground?

Edit: MMF doesn't have collision point detection, so you just have detectors on the corners of the box (or the corners that are most likely to hit something, which depends on the direction of the box)

Image Edited by the Author.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
17th June, 2004 at 06:48:11 -

Very nice description with pictures! But 6 detectors? It would be a very cool engine but you wouldn't want to many of those boxes in your game.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
17th June, 2004 at 07:40:54 -

Firemonkey is right, that method doesn't take in to account the velocity of the object before hand. If it was moving quickly, it would have enough force to roll over, maybe several times. If it was moving slowly it might fall back like your example shows. Complicated stuff.

 
- Tigerworks

Keatonian



Registered
  15/07/2002
Points
  571
17th June, 2004 at 18:35:27 -

Well, that is just the rotation, it might look funny, but it would go to
its side and slide, not just stop.

They are fastlooped to the crates. 6 on the large sides, 2 extra on the others.
Total: 16 detectors.

And silly me! I don't even need to find out where it collides!

Image Edited by the Author.

Image Edited by the Author.

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

vortex2



Registered
  27/05/2002
Points
  1406
18th June, 2004 at 11:53:13 -

This object can be used instead of dectors: http://www.clickteam.info/extensions/extview.php?id=164

Image Edited by the Author.

 
A bit of insanity with every bite!
   

Post Reply



 



Advertisement

Worth A Click