Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7039347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:47:14+00:00 2026-05-28T01:47:14+00:00

My team is planning to create a simulation game using Javascript, CodeIgniter and MySQL

  • 0

My team is planning to create a simulation game using Javascript, CodeIgniter and MySQL for the backend.

It will be mostly click based, ie: There will be buttons for activities like Eat, Play, Study, etc, and in the game environment, one day will contain 3 phases, day, noon, night . And for each phase, users can pick between those activities and those activities will increase certain character parameters (Intelligence, Focus, Fun, etc) then the game will progress to the next phase. Once it’s night, the game will progress to the next day.

So I need feedbacks on how to saving the game progress. Here’s what I had in mind :

  • There will be a table for Users (obviously) that will contain users’ data including the parameters/stats, money, etc. Do you think the stats etc must be separated to another table so there will be a history of stat increases?

  • For the saving, I’m thinking of using a Logs table that record every activity is by users. So if in day 1 phase 1 (phase day) the user picks Eat, I will insert to this logs table more or less like : user_id = 1, day = 1, phase = 1, activity = eat. So for example when the user stops playing and exits the game after day 1 phase night, the database will have :

    user_id = 1, day = 1, phase = 1, activity = eat
    user_id = 1, day = 1, phase = 2, activity = play
    user_id = 1, day = 1, phase = 3, activity = sleep
    

    And when they continue the game, I will read from this table and get the latest row of this user_id, and after checking that the latest row is day 1 phase 3, the game interface will display day 2 phase 1. However, this means that the phases for a day must be fixed from the start, so I can’t include, for example, random additional time phases outside these phases (think of it as an extra opportunity to increase the stats).

So what do you think? I hope the explanation is clear enough.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:47:14+00:00Added an answer on May 28, 2026 at 1:47 am

    I think you are on the right track. I do not see why you can’t store the money stats inside the user table, unless you want to keep track of this for the user’s history or progress…

    But as a programmer you always want to think ahead, are you going to use these stats in the future? For game perks etc… So it maybe valuable data it may not be… But MySQL can handle billions of records… so I wouldn’t worry about pushing the limits of MySQL… because if you do then your game is already very successful.

    If it were me I would setup a second table and xref them for the game actions. If you have a specific things to track you may want to use separate tables for that also … or you may not… those choices are depending on the way the game is to be play &/or developed.

    For an online game I would also consider looking into using MySQL’s stored procedures (MySQL 5+)… this is very easy to figure out… its a function which can store logic (if statements etc) & storing SQL inside of mysql server and call these functions from your php mysql query like a normal sql statement… This would allow you to run more than one SQL statement at once… IE. Update, select delete… in one function… etc… This I would imagine would be very useful for game development.

    If you look on this Google Search: It is currently the forth document down with a title of MySQL Stored Procedures this is a very good guide on stored procedures it helped me get started… and it was a breeze to do.. I tried to find the direct link on MySQL’s site but its been a while so I’m not sure where its located now.

    Good luck on your project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our team is planning on making a thick client into a web based UI.
I'd like to experiment with burn-down and planning game with the team I'm on.
My team's current project involves re-writing retrieval libraries in JavaScript. We are basically looking
Our development team is planning to upgrade from visual studio 2005 to visual studio
I am planning to start a project with a team of 3-4 people and
I am planning on using $.tmpl() for a rather large enterprise application. It appears
We are using Team System 2010 and trying to adopt Scrum by using the
My team is planning to develop an application that is initially targeted for Windows
I'm planning on writing a RSS Feed Aggregator with a team, but I'm wondering
I'm having issues with using the Javascript Coin Slider (great download fr/: this workshop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.