Phantom107 Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Phantom107 Forum

Phantom107's Forum. Discuss about games, GML, 3d, game design here. Enjoy your stay ;)
 
HomeSearchLatest imagesRegisterLog in

 

 Mirrors

Go down 
3 posters
AuthorMessage
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Mirrors Empty
PostSubject: Mirrors   Mirrors Icon_minitimeThu Jan 31, 2008 2:48 am

is there any way to make mirrors in game maker without having huge drawing codes?
Back to top Go down
slayer64
Heavy Poster
slayer64


Posts : 143
Join date : 2008-01-05

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeThu Jan 31, 2008 4:11 am

take a look at this tutorial. its pretty sucky except for the camera's. maybe u can use this method somehow to make a reflection in something, by setting the camera or projection in the right spot.

http://64digits.com/games/index.php?cmd=view_game&id=4418
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeSun Feb 03, 2008 3:52 am

ok thanks Very Happy (Im hoping for Phantom to respond LOL! I didnt even notice untill now)
Back to top Go down
slayer64
Heavy Poster
slayer64


Posts : 143
Join date : 2008-01-05

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeSun Feb 03, 2008 6:57 am

lol. yea phantom would defiantly know how to make GOOD mirrors. you could always just draw objects on the other side of a window.
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeSun Feb 03, 2008 1:26 pm

I agree with Slayer 64. The best way to mirrors in GM is just to place the same objects on the other side. True mirrors are possible in GM, but they consume so much there isn't any processing for the actual game left (!). True mirrors would involve this:

1) Draw a projection from the camera's position. (so you set the camera to what the mirror would should)
2) Capture the screen using background_create_from_screen(...).
3) Create a texture from the captured screen.
4) Draw that texture on the mirror.

Now the problem is calling background_create_from_screen(...) every step just takes up way to much processing time.
Back to top Go down
https://phantom107.actieforum.com
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeSun Feb 03, 2008 3:58 pm

hehe ok, but the problem with that is it wont reflect the player Sad Unless I make it a 3d character who getrs deleted and recreated every time you walk past a mirror... And no I really cant have it take up the whole processer time, its like a bathroom with blood on the floor, not the most important part of the city Im making
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeSun Feb 03, 2008 4:44 pm

I don't see why you would have to delete and recreate the character. Can't you just reflect the draw event in the mirror?
Back to top Go down
https://phantom107.actieforum.com
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitimeSun Feb 03, 2008 7:02 pm

oh yeah duh...
Back to top Go down
Sponsored content





Mirrors Empty
PostSubject: Re: Mirrors   Mirrors Icon_minitime

Back to top Go down
 
Mirrors
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Phantom107 Forum :: Questions and Answers-
Jump to: