Google Summer of Code/Proposals2010/glew

From Thousand Parsec Wiki

Jump to: navigation, search

Contents

Project Description

Now that Single Player has been implemented in Thousand Parsec, the next natural step would be to create an engaging experience to go along with it. A Scenario/Campaign feature would complement the new addition.

Many aspects drive great games. Games can be fun because their interactive gameplay, the challenge of winning, and intriguing plots and storyline.

With the introduction of Scenarios, players will be placed in challenging conditions. The odds could be unbalanced at the start of the game. There might be certain conditions to winning (possibly ruleset pending). Scenarios allow for players to be challenged in ways current single player cannot.

Campaigns will drive story. Stringing scenarios together by tying them through a common storyline or progression (maybe of increasing difficulty) will lead to a more rewarding single player experience.

Goals

Primary Goal

The main goal of this project is to create and implement a functioning scenario mode. This will involve creating additional modules for persistence or save states of single player games. With properly formated state files, these files can be edited to create specifically created scenarios and campaigns. It will be necessary to add the save and load capabilities to the client gui.

Secondary Goals

The secondary but attainable goal will be to create either a stand alone editor something similar to allow for user created scenarios. This customization process will give players a new spin on enjoying Thousand Parsec and challenging other players with "tantalizing" situations. Scenarios could then be packaged and or linked with other scenarios to form campaigns.

Bonus Goals

With the implementation of campaigns it would be awesome to have some kind of story telling feature incorporated into the sequential nature of the scenarios.

Implementation

Saving State

At the suggestion of Lee Begg (llnz), SQLite offers a "client-server"-less way of writing to a database. The current tpserver-cpp has a persistence module written for mySQL, which is capable of storing the state of the universe. The simplest solution to having players save is to use SQLite to write to a self-contained database file (save file). As the module for mySQL has already been written, a module for SQLite would involve reinterpreting the module to fit the commands of SQLite, or the sqlite3 library. This would grant database files that could be shared and loaded as if they were complete databases of games. To my Understanding, the current persistence module (mySQL modules) is used in the event that the server is shut down, it can be restarted and then load game information from the mySQL database to restore and continue the game. This is almost perfect for creating save states but requires a mySQL servers, which is why SQLite simplifies this part. So a new module should be created using SQLite to write to a database file, effectively storing the state. Doing this will require a good understanding of the current mySQL persistence module and being able to convert it into a complementing SQLite module. There is also the possibility to add more information to this databases to allow for requirement checking and AI loading/restoring.

Writing the persistence module for the AI will be a task of its own. It will involve understanding the specific AI and how to logically organize this "knowledge" in a database for it to be restored upon loading.

This phase of the project will likely be the most time consuming as debuggin and testing will have to be extensive.

Building a Scenario

Initially a scenario can just be a basic saved state. But eventually, it should be extended to a designable and customizable saved state. It would definitely be best to have a scenario editor. Direct access to the database file generated by the SQLite dump is not likely to be human-readable. So a GUI based scenario editor would be implemented to allow for easy user creation and customization of scenarios.

Campaigns

Campaigns would be a sequential order of scenarios. So scenarios would either be passed along as a group or they could be linked together.

The bonus feature of story telling would need to somehow be worked in here as well. If possible if could simply be a series of messages that come up at the start or end of the scenario.

General Requirements

As specified in the Project Idea:

  • The file should be self-contained and easily shared between users
  • There should be some check to make sure the user has the necessary components (server, ai, ruleset, etc) to play the scenario. This would likely involve some kind of wizard (similar to the one when loading a single player game) that would check and prompt for the required components.

SQLite creates an entire database in a single cross-platform file allowing for it to be easily shared and is self-contained unlike a whole mySQL database.

The Check would have to be implemented with a wizard as described. It might be a good idea to create a table of required elements in the save file (database) in order to determine the "requirements" of the scenarios. These requirements might include rulesets, AI's, maps, or a number of other components.

Project schedule

I'll be available for the majority of the Google Summer of Code period. I will be on vacation from May 22nd to June 5th. To make up for this early absence, I would be fully willing and committed to starting my research and work early such as May 3rd to the 21st.

May 3 - May 21 (Research and Planning)

This stage will be used to familiarize myself with the server, persistence module, and all applicable objects and components that the server has. This will allow me fully understand each variable and parameter that will have to be stored for saving an in-game state. This will also be the time where I research SQLite and its functionality in C++. This functionality might have to be extended into the AI involved, it depends on the scope of the project.

June 6 - July 16 (Stage 1)

  • Week 1: Plans finalized for organization of the database. Meaning a strong understanding of the persistence module and clarifying any remaining issues with a Mentor.
  • Week 2-3: An SQLite module will be written, being able to write the universe to a database file in an organized way. Will likely have to be debugged to ensure everything is stored properly.
  • Week 4: Outputting to a file should be testable at this point, meaning it is ensured that the game state was stored as expected into the database file.
  • Week 5: The client will be able to save to a file (i.e. Saving functionality will be added to the GUI).
  • Week 6: Reading from a specified database file will be written, this can probably be done in parallel while writing the persistence methods. They should accurately recreate the state of the game.

July 17 - August 9 (Stage 2)

  • Week 7: Reader will be present and functioning properly (should be early in this stage).
  • Week 8: A scenario creator will be made. Hopefully in the form of a small stand alone app to edit features such as planets, fleet locations, etc...
  • Week 9: A basic campaign consisting of several consecutive scenarios will be playable. See Appended section for Campaign Ideas.
  • Time Permitting: Research and Implementation of some story telling features to campaign mode

August 9 - August 16 (Finishing Touches)

This week will be time for documentation and cleanup. If a remaining task is still unfinished and reasonable to finish in this time, it should be.

About Me

My name is Greg Lew, I am an undergraduate at McGill University currently pursuing an Electrical Engineering degree with a Software Engineering minor. While not attending university, I live in Boston, Massachusetts.

Languages and Knowledge

I am confident in java, but I have a good amount of experience with python. I have worked with c/c++, and I am willing to learn more if necessary, which seems likely.

I have worked with databases and mySQL before and am comfortable working with this and expanding my understandings.

Major projects I have worked on

  • A web-based Restaurant Recommendation system where users could make profiles, rate and review restaurants, comment on restaurants, and get recommendations based on their ratings of restaurants. My contribution was mainly focused on the database organization and how objects were input and output from it. (Project used jsp, java, apache server, tomcat, mySQL database)
  • A short summer internship prototyping small python applications on Symbian Nokia Phones, one of the main goals was to synchronize music playing across multiple phones for increased volume.
  • A soccer robot programmed in java (with an extended library) that has to function autonomously in a 12'x12' course. It must be able to localize, avoid cinderblocks, detect and collect balls, and shoot them into a specified goal location.

The summer internship I mentioned was conducted on the following basis:

  • I would go in to work for the full afternoon at an MIT building.
  • I would meet my "mentor" for a brief meeting to discuss what I had accomplished that day, what problems I ran into, and what I planned to do next.

The experience was gratifying and rewarding, while still providing me with challenges.I found I was able to be self motivating and productive. From this experience, I believe that I can become fully committed to a large project. I can be openly available for regular contact and can express my concerns and accomplishments. Learning my way around SQLite and C++ shouldn't be too steep a learning curve for me.

I look forward to expanding my programming skills while being productive this summer; but most importantly, I look forward to enjoying the summer wile doing something that interests me.

Contact Info

See GSOC Application for Info.

Appended Information

Scenario and Campaign Ideas:

My initial thoughts on possible ideas for scenarios were theme based. Firefly came to mind as an interesting universe to try to set a story in. (If you aren't familiar with Firefly, I'll do my best to describe what I was thinking of implementing)

Background Story: You are leading a group of setters to a region of space known as the Outer Rim. Your initial intent was to start human colonies.

Initial Scenarios would be simple, colonizing several planets, maintaining them, etc (almost like a tutorial).

But eventually The Alliance would start to intervene in your plans for colonies on the Outer Rim. They want to keep the system unified and under their order.

As a past Browncoat (rebel/ Independent Faction) leader, you take all means necessary to resist Alliance rule. Initially the battles are simple, as the alliance sends only a few diplomatic ships to your region. But as time progresses, the region which you control will expand and The Alliance will further oppose your expansion of territory.

Not only are the Alliance halting your expansion and exploration, but Reavers will relentlessly attack your colonies.

Soon, managing a large part of the system map will be difficult. The ultimate goal might be to overthrow the Alliance's reign over the core planets.

All of this said, I am open to altering my ideas as this was only inspiration for a theme based Campaign. I understand it is possible to make maps for the Risk Ruleset, allowing for a custom map of the "Firefly Universe." But i'm not sure how feasible certain ai or other features will work certain Rulesets.

In terms of originality, I've also thought of just general ideas that will make for interesting stories. Maybe incorporating story cliches like Rebels versus Federation. Space Pirates who are more independent functioning, focusing more on exploiting. Savages who focus on exterminating.

Most of this is speculation, as I know there are limitations to what is available in terms of AI and game mechanics.

Other than that, I am really open to ideas. There's the option of other theme based ideas. I've even tried asking friends for suggestions on what would make interesting Campaigns.

Further Note:

I plan on further familiarizing myself with other TP rulesets and hopefully other AI's. This will allow me to better understand certain limitations and possibly spark more ideas.

Look for further updates.

Personal tools