brian-chalfant / oregontrail Goto Github PK
View Code? Open in Web Editor NEWOregon Trail from Scratch
Oregon Trail from Scratch
This is one of the menu items before the start of the game. It provides game information, controls and tips.
Try taking a journey by covered wagon across 2000 miles of plains, rivers, and mountains. Try! On the plains, will you slosh your oxen through mud and water-filled ruts or will you plod through dust six inches deep?
How will you cross the rivers? If you have money, you might take a ferry (if there is a ferry). Or, you can ford the river and hope you and your wagon aren't swallowed alive!
What about supplies? Well, if you're low on food you can hunt. You might get a buffalo... you might. And there are bear in the mountains.
At the Dalles, you can try navigating the Columbia River, but if running the rapids with a makeshift raft makes you queasy, better take the Barlow Road.
If for some reason you don't survive -- your wagon burns or thieves steal your oxen, or you run out of provisions, or you die of cholera -- don't give up! Try again... and again... until your name is up with others on The Oregon Top Ten.
You may turn the sound on or off during the program by pressing Control-S
.
You may want to quit in the middle of the program. If so, press the Escape (Esc
) key twice whenever the computer is waiting for a response.
The software team responsible for creation of this product includes
...
At the Dalles, you have the option to navigate the Columbia River with the rapids mini-game. The wagon is placed on a raft and the player may move the raft left and right to avoid rocks and the river's edge. Pass 3 signs to reach the trail and complete the game.
Create a build script in python
to generate the enum files from a json file.
Convert ShopItem class to an enum.
The player earns a score if they successfully reach the end of the trail.
The game state should be serializable and saved to file. If the player chooses to the quit the game then they should be prompted to save the game. If a game is saved and the player wants to start a game then the player should be prompted if they would like to continue their last save. A game save will overwrite a pre-existing saved game file. Completing the game successfully or not will delete any saved games.
Implement the river crossing event. The success of the crossing is based on the factors and the option that the player chooses. A failed cross can lead to the death of the family members and loss of supplies.
Money is currently represented as a floating point number. This is a minor issue that involves precision. Some fractions cannot be precisely represented as a float, so in general it is better to use integers. I am including more information in this link.
Use an integer to represent the number of cents and use some division / reminder to display the dollar and cents.
$20.48
can be represented as 2048
cents. The dollar amount can be calculated by 2048 / 100 = 20
(integer division) and the remaining cent value can be calculated by 2048 % 100 = 48
.
food_amount * 0.2
instead of found_amount + 0.2
.Implement the different menus in game to allow the player to check their status and make decisions. This does not include the menu to start the game.
These are the starting items of all the menus below.
These are the remaining items of the menu when the player is in town or in a fort.
8. Talk to people
9. Buy supplies
This is the remaining item in the menu when the player is on the trail.
8. Hunt for food
This is the remaining item in the menu when the player is at a landmark not shown above (rivers, chimney rock... etc.).
8. Talk to people
Use real world geographic data to simulate the weather conditions in the game.
The start of the game should have a menu.
Submenu for Choose Management Options
Each item has a maximum number of items that they can have / purchase at a time.
All of the game values (occupation salaries, shop prices, number of oxen per yoke, random probabilities...etc) should not be hardcoded. Move the values to a json file.
There are some sections of code that are duplicated and can be wrapped in a method / loop.
Add entity health to the player, family members and the oxen. The distance that the oxen can travel per day is determined by their health. The entity dies once their health is equal to or less than zero.
Assuming that the player can up to 6
oxen and each oxen has 100
max health, I created this table to estimate how far the player can travel based on the summed health of all the oxen.
Oxen Total Health | Low Pace | Med Pace | Fast Pace |
---|---|---|---|
100 | 3 | 6 | 9 |
200 | 7 | 14 | 21 |
300 | 9 | 18 | 27 |
400 | 10 | 20 | 30 |
500 | 11 | 22 | 33 |
600 | 12 | 24 | 36 |
With the table, I created a best fit line that estimates these points:
distance = 5 * ln(oxen_health) - 19
Integrate the game into the server - client model. The server should contain the core logic of the game and the client should display the game state in the command line without a GUI. The mini-games are either not available or modified to be supported in the command line.
Use the python
pygame
library to display the game through a GUI.
Each day on the trail random events may occur based on the state of the characters and weather
The game has an 8 bit version song of Yankee Doodle.
The relationship between Node
, Destination
and Landmark
works fine but it can be confusing. I think we can leave it as is and create an issue to improve it later
Originally posted by @kchevali in #27 (comment)
Daily Game Loop
Goals
Each Day the user should have options:
The LandMarkLinkedList::insert()
and the alternate route code can be optimized but it works fine for now. We can make an issue to handle it later if thats ok with you.
Originally posted by @kchevali in #27 (comment)
Landmarked Linked List
Goals
It is difficult to read a long block of text in the command line. At least for now, add 20-50 new lines to clear the screen after the user enters their input.
One of the options during a trail is to go hunting. The objective of the game is to use ammo to obtain food. Different animals appear on the screen and the player may navigate the scene and aim at 8 different directions (horizontal, vertical and diagonal) to hit an animal with each shot. Each animal is worth different pounds of food. Each shot consumes one bullet. There is a 100 pound limit that may collected at the end of the game.
Create a simple client that accepts user input and sends it to the server. The server receives the client's message and sends it back.
Implement a high score system to track the score of the previous games if the player successfully completes the trail. The high score should have default scores for the player to strive for, which should be stored in a JSON file. The player high score values should also be stored in a file for persistence. Each record contains the name, score, and rating.
Create a GUI client that renders the server output in a window. This client can play all of the mini games.
The maximum amount of the game logic should be off loaded to the server. However, some of the mini-game logic may be on the client side if and only if there is a performance issue that requires it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.