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: [Request / Listing] Rupee Engine Issues  (Read 4733 times)

0 Members and 1 Guest are viewing this topic.

Ice_Dragon

[Request / Listing] Rupee Engine Issues
« on: April 11, 2006, 11:47:47 am »
I am using Yoshi's Rupee engine and I have encountered some problems, three as of now.

1. The Rupee counter doesn't appear at the bottom left on rooms bigger than the test room that comes with teh engine, but draws itself somwhere down the left side in the middle.

2. If the room is big enough you can loose the Rupee counter's position all together as it dissappears off the screen.

3. When I collect a Rupee there is always a slight jump before the rupee is destroyed, as though it were a solid object.

If somone clould help me fix these problems I would be very greatfull.

~Ice_Dragon
« Last Edit: February 08, 2012, 10:12:03 am by Niek »
Logged

Ben

Re: Rupee Engine Issues
« Reply #1 on: April 11, 2006, 12:35:04 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Quote
1. The Rupee counter doesn't appear at the bottom left on rooms bigger than the test room that comes with teh engine, but draws itself somwhere down the left side in the middle.
Basically yoshi's rupee engine draws it in that space, so all you have to do is change where it draws it (I assume this'll be in the draw code somewhere).

Quote
2. If the room is big enough you can loose the Rupee counter's position all together as it dissappears off the screen.

To fix this, find the draw code and make sure that it's draw relatively to the edge of the room. I'm not sure how yoshi does it, but when you find the bit where you set up the x and y coordinates change the x to something like room_width-40 and the y to like room_height-30.
Now this won't work if you're using views, your gonna have to use the view variables instead. So go check the GM manual.

I cannot answer your third because i don't have the heart engine code, though why exactly it would be yoshi's code that your using to collect rupees I don't know, that's your code probably, so you're gonna need to post it.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion
Re: Rupee Engine Issues
« Reply #2 on: April 11, 2006, 01:39:25 pm »
  • I almost has over 9000 everything!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 323
For the first question, just change the stuff in bold:

Quote
repeat (rup_eq[0] + 1)
{
   draw_sprite_ext(rup_spr[0], floor((global.rupees mod (rup_dec * 10)) / rup_dec), view_xview[0] + 14 + rup_x, view_yview[0] + 212, 1, 1, 0, rup_color[global.rupees >= rup_eq[1] / rup_inc], max(global.rupees >= rup_eq[1] / rup_inc, 0.5) + ((rup_dec == 1) * 0.5));
   rup_x += 8;
   rup_inc *= 10;
   rup_dec /= 10;
}

For some reason, the gm6's seem to be the older revisions, while the gm5 turned out fine.

For the second & third question, you can listen to Ben for it.
Logged

  • Puyo Nexus

Ice_Dragon

Re: Rupee Engine Issues
« Reply #3 on: April 11, 2006, 02:14:20 pm »
For the first question, just change the stuff in bold:

Quote
repeat (rup_eq[0] + 1)
{
   draw_sprite_ext(rup_spr[0], floor((global.rupees mod (rup_dec * 10)) / rup_dec), view_xview[0] + 14 + rup_x, view_yview[0] + 212, 1, 1, 0, rup_color[global.rupees >= rup_eq[1] / rup_inc], max(global.rupees >= rup_eq[1] / rup_inc, 0.5) + ((rup_dec == 1) * 0.5));
   rup_x += 8;
   rup_inc *= 10;
   rup_dec /= 10;
}

For some reason, the gm6's seem to be the older revisions, while the gm5 turned out fine.

For the second & third question, you can listen to Ben for it.

:S What do I need to change it too, I don't really understand because this is the first time I have ever used Game Maker.

My Rupee collection code is activated by Link colliding with teh Rupee and the piece of code that is executed is:

Code: [Select]
global.rupees +=1
instance_destroy()
Logged
Re: Rupee Engine Issues
« Reply #4 on: April 11, 2006, 02:37:57 pm »
  • I almost has over 9000 everything!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 323
For the first question, just change the stuff in bold:

Quote
repeat (rup_eq[0] + 1)
{
   draw_sprite_ext(rup_spr[0], floor((global.rupees mod (rup_dec * 10)) / rup_dec), view_xview[0] + 14 + rup_x, view_yview[0] + 212, 1, 1, 0, rup_color[global.rupees >= rup_eq[1] / rup_inc], max(global.rupees >= rup_eq[1] / rup_inc, 0.5) + ((rup_dec == 1) * 0.5));
   rup_x += 8;
   rup_inc *= 10;
   rup_dec /= 10;
}

For some reason, the gm6's seem to be the older revisions, while the gm5 turned out fine.

For the second & third question, you can listen to Ben for it.

:S What do I need to change it too, I don't really understand because this is the first time I have ever used Game Maker.

My Rupee collection code is activated by Link colliding with teh Rupee and the piece of code that is executed is:

Code: [Select]
global.rupees +=1
instance_destroy()

Ok, let me try to get this right. in the script (scr_draw_rup), find the lines that are posted above. (They should be at the end of the script). Now, you want to change the stuff in bold.

Ok, view_xview[0] tells the program to keep it at the left of the view, so it stays in the same position when the view moves. Same thing for view_yview[0], except it is from the top, not left.

So, view_xview[0] + 14 tells the program to draw the stuff 14 pixels from the left of the screen, and view_yview[0] + 212 tells the program to draw the stuff 212 pixels from the top of the screen.
Logged

  • Puyo Nexus

Ben

Re: Rupee Engine Issues
« Reply #5 on: April 11, 2006, 02:47:35 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Code: [Select]
My Rupee collection code is activated by Link colliding with teh Rupee and the piece of code that is executed is:

Code:

global.rupees +=1
instance_destroy()

Well apart from bad coding practice, that's not the problem.
So are either your rupee object or your link object solid?
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion

Ice_Dragon

Re: Rupee Engine Issues
« Reply #6 on: April 11, 2006, 03:08:16 pm »
Ok, I have fixed problems 1 and 3 but problem 2 is still causing me issues. I dont really understand what I need to do to fix it.
Logged

Ben

Re: Rupee Engine Issues
« Reply #7 on: April 11, 2006, 03:12:53 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Are you using views?
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion

Ice_Dragon

Re: Rupee Engine Issues
« Reply #8 on: April 11, 2006, 03:17:32 pm »
Yes, Presuming your talking about in the room tog et the camera to follow Link.
Logged

Ben

Re: Rupee Engine Issues
« Reply #9 on: April 11, 2006, 07:41:57 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
So you need to draw the rupee system relative to the view, rather than to the room_width and height.
Use something like
view_xview+view_wview-40 for the x (puts it 40 from the right of the view) and
view_yview+view_hview-40 for the y (puts it 40 from the bottom).

I think that's right, I sorta quit GM after 5.3 and moved onto C++.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion
Pages: [1]   Go Up

 


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



Page created in 0.053 seconds with 57 queries.