2015-05-23 15:43:07

Hi all,

I want to program some new functions within my game your_adventure but have no clue where to start, this are the ideas and hopefully someone can help me:

1. i want to introduce something what will display how long someone has played, like aprone did in swamp, i also want to have it at the main menu.

2. to make the activities that are implemented right now some more interactive, i want to implement something that gives the player a message, like with fishing: "your rod starts to bend over, there must be a heavy fish on the hook", with this message the player should press a key to determine how heavy he/she wants to rail n the fish. the heavy fish, will need more power, with this message: "your rod starts to shake a little, there must be a light fish on the hook" the player should press another key to use the minimal amount of power to rail in the light fish. Together with this i want to implement a few seconds. The player can rail in the fish during these seconds, otherwise the fish has freed itself.

This are the new ideas for now. hopefully someone can lent me a hand with examples.

thanks a lot.

greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2015-05-23 16:43:14 (edited by Genroa 2015-05-23 16:46:26)

The first thing is really simple:
1. Make a timer object at the beginning of the game loop
2. When exiting the game, save the timer elapsed value
3. When launching a game (saved or new), retrieve the saved value of the timer if existing, or set it to 0

The second thing is impossible to do for you without knowing more about how is your game done. I mean, is it a blocking structure? A non-blocking structure with ticks? How is this done? You have to think about it from scratch. This forum isn't made to provide ready-to-use solutions for things as complex as this. It looks like "hey I want to make a multiplayer FPS can anyone give me a working source code example? Oh, and I want my game to have laser rifles, could you make it for me? Because I don't even know what an if statement is. Thanks". No one will answer to these kind of questions... (and here, this kind of menu is using a simple condition)

So, could you give us more details?

2015-05-23 17:42:06

hi janroe,

Thanks for the timer part.

It wasn't my intention to probably sound a bit rude. but i will post some details.

The game is based on a system of ticks. these ticks form seasons and thus years where you will get older.

The activities aren't influnced by that ticks yet.
The system of fishing i have now is a game of chances. you have 50% that you will catch a fish and thus 50% that the fish won't bite the hook in this example.

I am curious how i can change to something like this:

1. the player throws out his/her pole.
2. the game waits an amount of time.
3. the player gets one of three messages telling the player how heavy the fish is. (light, medium or heavy)
4. I want to add keystrokes according wich message the player gets. like (by a light fish press 1 and by a heavy fish press 3). the player should do this within a certain amount of time otherwise the fish is free.

Hopefully this is some more detail about how the game is currently structured and how i want to put it in the next release.

Greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2015-05-23 17:50:51

Is there some kind of "fishing state" for the player/character? Or is the fishing instant, allowing you to spam until you get fish?

2015-05-24 11:58:30

Hello,

No there isn't a fishing state, but the city (wich is the location you start at) does have a sublocation, ich are the docks of that city. Here you can throw out a fishing pole and try to catch a fish, wich you can use to cook it to eat it, to regenerate some hitpoints when you toke some damage in combat.
In the current system there is 50% chance you rail in a fish, and the other 50% you won't rail in a fish.
It is basicly a yes or no system. and i want to try to make that more interactive.

hth

greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2015-05-24 12:07:28 (edited by Genroa 2015-05-24 12:10:00)

So if I would spam the fishing action I could just spam the action with some kind of script? I don't think that you can do what you want with a system as simple as the one used for your game (but you can still improve it!) smile

To have things using time in your game, you will have to use a non-blocking architecture, with a tick system, and using a state system, to say "the player is fishing, if he moves, change the state so he can't "have a fish being caught" while moving to other locations. Some games have this problem, you start fishing, you move to a city, and suddenly the game says "you caught a fish". Because the game hasn't detected that you left your fishing post.
With ticks, you can say "if he is fishing, let's see since when, and each minute he has a 50% chance to begin to catch a fish"