Skip to content

Recreation of the popular game Space Trader as an exercise for version control best practices, object design, object-oriented programming methods, Agile and Iterative development and JavaFX programming.

Notifications You must be signed in to change notification settings

andrea-covre/Space-Trader

Repository files navigation

Space Trader

Overview

This project is a recreation of the popular game Space Trader as an exercise for version control best practices, object design, object-oriented programming methods, Agile and Iterative development and JavaFX programming.

Gameplay DEMO by Andrea Covre


Game Dynamics

The goal of the game is to travel around different locations in space to buy/sell items and earn enough credits in order to be able to buy the winning item found at a random location.

Attributes

When starting a new game, the player can select the difficulty (easy, medium or hard) which determines the starting amount of credits, skill points, and the outcomes of encounters with traders and bandits.

Attributes selection by Andrea Covre

Skill points can be assigned to the player's attributes/skills. The Pilot skill decreases the amount of fuel used, the Fighter skill increase the chances of fighting off a bandit or robbing a trader, the Merchant skill decreases the purchasing price of most items, and finally the Engineer skill decrease the cost of restoring ship's health points.

Player summary by Andrea Covre


Travelling

Map example of visited location by Andrea Covre

Map example of non visited location by Andrea Covre

Map example 1 by Andrea Covre

Map example 2 by Andrea Covre

The game features multiple locations with randomly generated coordinates, names (through multiple dictionaries), and attributes. The player can travel to any of these locations by spending some ship's fuel based on the distance between the location the player is travelling to and the player's current position (fuel cost can be discounted based on the player's Pilot attribute). During each travel there is a chance of meeting a bandit or a trader on the way. The player can decide to either pay, flee or fight the bandit, or to rob, trade, negotiated or ignore the trader. The outcomes of these action (success or failure) depend on the game difficulty and player attributes.

Bandit encounter example by Andrea Covre

Trader encounter example by Andrea Covre


Markets

Each location has a pseudo randomly generated market. Each market offers items with equal or lower "tech" level of the civilization at that location. Higher tech items are more expensive therefore it's easier to make a profit when sold. Moreover, markets also offer special items that are either player upgrades, fuel or the ability to restore ship's health points (more effective with a higher Engineer level). The price of the items is randomly determined within a preset range, and a discount is applied based on the player's Merchant attribute.

Market example by Andrea Covre


Ship

The ship has various attributes:

  • current health points and maximum health points;
  • current fuel amount and maximum fuel amount;
  • attack value (determined by the player's Fighter skill);
  • maximum cargo capacity;
  • list of cargo items currently stored;
  • maximum number of slots for upgrades;
  • list of upgrades currently installed.

All this information can be seen at the bottom bar and at the market.


Winning

The winning item spawns as a special item at a random location and only after the player has played for some time.

Winning item on the market by Andrea Covre

Purchasing this item will allow the player to win and complete the game, and will cause the game to reset to a fresh new game after the credits.

Winning scene by Andrea Covre


Team

Andrea Covre's contributions

  • Map & Regions

    • Designed and implemented:
    • Designed, styled and wrote the scenes for:
      • the map sceneMapScene.java
      • the region sceneRegionScene.java
      • including:
        • information panes
        • random generation and layout of regions (locations), and their names, descriptions and attributes
        • player travelling sequence and implementation
        • bottom info bar with amount of credits available, players skills level and ship's information

  • Markets & Items

    • Designed and implemented:
    • Designed, styled and wrote the scenes for:
      • the market sceneMarketScene.java
      • including:
        • random generation of items, and their names, descriptions and attributes
        • generation and adjustments of items prices based on players attributes, region's tech level and item's rarity
        • implementation of player's upgrades
        • items transfers from market to ship cargo and vice versa
        • upgrades transfers from market to player cargo and vice versa
        • bottom info bar with amount of credits available, players skills level and ship's information
        • winning item design and spawn

  • Ship

    • Designed and implemented:
      • the ship class → Ship.java
      • including:
        • health points (HP)
        • fuel & cargo management

  • Skill Selection

Developers

Space Trader Developers List

About

Recreation of the popular game Space Trader as an exercise for version control best practices, object design, object-oriented programming methods, Agile and Iterative development and JavaFX programming.

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •