Giter Site home page Giter Site logo

connect3d's Introduction

Connect3D

Connect3D is a simple 4 in a row game. The objective is to make four in a row with your pieces, while preventing other players from doing the same. Connect3D offers 2 - 4 player games and the ability to set the size of the board.

It follows a traditional Model View Controller architecture. Connect3D has three different views.

view description
Text Displays the game using the console, accepts text based input.
Software Displays the game using Java Swing. Uses mouse based input.
Hardware Displays the game using OpenGL. Uses mouse based input.

How to run

I currently do not know how to package Connect3D's dependencies into a runnable jar file.

As such this is how you can set up an Eclipse project to run Connect3D.

  1. First clone the source files into an Eclipse project.
  2. Connect3D uses LWJGL v3.3.0 to access OpenGL. The download page for lwjgl is here the Minimal OpenGL preset should be sufficient. Ensure the JOML Addon is selected (JOML version 1.10.3). Use the ZIP Bundle mode. Select your platform in the Natives section.
  3. This excellent resource explains how to configure Eclipse to use LWJGL.
  4. When Eclipse has been configured to use LWJGL you can run the Main method from Connect3DMain package.

Game controls

To place pieces when using the Software renderer, click in the grid that is drawn to the screen. Hovering the mouse over the grid will show you where the piece will be placed. Use the right mouse button to pan around the board.

When using the Hardware renderer, move the mouse to the column you want to place a piece in. The right mouse button can be dragged to pan around the board. The backspace key toggles the debug view that shows possible piece placements. Scroll up or down to zoom in and out.

Acknowledgements

connect3d's People

Contributors

budgiepanic avatar

Stargazers

 avatar

Watchers

 avatar

connect3d's Issues

Game shows user where their next piece will be placed

By moving the mouse around the window, the user selects where they want their next piece to be placed.
Before placing a piece, the game should show where it would be placed by rendering an extra piece where it would be placed.

update readme

Add how to run instructions
Add licensee
Add sources/citations
Add screenshots

Hardware renderer crashes in Main class

In Main class, program crashes when trying to initialize Hardware renderer with the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/Version
at connect3DRender.HardwareRenderer.initialize(HardwareRenderer.java:83)
at connect3DGame.Game.(Game.java:55)
at connect3DMain.Main.main(Main.java:57)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.Version
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 3 more

The exact same code works absolutely fine when the main method is moved to a different file, which makes this a very confusing error indeed.

Fix Text rendering

TOP BACK and RIGHT do not display the game correctly.
However, FRONT and LEFT do display correctly.

Rotate input grid when user pans

This feature would be cool, but converting screen space mouse click coordinates back into (x,z) board coordinates will probably be a pain.

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.