Giter VIP home page Giter VIP logo

gamearena's People

Contributors

adclarky avatar comqdhb avatar finneyj avatar johnn333 avatar kmatthewmarsden avatar scotek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gamearena's Issues

GameArena.exit()

If I use .exit() method window does not close but everything just freezes

Movement of the rectangle delayed on Mac OS

The rectangle is not responding properly to the up/down button pressing. It is delayed or doesn't move at all.

Tested on Linux Ubuntu, the exact same program works properly.

This code is used to execute movement:

public void goUp()
    {
        if(rectangle[0].getYPosition() > 0)
        {
            for (int i=0; i<3; i++)
            {
                rectangle[i].setYPosition(rectangle[i].getYPosition() - moveStep);
            }
        }
    }

    public void goDown(GameArena map)
    {
        if((rectangle[2].getYPosition()+rectangle[2].getHeight()) < map.getArenaHeight())
        {
            for (int i=0; i<3; i++)
            {
            rectangle[i].setYPosition(rectangle[i].getYPosition() + moveStep);
            }
    }
        
    }

In main this is the mapping for the up and down pressing:

  //move player
            if ( map.upPressed() ) car.goUp();
            if ( map.downPressed() ) car.goDown(map);
            
            map.pause()
           

MacOs ver: 10.15.2
java 13.0.1 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

Missing the function for adding background images

After looking through the GameArena files provided, I realised there does not seem to be a function for adding a background image as said in the coursework information (for Carom).

Hopefully this can be fixed.

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.