Code Monkey home page Code Monkey logo

hacktober-race's Introduction

Hacktober Racer โŒจ๐ŸŽฎ

A type-racing game for and about Hacktoberfest!

How to use

  1. npm install in the root directory
  2. npm start to get it running!
  3. Navigate to localhost:4000

How to contribute

  1. Star the repo โญ to hopefully spread the word!
  2. Go to the issues section of the repo and find an issue you'd like to work on. Comment on the ticket you'd like to work on as to not be racing other people to code it up!
  3. Write your amazing code
  4. Run npm run lint ๐Ÿ“—
  5. Go ahead and make a pull request. โฌ†

How it looks

Initial commit (It looks better now ๐Ÿ˜)

gif of the current state

hacktober-race's People

Contributors

berniwittmann avatar caleballen avatar dependabot[bot] avatar ganderzz avatar harveysanders avatar lukegarrigan avatar mrsimsure avatar mtrunt avatar plin0009 avatar vikthortt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hacktober-race's Issues

Winner gets a Hacktoberfest badge

So the winner of the race should receive a Hacktoberfest badge.

At the moment I wouldn't worry about the back-end of this (actually storing the badge).

I'd like it to be obvious that when a player wins a game, they get the reward.

  • Badge pops up
  • Adds to their badge count (This doesn't exist)

Any ideas on this would be great!

Add a Terminal

Hi
I would like to work on this if no one else has claimed it.

Issue with restarting the game

  1. A game ends it restarts the game
  2. A countdown appears
  3. Players shouldn't be able to type until the countdown has stopped (But they can)

Github oauth

Once we have persistence it'd be nice to have Github OAuth to register to the game!

Error: Cannot GET /

For some reason, the relative path for the public directory does not work on my machine. I'll put in a PR to use an absolute path for express.static(). This should work on everyone's machine.

Fun project!

Have some way to tell your type speed!

I know that in most type racer games you'd have words per minute but for this, I don't think it'll be all that suitable.

I'd like some ideas on this, I've only really got one:

  • Characters per minute/per second

This should display on the screen in real-time as the player types!

Add a test suite

It'd be good if we introduced a test suite, the server/ code should be a good place to start with this:

  • Jest is a good option!

Multiple rooms/games

If there are X amount of people, let's say 15 people we're going to want to split them into separate games, as a base-line we could say 6 people per race.

Add more sentences

At the moment the server sends to the clients just one sentence:

this.sentence = "int main(){printf (\"Hi World\\n\");return 0;}";

On the server, there should be a tonne of codey one-liners that get chosen at random โ€” the chosen one is then sent to all the clients as current behaviour.

Add a cool looking terminal

At the moment, the terminal is just your standard windows copy.
image

Design a sexy terminal, or maybe even an editor โ€” Here's an example:
image of ubuntu

Note if we were to do an editor, it'd be good if we could navigate through it as though it is an editor โ€” that's definitely out of scope for this.

Add a blinking cursor

When typing it would be nice to have either underneath the letter you're currently on or to the left of it to have a blinking cursor just so it's easy to track where you currently are.

History layer

We can go a number of different ways with this one.

I just think it would be awesome if we had something that gave you a brief view of how you were doing โ€” a history of the previous games and potentially the characters per second you were doing,

Just a thought, I'd love to hear your ideas!

Need a count down for the game to begin

We need a count down to determine when a game starts, things to consider:

  • Preventing user from inputting until commencing
  • Cool looking count down on the screen
  • Resetting when a new game starts

Add persistence

We're going to need some way to persist player information so we can store basic data like the number of Hacktoberfest badges they have earned (The number of races won).

Put player's face in the game.

So I've stubbed out some code for this in the UI Player.js

drawGithubImage() { imageMode(CENTER); image(this.img, this.x, this.y, 30, 30); }
We're going to auth via github, but at the moment I've just got random images in there:

image

I want these images to be circles and potentially fill the player circle leaving just the edging.

So all you need to do in this is do some funky stuff with p5js to not render some pixels to make it a circle!

Add a cool looking background

With the recent changes making the terminal look sexy:
image

The background colour doesn't really go โ€” I'm looking for ideas for what we can do for the background, here's some thoughts I have:

  • Add a background similar to that of a linux distro just so it goes with the terminal
  • Have some kind of paralax, this would require the screen to translate along with the player, which I think might be a good idea

Let me know if you have any other ideas, I'd love to him them.

End the game and start a new one

At the moment there is no concept of a game โ€” there's a winner and there's other players. When a player wins there needs to be either one of the following:

  1. The game just resets
  2. The ability for the player to search for a new game โ€” this will require multiple games happening at once

It might be a good idea to do option 1. first and then move onto option 2. later.

Racer icon renders on top of terminal

Description

When multiple racers race in a single game, the icon of racers who joined last gets drawn on top of the terminal.

Possible Solution

We can fix this by showing the racer's own car on top of the screen. So on every screen, the order of cars will be different. But the racer's car will be at the top.
Now when more number of players join the game, we can simply decrease the size of their race icons, to accommodate more players.
We can also set a restricting number which restricts more than a certain number of people joining a single game.

Screenshot:

Screenshot from 2019-10-05 08-22-42

New Name!

Comment any ideas for what we should name the game โ€” Hacktober Racer doesn't have the best ring to it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.