Skip to content

Instantly share code, notes, and snippets.

@vegegoku
Created February 6, 2024 10:14
Show Gist options
  • Save vegegoku/fc609682d141e4e33029a25bc8131145 to your computer and use it in GitHub Desktop.
Save vegegoku/fc609682d141e4e33029a25bc8131145 to your computer and use it in GitHub Desktop.
Vrom drag

Eiad gaming corp

VromVrom

Eiad corp is a new tech company that wants to make its name into the gaming industry, and they have been for a long time looking for talented developers to start working on there first title, they are starting a new racing game project and they have already started the process of getting the team ready to implement the first phase of the game development, as part of the preparations they want to build a simple version of the game in java to test the basic ideas before actually build all the graphical assets, they need something that help the developers to test ideas and introduce new ones using some unit tests. following is the basic set of ideas and functionalities they expect to exists in the initial version of the game and they need to confirm the experiment version can land the required logic by the developers.

VromVrom drag racing game :

The game is a drag race game, the players will race with their high performing cars in a straight line, the player reaching the end line first wins. each race consists of multiple rounds and each round takes a place on a different track, where each track has a different length, each race should have at least 2 cars participating and once a race is started the player must finish all the race rounds, a race must have at least 2 rounds.

But as simple as it is like this it cant be a game, so the design team has some few ideas to spice the player experience so they want to include the following features in the base game :

Rewards system :

  • Promotion points will be granted to the winning car/player after every round.
  • Every participant in the round should receive a promotion points reward, except the last finishing car should receive 0 promotion points.
  • Each round will have a fix total number of promotion points.
  • Each round should provide more promotion points than the round before.
  • The wining car will always receive 65% of the total promotion rewards of a the round. unless there is only 1 other car it get 100%, - applying the rule of last car always takes 0 points -.
  • The next winning car earns 65% of the remaining promotion points and so on unless there is only 1 remaining car then it takes all the remanining points, - applying the rule of last car always takes 0 points -.

Car features :

  • Each car starts the race with initials stats : Top speed, Acceleration, and warm up time.
  • Top speed defines the maximum speed the car can reach.
  • Accelaration : defines how the car speed is increased starting from 0 until it reach its top speed. ---Physics---
  • Warm up time : How long the car will take after starting the engine to actually starts moving.

Car upgrades :

  • Cars be upgraded using augments.
  • There is 3 types of car augmentation that can be purchased and applied to the car. Top speed, Acceleration, and warm up augments.
  • Top speed augmentation : this will increase the car top speed value.
  • Acceleration augmentation : This will increase the acceleration of the car and reeduce the time needed to reach its top speed.
  • Warm up augmentation : This will reduce the warm up time of the car to a minimum of 0.
  • Each augmnentation has a price of promotion points.

Race features :

  • After each race round and after the distribution of the round rewards, the game should introduce 3 random augmentation of each type with different values and different prices, the better the augmentation the higher price it has.
  • Players will be allowed to purchase one or more upgrades but no more than one of the same type as long as they have enough promotion points to cover for the augmentation price.
  • Players can choose to save the promotion points for the next round. and any remaning points after they purchase the augments will also carry to the next round.

How the race works :

This section is a little more details about the race functionality:

After setting up a race which inlcudes :

  • Define the number of participants.
  • Define the number of rounds.
  • Define each round rewards.
  • Define each round track.

Once the race is set-up it can be started, when the race starts it will starting ticking for N times, each tick represent 1 second on the time line. with the first tick the cars will should move based on their warm up time and accelaration, a car that needs more than one tick to warm up should not move until it finishs warming up. and after each tick the car should report the distance it covered during that tick, the game will keep track of each car covered distance and order the cars on the results boards for every tick, and finaly with the last tick it will decide on the winner and disctribute the rewards.

The car that reach the end of the track will no longer respond to the ticks and will not report to the race ticks, and will have its order fixed on the board. Once the round is finished and the rewards are distributed, the player will get the option to buy augments for their cars as stated in the requirements above, when all is done the race moves on to the next round. The winner of the race is the winner of the final round.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment