Archived

This topic is now archived and is closed to further replies.

bloodthirsty vermin

My game in making

Recommended Posts

I am making a game that is harvest moon like and i was wondering about the exact uses of the if statement could it be used for after three days if your charachter has watered the plants everyday for three days they are ready for harvest? and i am stumped on a time system..days hours minutes(i dont want to go on real time because it would take forever)

Share this post


Link to post
Share on other sites
Your making a game but don't know if statements?

EDIT: Sorry that was kinda rude, but you gotta know how to program before you can program a game..

Anyways the next poster has better information... and good luck!

Please visit Turt99 Productions

[edited by - Turt99 on October 16, 2003 5:13:04 PM]

Share this post


Link to post
Share on other sites
make the game day based.

20 mins = a day or somthing

or let the player change to the next day by say having a sleep option.

if statement would then work on the day number and other vars based on watering

Share this post


Link to post
Share on other sites
quote:
Original post by cowsarenotevil
quote:
Original post by Turt99
Your making a game but don''t know if statements?


You''re making a game but don''t know how to read? He never said that he doesn''t know how to use if statements.


ummm he did say "and i was wondering about the exact uses of the if statement"


Share this post


Link to post
Share on other sites
hmm heres how I might do it in c


if (number_of_times_plant_watered >=3)
//your statements here
end


of course you may need to get more complicated because this will only check if the plant has been watered 3 times and doesn''t take days into account

Share this post


Link to post
Share on other sites
quote:
Original post by bloodthirsty vermin
i might have lift out some usfull info
i use C++ i will stay up correcting every error
i also use SDL and i will use this to learn from my mistakes
then make the final version wich will have networkin ect.


What is exactly the problem with your If Statement if you know how to use them already? thats the information people need to know.. what is the problem your having?

Please visit Turt99 Productions

Share this post


Link to post
Share on other sites
quote:
Original post by Turt99
quote:
Original post by bloodthirsty vermin
i might have lift out some usfull info
i use C++ i will stay up correcting every error
i also use SDL and i will use this to learn from my mistakes
then make the final version wich will have networkin ect.


What is exactly the problem with your If Statement if you know how to use them already? thats the information people need to know.. what is the problem your having?

Please visit Turt99 Productions


ok now they would knowthat from the top!!!!!
durrrrrrrr

Share this post


Link to post
Share on other sites
How would they know you just said that you want to know how to check if they waters 3 days but you didn''t say how you where setting the watering and all that.. basically what you asked is

PLEASE GIVE ME A PLANTING SYSTEM WITH A TIME SYSTEM, I think an if statement might work...

I''m just trying to help here..

Please visit Turt99 Productions

Share this post


Link to post
Share on other sites
quote:
Original post by Orb
This is what we call, a troll, or a dumbass.

Either way, move along.


watch your language.....and i am not starting it already,
in a few years i just want to get it ready and everything.
and plus i am going to teach my friends C++ so we could
do things faster(diplomas mean nothing to me if you dont have enough sense to use what you learned...)
and plus I belive in having a sense of humor.

Share this post


Link to post
Share on other sites
LOL, this is a funny topic. I think 5-10 minutes a day would be better for such a game. And you can always make it engery based.

Farmer has 100 energy. (100)
Farmer uses 35 energy. ( 65)
Farmer uses 35 energy. ( 30)
Farmer uses 20 energy. ( 10)
Farmer can''t do anything,
decides to sleep (make a button or something).
- End Of Day -

The user can sleep whenever he wants. You can make more tasks, with different costs. Upgrade total energy RPG-like.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..

Share this post


Link to post
Share on other sites
Maybe you should learn to program before you decide to make such a complicated game. Do you even know how to use switch statements, or loops, or pointers, or classes? If you dont know even those four things (at least the basics), you will not be able to do anything with SDL.

Share this post


Link to post
Share on other sites
Yea, what about it? You want us to write it for you?

Just create a timer. If you don''t know what one is, research it, it''s all over the web. Every frame(time-based) just increase a counter or something.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
This is funny. He''s obviously a complete noob. Probably never programmed in his life besides copying code from a book he bought. And he''s probably 12.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
dude, if statements are not the way to go. I read somewhere that they are really inefficient because the compiler has to dereference the cache. You should replace all your ifs with whiles.

Share this post


Link to post
Share on other sites