• Portal Prelude 5 1
Currently:  

Author Topic: Portal Prelude  (Read 254005 times)

0 Members and 2 Guests are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Portal X
« Reply #270 on: June 24, 2010, 04:57:32 pm »
Oh that could always work. Thanks for the tip.

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #271 on: June 26, 2010, 02:26:26 pm »
if a player picks up a cube, then walks to the edge so that the cube is over the edge, will the cube fall down? especially if the player is positioned like so, with just 1 pixel of his leg on the edge of a cliff:

nope, you are still grabbing onto it so it won't ever escape you.  Also note that the crate is only 2 pixels by 2 pixels ^-^

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Portal X
« Reply #272 on: June 26, 2010, 02:58:06 pm »
You mentioned that you're not pushing the block becasue of the physics involved, but won't you still need those physics anyway for releasing the cube in mid-air or dropping it though portals?
« Last Edit: June 26, 2010, 02:58:17 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #273 on: June 26, 2010, 03:16:37 pm »
The physics im talking about is because then every block would both have to continually check its position against the players position, and all other blocks.  If you pushed a block into a portal, and it was halfway on one side, you would still have to push the side thats on your side.  If you are pushing two blocks in a row, and you push them into a Portal, then weird things can happen.  Like if you push blocks horrozontaly into a portal, and they come out vertically from another.  They would have to start stacking upwards, while delivering the force of their weight back down through the portal to you.

And im not even considering the fact that when you move into a portal, you orientation doesn't change (as it should) you always remain vertical.  The physics of pushing blocks is not tooo bad, although too slow for my liking.  The physics of pushing blocks through portals?  A nightmare.  The way i have it right now, blocks dont collide with each other, and they dont collide with the player.  They do through Portals normally :]

I had to generalize the portal code though, so it would work for not just the player but for all objects :P
« Last Edit: June 27, 2010, 03:52:32 am by Builderboy »

SirCmpwn

  • Guest
Re: Portal X
« Reply #274 on: June 26, 2010, 06:13:58 pm »
Woah.
That is all I can say.  That, and, demo please?

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #275 on: June 26, 2010, 07:12:46 pm »
No demo just yet :P I need to get boxes fully up to speed.  I have them working basically but there are still issues when grabbing and dropping.  I added a feature, however, where when the box is merely sitting on the ground, it goes into a 'power saving' mode where it only waits for either being grabbed or the ground to change.  It doesnt even update the position or velocity variables.  So the box can have 3 states:

1) Projectile Motion
 when has a non zero velocity and when it is not resting on the ground
2) Still
 when the box is just sitting on the ground
3) Grabbed
 when the box is tethered to the players movements

This prevents slowdowns when many boxes are on the screen at the same time

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Portal X
« Reply #276 on: June 26, 2010, 07:14:46 pm »
Good good good good ;)

SirCmpwn

  • Guest
Re: Portal X
« Reply #277 on: June 26, 2010, 07:15:12 pm »
Can you still hit it with other boxes, or have some sort of interaction with it without grabbing it?

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #278 on: June 26, 2010, 07:17:12 pm »
Nope, for reasons stated before.  Having collisions between boxes through portals would be a nightmare with all the converting of forces and such.

SirCmpwn

  • Guest
Re: Portal X
« Reply #279 on: June 26, 2010, 07:18:29 pm »
Perhaps have this in a 6 MHz version, and have full physics at 15 MHz?

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #280 on: June 26, 2010, 07:32:58 pm »
Its not speed im worried about, its getting the physics to work.  I think you might be underestimating how difficult this would be to get this to work.  Not only would i have to implement something like Zedd, but it would have to be able to transfer an arbitrary amount of force through portals.  Which means i would have to rewrite so much stuff, including the player movement.  Crazy situations would arise like the ones i detailed in my screenshot:


Green Portals:
Boxes stacked and going through 2 horizontal portals
Forces have to travel through portals, and the boxes would have to eventually find the balance point, with boxes colliding with ghost boxes and gravity acting different ways on a single box.

Red Portals:
Player pushing boxes through a portal into a vertical stack.  Eventualy the force from the stack makes it impossible for the player to push.  And what happens when the player goes through the portal?

Blue Portals:
Portals in a corner, so that a box that is going through a portal collides with itself.  To crazy to even try

In short: Its not happening

SirCmpwn

  • Guest
Re: Portal X
« Reply #281 on: June 26, 2010, 07:34:50 pm »
Aww
Okay.  You may want to look into how Valve does it, they mention it in the developer commentary.

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #282 on: June 26, 2010, 07:38:34 pm »
Yeah if i remember correctly they said they created a small virtual physics engine around each Portal because it would be too time consuming to do it for the whole map.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Portal X
« Reply #283 on: June 26, 2010, 11:56:17 pm »
That seems like it would be a lot of work x.x

I think it's fine as it is planned now. It's already revolutionary for a calc anyway.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Portal X
« Reply #284 on: June 27, 2010, 10:28:48 pm »
this whole thing is pretty incrediculous...

yeah, it doesnt change at all except for when the doors open and close, so there really is no need to :) I just have it stored in the backbuffer.  The buttons modify the backbuffer when needed

do you use copy(L6+n,L3+n,"portion of the backbuffer to be sent to the buffer here", or simply copy the whole thing?