Using views and viewing text
Posted 13 May 2012 - 01:16 AM
View0 follows the player and the 320x240 space around it. View0 fills the whole screen.
View1 shows the whole level, is squashed down and sits in a bottom corner of the screen.
It's a bit messy, but who cares at this point?
A controller object draws text at view_xview+16, view_yview+16
So it follows the player around - appearing to be static to the user.
However, this text also appears on view - and you can see it moving around relative to the room.
Is it possible to make Game Maker only display the text in view and not view?
I'm just using a simple draw_text() function at the moment.
I'm aware that there are other ways of displaying information like this - something about creating a virtual layer... I don't know, I haven't read about it in years.
Maybe that'll work?
What do you think?
Thank you for you help.
Posted 13 May 2012 - 02:06 AM
Posted 13 May 2012 - 02:42 AM
To make your game run better, you might want to put that in every object to prevent it from being drawn in view. But then you'd have to use draw_sprite_ext() or draw_self() (one reason to get GM8.1) for all the objects. There may be a better way though and hopefully someone will say what that is.
Posted 13 May 2012 - 10:03 AM
GM cycles through each view and draws the game twice for each view. So use
Awesome, thanks for that.
I just noticed Sasino97 started a topic entitled "Draw in a view, but only in that view?"
So... Pretty much exactly what I was doing here, then.
Whatever, I'll go read his identical topic anyway
Haha - exactly the same answer as here - although the answer here was probably more helpful because of the reference to draw_self()
I gotta upgrade at some point >.<
Edited by StudioGilliam, 13 May 2012 - 10:06 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users