Git Product home page Git Product logo

simplegameclass's Introduction

README

Build Status

A simple Game class project will all inside to provide basics for 2D game framreowkr based on the JDK 19 only.

  • One master class with subclasses to define principle and reduce footprint.
  • No specific java build tool like maven or gradle, but only bash scripts with java/javac JDK commands. any specific dependencies may be store in the lib directory for build or test usage.

build

build.sh 

run

java -jar target/simpleclass.jar

Available CLI arguments & configuration file parameters:

Configuration Argument Type Description
game.size size Dimension define window dimension: (width)x(height)
game.screen.resolution resolution Dimension Define Screen resolution (width)x(height)
game.physic.play.area playarea Dimension Define the physic module play area dimension (width)x(height)
game.physic.gravity gravity Double Define the physic module gravity value 0.981
game.title title String define the title for the game window My Own Title
game.debug debug Integer set the debug information level 0 to 5 where 0 = no info

Any argument can be activated by using the command line option :

java -jar target/simpleclass.jar game.title=ThisIsMyWindow

NOTE

An internal configuration file config.properties is provided into the JAR itself, but you can overload the properties with t a side part my-config.properties file, located at the root place of the JAR file.

path_to_my_jar
|_ simplegameclass.jar
|_ my-config.properties

Now executing the JAR file, default values will be loaded from internal file, and then every key=value from my-config.properties will overload those default values.

A new window running the demonstration game will appear with "ThisIsMyWindow" as title.

A screenshot of the existing demo for SimpleGameClass (SGC)

McG.

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.