Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Drawn lives and score following the screen?  (Read 980 times)

0 Members and 1 Guest are viewing this topic.
Drawn lives and score following the screen?
« on: May 14, 2007, 04:07:48 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 506
Well, I've been working a lot on my fan game for the past few days, the first of which I actually see being completed some time in the future, unlike all my other failed attempts. However, to try to make the game harder than it is already, I've decided to add lives, and a score that actually effects the gameplay(right now it's only really simple; get enough and get a 1-up, lose enough and lose a life).

The lives and score are drawn just fine and all, but the problem is that they won't follow the screen! It shows the score at the top, outside of the actual screen, still, but I want to be able to know how many lives I have left.

Would this have something to do with the view following oCharacter? If I'm not being specific enough, let me know.

Thanks in advance.
Logged
- Click to go to thread

Goodnight

Once and future Captain
Re: Drawn lives and score following the screen?
« Reply #1 on: May 14, 2007, 07:23:14 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
It's pretty simple, draw the scores at a position relative to the view!

Say you want it 50 pixels from the left, 10 pixels from the top. Then the x and y arguments of the drawing function should be:
x: view_left[0]+50
y: view_top[0]+10
Logged
Re: Drawn lives and score following the screen?
« Reply #2 on: May 14, 2007, 07:48:13 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
or if you use d&d, in the x and y coordinates put x= view_xview+[offset] and y= view_yview+[offset] and that should work.
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Re: Drawn lives and score following the screen?
« Reply #3 on: May 14, 2007, 08:27:05 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 506
Oh, I think I see now.  Thanks guys. :)

It's pretty simple, draw the scores at a position relative to the view!

I guess that was part of the problem too, lol.
Logged
- Click to go to thread
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.015 seconds with 42 queries.

anything