Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[VERY WIP] Portals #6951
Conversation
This comment has been minimized.
This comment has been minimized.
|
This is brilliant! |
This comment has been minimized.
This comment has been minimized.
|
Too cool! |
This comment has been minimized.
This comment has been minimized.
|
Looking forward to this! |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jun 8, 2014
|
@kevingranade, any more updates on this? I was really looking forward to it. |
This comment has been minimized.
This comment has been minimized.
|
I'm keeping it updated, but I actually don't have a mechanism to work it into the game itself. |
This comment has been minimized.
This comment has been minimized.
|
I'm looking forward to this with great anticipation. |
kevingranade
added some commits
Mar 27, 2014
This comment has been minimized.
This comment has been minimized.
|
Now stepping into a portal teleports you to the other side. I was planning on setting the other side of the portal to return to your previous location, but I wasn't able to get it working. |
KA101
force-pushed the
CleverRaven:master
branch
from
a342a64
to
0da0595
Oct 30, 2014
This comment has been minimized.
This comment has been minimized.
|
Link the portals up with an id, and have the portals share an id. So portal id 1 teleports to the other portal with id 1. One could use a vector (or map) to associate with a 2 sized array containing pointers to a portal info struct, and it could contain pointers to both portals, or something. If you store the coords of the portal in the info struct, you could hop to that coord to continue shadowcasting, if you can see it. |
This comment has been minimized.
This comment has been minimized.
|
No progress for over a year, closing. |
kevingranade commentedMar 27, 2014
Has a lot of rough edges, unimplemented bits, bugs, and a memory leak you could drive a killdozer through.
I thought people might want to play with it though. Once I sort out what I need to do, I'm probably completely obliterating those last two commits.
That aside, what's it do?
It hooks into the field of view calculation code, when it detects a portal in a scan, it casts a special "portal" type shadow instead of a normal shadow. A later hack into the map draw code checks for this special shadow and substitutes content from a special "foreign" map instead of from the regular map.
pic $= words * 1000
http://polehammer.com/azmodean/holy_crap_portals.png
As you can see, it renders a different map where you'd expect the shadow for the portal to be.
TODO:
More I've forgotten about, TODOs are sprinkled throughout the code.