finneyj / gamearena Goto Github PK
View Code? Open in Web Editor NEWA simple OO 2D graphics package for teaching Java porgramming
A simple OO 2D graphics package for teaching Java porgramming
If I use .exit() method window does not close but everything just freezes
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)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.