Giter Site home page Giter Site logo

jarkanoid's Introduction

Jarkanoid

A Java/JavaFX based Arkanoid version

Motivation and thoughts

I really like JavaFX - it's fun. Using Timelines, Animations, Property Binding and FXML makes it easy to build any kind of grafical user interface, even for games.

I tried to stick to the JavaFX flavor of the MVC pattern (powerful FMXL injected Controller which knows Model AND View) for this.

After being nearly feaure complete I'm not as convinced as before anymore that MVC is a good pattern for JavaFX for games with grafical "shapes". It would be much easier to use the JavaFX Shapes and their properties directly instead of replicating them in a model, e.g. JavaFX shapes have intersect() method which is quite convienient for collission detection.

The better pattern would propably be a classical GameLoop pattern (GameLoop -> (processEvents, updateWorld, renderFrame). Although I do also have a game loop pattern in place it updates only model objects. The model then uses property bindung and the Observer pattern to update the view.

The GameLoop pattern would also have made the code easier to understand and would probalby have avoided many lines of code compared to the MVC pattern.

jarkanoid's People

Contributors

frankkopp avatar snyk-bot avatar

Stargazers

 avatar

Watchers

 avatar  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.