Portals, Surfaces, and sheer Luck

Posted by foslock on Oct. 10, 2006, 5:09 p.m.

So, I am experimenting with surfaces a lot more often than usual and after seeing Valve's Portal, I was extremely tempted to duplicate it in GM. Too bad it can't be 3D, but 2D is good enough, it'd still be an awesome game. So I created a little start of a game and got kinda into it. Here is the deal:

1) I start with the screen being draw to a surface every end step

2) Then, the importal shows the part of the surface, where the outportal is.

3) This worked for me the first time, but only because I had coded something I could never have logically applied.

This shouldn't actually work because since I have it drawing from the surface, and the surface drawing from the screen, and there are things on the screen (portal effects) the importal should show what was displayed on right before the outportal was created. This would make an infinite loop of drawing the same thing so therefor it wouldn't work.

I know that is extremely confusing but it took me an entire hour and a half in study hall to figure it out so don't feel stupid if you don't understand. So, I just continued working with my "engine-o-luck" as I called it and have a little demo for ya'll to try out: Download Portal Demo. Please try it and gives some suggestions for effects/levels. I am trying to use all of my own sprites (except backgrounds) so I probably won't accept sprites, yet graphical suggestions are really appreciated.

Thanks for reading and I know it's been a while since I blogged, but So long, and Farewell!

Comments

marbs 18 years, 1 month ago

I like the concept of the game. The portals thing can get a bit annoying espically on the last bit, but it's a unique idea (as far as I know).

fprefect111 18 years, 1 month ago

Good job with your Portal game :)

Arcalyth 18 years, 1 month ago

Very nice.

noshenim 18 years, 1 month ago

you can draw surfaces in the step event ;)

foslock 18 years, 1 month ago

I know that you can draw stuff TO a surface in the step event (you have too) but I didn't know that you can draw a surface through the step event.

Even so, I don't see how that could really help me.

KaBob799 18 years, 1 month ago

Ive been wanting to make a multiplayer only sort of 2d Portal game ever since I saw a video of Portal.

OL 18 years, 1 month ago

Quote: marbs
it's a unique idea (as far as I know).
Quote: foslock
after seeing Valve's Portal, I was extremely tempted to duplicate it in GM