Giter Site home page Giter Site logo

congol's Introduction

Hi there ๐Ÿ‘‹

I'm always building, follow me to see what I build next.

If you want to hire me, I'm open to offers starting January 2025 after my graduation.

๐Ÿ“„ See my resume

๐Ÿ“ง Email me at [email protected]

Some things I've made:

  • mathgenerator - A math problem generator with a large variety of problem types, usable as a python package.
  • stemplayeronline.com - A website that allows users to mix music using a stem player in their browser.
  • uni2db.com - An API for public university data like courses offered. Powered by open-source web scrapers.
  • 3cards - Flashcards on web3. Runs at 0 cost, allowing for completely free and unblockable education.
  • ideaspot.org - A website where users can share and build each others ideas.
  • congol.net - An online server for playing a competitive 2 player version of Conway's Game of Life.
  • dropsync - Perfectly sync a moment in your life with a moment in a song
  • lukew3/resume - Github Actions CI to build a pdf of my resume from jsonresume and latex template.

congol's People

Contributors

lukew3 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

congol's Issues

Save moves, run next board generator on server

There should be an array called moves that takes the cells that each user toggles on their turn. After each turn, a new board is generated on the server and returned. Board generation should be written in C/C++ but it's fine to write in js for now.

Timer doesn't work in online mode

There should be a waiting area where the timer doesn't start until the other player joins

  • Should timers be stored on the server?
    • Definitely should store time of submissions later

Once the second user joins, start timers on both clients. Start time will be saved to server as a date object. The time at which users made their moves can be figured out later. Ideas:

  • Moves contains an array of move arrays. The first element of the move array will contain the seconds or milliseconds since the game started. The second element will be an array of cells toggled.
  • Keep a separate array of move timestamps showing the milliseconds after the start of the game at which the moves occurred

Do something at end of game

Game ends when:

  • Player reaches desired score
    • 100 seems reasonable
  • Player's game timer runs out

After, game should:

  • Not allow any more cells to be placed
  • Put text that says "Player X wins!" where the submit button is
  • Push the submit button below that text
  • Replace submit button text with: "Play Again"

Allow playing different versions of the game

Users should be able to select whether they would like to play 2 player remote, 2 player local, or 1 player practice.

Have 1 page for playing games, different elements are visible and different rules apply for different game modes. All mode-specific logic should be contained inside of Game.js and config.js

Make code more understandable

There is a lot going in in the game.js file. Rename functions, create a better flow of events, and probably make the local and online versions of the games more separate, as logic for online games should occur server-side, unless you could figure out a way to have clients run logic and check with each other.

More variety of cell styling

Users who contribute to the game in various ways should have access to different cell styles such as:

  • gradients
  • images
  • animated colors.

Contributions to reward:

  • code
  • invited others
  • played a certain amount of games
  • donated

Create multiple game rooms

  • Online games will be given a uid, which will be in the url after /game.
  • Only two players can be in this game
    • Each player is assigned their playerId when they join
  • Other users can join but only watch

Track available pieces

  • Give users a certain amount of pieces and have them place up to that many pieces during their turn.

  • After turn has passed, increment their pieces by an amount

  • Are pieces the right name? The game is about life, maybe pieces should be called eggs, as they can only be placed, and not picked up.

Add ability to see round history

  • Similar to the arrows on online chess
  • Create a file for exporting data about the game as well

Rounds are split into two parts

  • part a is where users place their pieces
  • part b is where the computer generates the next board

During round 0, the first player makes their move and then the computer generates the next board. Then, the screen shows round 1 and the next player goes

Or should round 0 be the board without
0 - no pieces
0.5 - p1 places
1 - computer updates and shows board after 1a and generation
1.5 - next player places their cells

Enable routing

Have to create an express server first that redirects all pages to index.html. Frontend routes by setting url when user should be redirected.

Change scoring method

  • Score users every 2 generations
  • After users complete their turns, count the difference between the number of pieces that they have on the board and add that difference to the score of the player with the most living cells.
  • No scoring first round ?
    • Does this prevent the person who played first from getting an advantage?
    • Scoring every 2 generations would fix this

Fix css for underBoardLower

Right side goes off-screen and switch becomes broken after screen size becomes so small.
Switch also breaks after scores grow past 1 digit.

Create remote game

  • Use websockets
  • This will be the first time that a server will be needed on this project.
  • Allow users to join by url?
    • Or make accounts

Allow players to rejoin after they exit?

Because playerId is determined by the number of users in a room, when a player exits or refreshes their page, their playerId is set to player 1 or -1, even if they were player 0 before. Should they be able to get their place back or forfeit the game.

If they are not logged in, the game should end, and the remaining player should be moved to player 0. If they are not, the game should tell the remaining user to wait for them to reconnect.

Create users

Lot of work to be done on this issue:

  • Create user model
  • Create sign up/in pages
  • Create user profile page
  • Send correct usernames on games

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.