Git Product home page Git Product logo

mlh-hackathon's Introduction

mlh-hackathon

Project by Nathanael Gutierrez & Austin Polanco


Prerequisites

To begin working with this project you must have the Haskell Platform installed

Install and Run

Once cloned cd into the pong directory and run the following commands:

runhaskell Setup.hs configure —user
runhaskell Setup.hs build
runhaskell Setup.hs install
cabal run

Inspiration

When deciding what project to do and which languages to use, we wanted something totally new and challenging for us. As such, we settled on creating a two player pong game using Haskell, a functional programming language completely unfamiliar to us and different than what we were used to.

What it does

This game is a simple pong game, like ping pong, in which you control paddles to hit a ball and change its direction and velocity. This game was intended to allow two players to play the same game over the internet.

How I built it

We built this game in pure Haskell using libraries such as gloss for graphics and Network.Socket to allow it to be played over the internet. The idea was so that one user can connect to another user's instance (the host) via web sockets.

Challenges We ran into

We ran into a number of issues including the learning curve for working with Haskell, setting up the development environment for the first time (Haskell can be a bit tricky to set up), installing the proper dependencies needed, but namely, implementing the web sockets. We managed to build a working pong game with graphics and user input, and we also managed to build a working prototype of web sockets sending text back and forth, similar to a chat client, however we ran into lots of issues getting the web sockets to work with our game's front end. We spent over 16 hours working on the implementation of the web sockets and were still unable to fully develop it due to our inexperience using the Haskell language and the lack of documentation and resources available over the internet.

Accomplishments that We're proud of

We are very proud to have learned the extensive and quirky features of Haskell that make it different from other languages like Java, C#, and C++. We are also proud to have been able to program a working user interface for the pong game that responds to user input and behaves as a pong game should.

What We learned

We learned that Haskell is a very niche but powerful language closely resembling logic used in math. We learned how to create our own data types and data structures and implement our own functions. We also learned about ways to package, distribute, and compile Haskell programs.

What's next for Haskell Pong

We fully intend on finishing our implementation of the web sockets and feature our program on GitHub and in the Haskell package manager, Hackage, so follow us on GitHub and stay tuned!

mlh-hackathon's People

Contributors

apolanco115 avatar nathanaelg16 avatar

Stargazers

 avatar

Watchers

 avatar

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.