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

Pages: [1] 2   Go Down

Author Topic: [Request] Rupee Engine  (Read 4120 times)

0 Members and 1 Guest are viewing this topic.

Kingknight

SiMelon
[Request] Rupee Engine
« on: August 23, 2008, 03:48:25 pm »
  • The Hunter
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 495
does anyone have a rupee engine? i have been trying to find 1 lately and if you ask, yes i searched on the !@#$% google!

thnx

Kingbite jk Kingknight
Logged
Re: [Request] Rupee Engine
« Reply #1 on: August 23, 2008, 06:23:06 pm »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
... All you have to do is make a single integer variable that stores the number of rupees the player has, and increase that number when the player collides with a rupee object... What the hell more could you possibly need? Why the hell can't you make THIS on your own?

Do you REALLY think you can make a Zelda game if you don't even know how to do something like this? o.O;;
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog

King Tetiro

Leader of Phoenix Heart
Re: [Request] Rupee Engine
« Reply #2 on: August 23, 2008, 06:28:56 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Minalien just p*** off and stop insulting every game developer.

kingknight, what program is this in? If it's in gamemaker, I can help.
Logged
  • Phoenix Heart

Giverny

Christ on Acid
Re: [Request] Rupee Engine
« Reply #3 on: August 23, 2008, 06:34:29 pm »
  • Bitte Scheiße
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1159
Minalien just p*** off and stop insulting every game developer.

kingknight, what program is this in? If it's in gamemaker, I can help.
No, for once MiNalien has a very good point.
Ill be back in about five second with a gmd.

EDIT: !@#$% this. Linux is !@#$% when it comes to emulating GM, so Im not going to waste so many nerves on something that anybody can write.
If you cant write your own rupee engine, RTFM, and dont make a zelda game.
/endpissed
« Last Edit: August 23, 2008, 06:50:46 pm by Giverny »
Logged
THEGivernyPROJECT
~LynkW-Surrender Global
  • Surrender Global Forums

King Tetiro

Leader of Phoenix Heart
Re: [Request] Rupee Engine
« Reply #4 on: August 23, 2008, 06:41:02 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
@ Giverny - I know that it's just how he/she said it (Still dunno which Minalien is)

Do you REALLY think you can make a Zelda game if you don't even know how to do something like this? o.O;;
I my honest opinion, he/she is implying that kingknight can't make a zelda game. That's why I got ticked off.
Logged
  • Phoenix Heart

Kingknight

SiMelon
Re: [Request] Rupee Engine
« Reply #5 on: August 23, 2008, 06:43:19 pm »
  • The Hunter
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 495
Minalien is it really that simple? oh... well i still dont know how to do it lol
im using Gamemaker yes and as i said im kinda new to game development :P
Logged
Re: [Request] Rupee Engine
« Reply #6 on: August 23, 2008, 06:43:25 pm »
  • Don't Worry Sir, I'm From The Internet.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2339
I don't know if it's still hosted, but Yoshi had a pretty good one I think. I'm assuming this is in Game Maker.

http://www.zfgc.com/forum/index.php?topic=3363.0 <- The topic.

But what Min was saying was to have a variable such as:
Code: [Select]
global.rupees=0;Then, when you collide with the rupee object, it should increase it by one and destroy the rupee object:
Code: [Select]
global.rupees+=1;
instance_destroy()

If you want to know how to DRAW the rupees on screen, that's a different problem. Here's what I did, I'm sure there is better ways out there though.
Code: [Select]
//This draws the little rupee icon that is in the corner of the screen
draw_sprite(spr_rupee_rupee,0,view_xview[0]+8,view_yview[0]+240-16);

//if you have no rupees, it will draw three zeros. You can change this depending on wallet size or whatever.
if global.rupees=0
{
    draw_text(view_xview[0]+19,view_yview[0]+240-14,'000',);
}
//if you have less than 10 rupees, but more than 1, it will draw two zeros, plus the amount of rupees you have. //And etc.
if global.rupees>0 {
    if (global.rupees<10) {
        draw_text(view_xview[0]+19,view_yview[0]+240-14,'00'+string(global.rupees));
        }
    else if (global.rupees<99 || global.rupees=99) {
        draw_text(view_xview[0]+19,view_yview[0]+240-14,'0'+string(global.rupees));
        }
    else {
        draw_text(view_xview[0]+19,view_yview[0]+240-14,string(global.rupees));
        }
}

if (global.rupees=global.rupeeMax) {
    draw_text(view_xview[0]+19,view_yview[0]+240-14,global.rupees);
    }

Try that. I haven't used any of this for a while, so I'm a little rusty, and like I said, this isn't the best way to do it. Make sure you familiarize yourself with actually learning what variables are, and not just when to use them, but also HOW and WHY they work. Then you can actually code without examples and tutorials as guides.
Logged
Grimace is the demiurge, the creator. From him all things in McDonaldland have sprung. He is not a sin, he's not a menu item, he's just Grimace. He exists. He rolls his lidless eyes and flaps his lipless mouth, formless and terrible, a protean idiot thing from the depths of pre-history.

Giverny

Christ on Acid
Re: [Request] Rupee Engine
« Reply #7 on: August 23, 2008, 06:52:21 pm »
  • Bitte Scheiße
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1159
@ Giverny - I know that it's just how he/she said it (Still dunno which Minalien is)

Do you REALLY think you can make a Zelda game if you don't even know how to do something like this? o.O;;
I my honest opinion, he/she is implying that kingknight can't make a zelda game. That's why I got ticked off.
You shouldnt get ticked off. MiN is right. If you cant make a number appear on he scren, your out of luck when you try programming a cliff jumping engine, and enemy engine, etc.
Logged
THEGivernyPROJECT
~LynkW-Surrender Global
  • Surrender Global Forums

Xiphirx

wat
Re: [Request] Rupee Engine
« Reply #8 on: August 23, 2008, 08:44:59 pm »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
Its in various engines...

find it, or make it.
Logged
  • For The Swarm

Kingknight

SiMelon
Re: [Request] Rupee Engine
« Reply #9 on: August 24, 2008, 01:19:47 am »
  • The Hunter
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 495
Kylink I'm having troubles with your code, this is what I get:
Code: [Select]
___________________________________________
ERROR in
action number 1
of Draw Event
for object obj_rupee:

Error in code at line 22:
   if (global.rupees=global.rupeeMax) {

at position 27: Unknown variable rupeeMax
Logged
Re: [Request] Rupee Engine
« Reply #10 on: August 24, 2008, 09:50:10 am »
  • The devil in the mirror.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 238
The error looks pretty clear to me, you haven't set the variable rupeeMax. just write global.rupeeMax=99;   or something.
Logged
Working on my Masters Degree in Computer Science.
Hey look, Zelda Coop....later.
Proud user of C++ for 9 years, and counting!

Kingknight

SiMelon
Re: [Request] Rupee Engine
« Reply #11 on: August 25, 2008, 04:06:52 am »
  • The Hunter
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 495
in what obj rupee?
Logged
Re: [Request] Rupee Engine
« Reply #12 on: August 25, 2008, 04:18:49 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
No, in the object that is drawing the rupee count as it is what has to know what the maximum is and having it in obj_rupee would set it to the same value on each collision which is horribly inefficient.
« Last Edit: August 25, 2008, 04:20:37 am by 4Sword »
Logged

Kingknight

SiMelon
Re: [Request] Rupee Engine
« Reply #13 on: August 25, 2008, 04:31:11 am »
  • The Hunter
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 495
[edit] ah !@#$% im confused
how do i make the numbers in the corner a smaller size to fit the screen?
« Last Edit: August 25, 2008, 04:33:06 am by Kingknight »
Logged
Re: [Request] Rupee Engine
« Reply #14 on: August 25, 2008, 04:33:43 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
It isn't going to work perfectly.  In Kylink's code it should be this:
Code: [Select]
if (global.rupees != global.rupeeMax)
{
  global.rupees+=1;
}
instance_destroy()

Then again, I do not know what you really used.
Logged
Re: [Request] Rupee Engine
« Reply #15 on: August 25, 2008, 05:38:20 am »
  • Don't Worry Sir, I'm From The Internet.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2339
It isn't going to work perfectly.  In Kylink's code it should be this:
Code: [Select]
if (global.rupees != global.rupeeMax)
{
  global.rupees+=1;
}
instance_destroy()

Then again, I do not know what you really used.
Uh, yah. I'm not completely sure in my code, that was more of a base than anything.
Logged
Grimace is the demiurge, the creator. From him all things in McDonaldland have sprung. He is not a sin, he's not a menu item, he's just Grimace. He exists. He rolls his lidless eyes and flaps his lipless mouth, formless and terrible, a protean idiot thing from the depths of pre-history.
Re: [Request] Rupee Engine
« Reply #16 on: August 25, 2008, 05:40:40 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
I figured it was better to answer what could have been one of his future questions; it is not so much that I was being critical of you, I am nit-picky for little things that lead to problems if they go unchecked, it's just how I think.
Logged
Re: [Request] Rupee Engine
« Reply #17 on: August 25, 2008, 01:02:28 pm »
  • The Dark Lord is here...
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 29
In fact it should be:
Code: [Select]
global.rupees = min(global.rupees + 1, global.rupeeMax);
But as Minalien has pointed I don't think this guy's posts is worth so much replies, considering that he is "making" a Zelda game and he doesn't even know how to make a rupee engine.
Logged
Darth RPG - Feel Dark Side temptation

  • The Legend of Cerda Website

Giverny

Christ on Acid
Re: [Request] Rupee Engine
« Reply #18 on: August 25, 2008, 02:52:50 pm »
  • Bitte Scheiße
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1159
In fact it should be:
Code: [Select]
global.rupees = min(global.rupees + 1, global.rupeeMax);
But as Minalien has pointed I don't think this guy's posts is worth so much replies, considering that he is "making" a Zelda game and he doesn't even know how to make a rupee engine.
QFT'D
Logged
THEGivernyPROJECT
~LynkW-Surrender Global
  • Surrender Global Forums

Mirby

Drifter
Re: [Request] Rupee Engine
« Reply #19 on: August 25, 2008, 07:10:02 pm »
  • To bomb or not to bomb...
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Female
  • Posts: 4162
There's this guy at RPM named irregularhunterSZ who firmly believes in a disproven theory. Yet his posts got many replies. Actually, irregularhunterSZ::Kingknight
Logged

Mirby Studios | Share & Enjoy now available! (Links above!) | Games I've Beaten
Quote from: Mamoruanime
I like-like it :D
  • Mirby Studios
Pages: [1] 2   Go Up

 


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



Page created in 0.094 seconds with 75 queries.

anything