Jump to content

How to make a Time-based (?) game like farm simulator games


rolzan
 Share

Recommended Posts

Hello!

I'm new to game development and I wanted to make a time-based game, I don't know if that's the right term, but it works something like how farm simulator games work, where the player plants a seed, then wait long periods of time for the seed to grow. That means, the player is able to close the game, and after a period of time (enough time to grow the seed), opens the game, and they'll see the seed grew into a plant.

I don't know what framework is best for these type of games, but for now, I'm planning to make it as a text based game, build it like a website (HTML, CSS, PHP, & JS), then host it on my web host, so my table-top-gamer friends would be able to play it anywhere.

Basically, my plan is to make something like a multiplayer Risk game, where 2 teams fight each other, and each team consists of 3 players. They are able to gather resources so they could build their army, and then move their army around a grid based map (like chess: "move pawn to D7"), until they are able to destroy or conquer their enemy's castle.

The game revolves around the time system since all actions require time (training of units, building of defenses, moving a number of units to a location, etc).

Any advice is appreciated :)

P.S. I'm a web developer, this may sound stupid, but I'm planning to make the game on WordPress, I just need to figure out on how to make the time system lol

Link to comment
Share on other sites

Yeah, it does stupid :) ha ha, I'm joking, but it is weird, why would you do that? Sounds like a predominantly client-side affair to me, probably backed with a couple of backend services to manage the multiplayer aspect and possibly some other stuff. Wordpress sounds wholly inappropriate for that use-case.

I'm a little confused by your concept, is it a turn-based game or real-time? i.e. if I play longer than other peeps will I be at a huge advantage as I get more done?

To do time-based stuff you just need to store the last time someone was active, then grab the current time and play all events that will have occurred during that time period. If this is primarily just for you and some mates you probably don't need to worry about cheating (depending on who your buddies are!) so just store the last time as simply as possible. Oh, and when I say play events I mean it, its much easier than aggregating events to work out what happened during the idle time. Of course, if this is multiplayer you'll have the server running all the time so there would be no need for any of this, you just have your server running the simulation all the time, I'd imagine you'll end up with an action queue, players add to it, the simulation checks it each tick and removes items from it when they are complete.

I like the idea of making it text based though, I've got a lot of time for text-based games, particularly when you're exploring concepts.

Link to comment
Share on other sites

Quote

it is weird, why would you do that? Sounds like a predominantly client-side affair to me, probably backed with a couple of backend services to manage the multiplayer aspect and possibly some other stuff. Wordpress sounds wholly inappropriate for that use-case.

No, it's not a client-side affair, the CMS was an option because it's the easiest way for me to handle the member's group (players) and their actions, also because I was planning to make it a text-based game XD

Quote

I'm a little confused by your concept, is it a turn-based game or real-time? i.e. if I play longer than other peeps will I be at a huge advantage as I get more done?

It's a turned based game, and yes, if the team is always active (immediately do some operations after one is done) then it'll be a huge advantage for that team. Like I've said, it's like a Risk table top game, but in a much slower pace and is more complex. It's like how Utopia works, but instead of playing individually and managing your race (like Clash of Clans), players in a team will work together on choosing the right operation to strengthen their kingdom/country, and each operation takes a couple of hours to finish.

I was inspired by Dragon Age: Inquisition's War Table gameplay.

Quote

I like the idea of making it text based though, I've got a lot of time for text-based games, particularly when you're exploring concepts.

What is a good framework for text based games that is capable of handling multiplayer?

Thanks for the insight!

Link to comment
Share on other sites

2 hours ago, rolzan said:

It's a turned based game, and yes, if the team is always active (immediately do some operations after one is done) then it'll be a huge advantage for that team.

That makes it a real-time game then no? i.e. I dont have to wait for other teams to take their turns before issuing more commands, I just wait a set amount of time for those actions to finish and then perform more actions.

2 hours ago, rolzan said:

What is a good framework for text based games that is capable of handling multiplayer?

Sorry, no idea, I haven't found a good library for either thing. Kni is the closest but not what you're after, might find it interesting though.

 

Link to comment
Share on other sites

If you are using php this is pretty simple. You use the dataTime object to check the system time . For example you have a function plantSeed() inside the function or object you just keep track of the date and time it was planted on as well as the state of the plant (seed, sprouting, blooming, harvestable). Then you need some kind of controller that checks at regular intervals if the state of the plant has changed. So after a day for example your controller will say PlantSeed was called 24 hours ago, change plant state to harvestable.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...