Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4

Author Topic: Platform Exploration Project > Demo H  (Read 17787 times)

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Platform Exploration Project > Futility
« Reply #15 on: June 30, 2010, 09:16:05 am »

whats wrong with polygons?
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Futility
« Reply #16 on: June 30, 2010, 03:40:48 pm »

If they are moving too fast, they go through each other.
And by too fast, I mean fast enough to pass one of the shape boundaries.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Platform Exploration Project > Futility
« Reply #17 on: June 30, 2010, 07:11:37 pm »

thats not a good enoguth reason to go all rectangles.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Futility
« Reply #18 on: June 30, 2010, 07:25:23 pm »

You didn't bother to offer an alternative.

I don't know the math for polygon containment and predicted paths.
Rectangles are far easier to deal with in those respects.
They are just boxes.
No angles, no diagonal distances, just algebra.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Platform Exploration Project > Futility
« Reply #19 on: July 01, 2010, 02:55:55 am »

You could use both. Check outer rectangle that contains the whole polygon. Did it hit? Start checking polygon. If polygon is a miss, check inner rectangle (contained by the polygon) to check for overshoots. Still a miss? then you either hit a small corner that the polycheck missed, or you missed it completely. Not failsafe but better than just rectangles.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Platform Exploration Project > Futility
« Reply #20 on: July 01, 2010, 05:25:48 am »

you had a wiki page for the math.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Futility
« Reply #21 on: July 01, 2010, 07:32:42 am »

I improvised slightly.

That page uses matrix transformation.
I don't understand the math behind that, so I didn't even try coding it.

Point vs Segment
 Here is how mine works:

Point A and line segment L M

If A is within rectangle L M,

and Slope( A L ) ~= Slope( L M )     << Genius (but not mine)

Point A contacts segment L M at A.

Not only do you know that there is a collision, but WHERE.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Platform Exploration Project > Futility
« Reply #22 on: July 01, 2010, 08:00:35 am »

OO, you CANNOT expect to program something like this without being prepared to learn some new math.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

eerr

  • Bay Watcher
    • View Profile
Re: Platform Exploration Project > Futility
« Reply #23 on: July 01, 2010, 09:46:25 am »

Maybe it's safer to stay in the realm of easy math?
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Futility
« Reply #24 on: July 02, 2010, 01:45:42 pm »

Meow!

After retreating into the realm of rectangle constructions, I've made some awesome progress.

Using composite objects, I can make a variety of boxy creations.

Here are some screens:

Spoiler (click to show/hide)

Take note that those two tiny squares are part of the same object, and move together.

See how they can fall on either side of the pole-tree-thing and not collide with it?

The movement and jumping seem decent enough, but I need to fix a few flaws.
I'll throw out a running demo once it's more polished.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Org

  • Bay Watcher
  • Daring Hero
    • View Profile
Re: Platform Exploration Project > Rectangles
« Reply #25 on: July 02, 2010, 01:54:56 pm »

Nice.
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Rectangles
« Reply #26 on: July 02, 2010, 04:33:14 pm »

Major wonderful success.

I've got sprites working and loading, and its starting to look like a real game.
I need to code in some standard area-loading function, and slap together a demo level to climb around.
I suppose that will only take a couple hours.
I suppose you can look forward to some really basic platforming action.

I don't know how to deal with frame rate, so if anyone wants to guide me through it, or make me some sample code,
 I'd be very pleased.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Rectangles
« Reply #27 on: July 02, 2010, 06:36:50 pm »

Here is a screenshot:



And here is the link:
Platform Explorer Demo A

I'll upload some concept art soon.

EDIT: Beware of frame rate shenanigans.
« Last Edit: July 02, 2010, 06:41:53 pm by Outcast Orange »
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Org

  • Bay Watcher
  • Daring Hero
    • View Profile
Re: Platform Exploration Project > Rectangles
« Reply #28 on: July 02, 2010, 08:08:56 pm »

Trying now.

:<
And accept my Steam friend request.
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Platform Exploration Project > Rectangles
« Reply #29 on: July 02, 2010, 08:52:20 pm »

This version has a bit more going on:

Platform Explorer Demo B

Foreground stuff and some animation.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream
Pages: 1 [2] 3 4