Coder Social home page Coder Social logo

trivial-road-li1's Introduction

Trivial-Road LI1

About the Project

This project was developed for the LI1 University of Minho Subject of the Software Engineering degree. This was our first project developed in the university and we were very impressed with the result.

Grade ⭐️ 19/20

Demo 📽️

Demo Image

demo.mp4

GamePad 🎮

The game is compatible with gamepads.

I'm lying, just remap the gamepad with qjoypad
demo_gamepad.mp4

Features

  • Smooth Gameplay
  • Bot
  • There are no impossible paths in the grass paths (there is always a passage between the trees)
  • Scoring System, which notifies when the maximum score has been achieved

Controls ⌨️ (Keyboard Only)

  • Arrows - Move the player
  • Space - Advances the map without moving the player
  • Esc - Enter Pause mode
  • Enter / Space - Select options within the Menus

Download 📥📲

You can download the game on project's releases.

The goal ⛳️

As you can easily see on the demo, the goal was develop a clone of Crossy Road game with Gloss library from Haskell.

About the Code 🧑‍💻

Trying to bring our past coding knowledge to the project, we tried at maximum modularize the code, and make it as clean as possible. We also tried to use the best practices of the functional programming paradigm.

Getting Started 🚀

Cloning the repository

$ git clone https://github.com/Darguima/Trivial-Road-LI1.git
$ git clone [email protected]:Darguima/Trivial-Road-LI1.git

Compiler

To compile the code you can use cabal:

$ mkdir TrivialRoad -p
$ rm -r ./dist-newstyle/build &> /dev/null
$ cabal build
$ mv ./src/Main ./TrivialRoad/trivialRoad
$ cp ./assets ./TrivialRoad -r
$ cp ./highscore.txt ./TrivialRoad

# Single Command
$ mkdir TrivialRoad -p; rm -r ./dist-newstyle/build &> /dev/null; cabal build; mv ./src/Main ./TrivialRoad/trivialRoad; cp ./assets ./TrivialRoad -r; cp ./highscore.txt ./TrivialRoad

It will generate a TrivialRoad folder that contains all the necessary files for the game to run.

# Linux
$ ./TrivialRoad/trivialRoad

Now you can compress the folder and send it anywhere, without the need to have Haskell on other computers.

Interpreter

You can open the Haskell interpreter (GHCi) using cabal or directly in the interpreter.

  1. With cabal
$ cabal repl
>>> main
  1. With GHCi (on root folder of the project)
$ ghci -i="src" -i="tests" src/Main.hs
>>> main

Tests

This project uses the HUnit library to run unit tests.

You can run the tests using one of the following alternatives:

  1. With cabal
$ cabal test
  1. With GHCi
$ ghci -i="src" -i="tests" tests/Spec.hs
>>> runTestsT1 -- Correr os testes tarefa 1
>>> runTestsT2 -- Correr os testes tarefa 2
>>> runTestsT3 -- Correr os testes tarefa 3
>>> runTestsT4 -- Correr os testes tarefa 4
>>> main -- Correr todos os testes
  1. With the wrapper runhaskell
$ runhaskell -i="src" -i="tests" tests/Spec.hs

Docs

You can generate the documentation with Haddock.

  1. With cabal
$ cabal haddock --haddock-all
  1. With haddock
$ haddock -h -o doc/html src/*.hs

Developed by 🧑‍💻:

trivial-road-li1's People

Contributors

darguima avatar afooonso avatar nelsonmestevao 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.