GithubHelp home page GithubHelp logo

echo82 / gprocessing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from athaun/gprocessing

0.0 1.0 0.0 124.05 MB

Gprocessing is a simple java graphics library built on top of LWJGL, modeled after the processing library, but with an emphasis on performance

License: MIT License

Java 97.40% GLSL 2.60%

gprocessing's Introduction



Gprocessing

Lightweight 2D java game engine
Explore the docs »

Features · Report Bug · Request Feature

Table of Contents

About The Project

Originally inspired by the Processing 3 graphics library, Gprocessing is easy to use, but also fast.

  • Modern OpenGL through the LWJGL 3 library for fast GPU rendering.
  • Entity Component System
  • Dear ImGui bindings

This is the first game built using Gprocessing, it is a fully functional breakout clone, which I wrote in only three hours. screenshot

Built With

Code Samples

BoilerPlate Code:

public class Main extends Scene {
	
	public void awake() {		
		camera = new Camera();
	}

	public void update() {
		background(255, 255, 255); // Sets the clear color
	}
}

Simple example with sprites

public class Main extends Scene {
	
	GameObject greenRectangle = new GameObject(new Transform(600, 230, 50, 50), 1);
	GameObject mario = new GameObject(new Transform(600, 200, 50, 50), 2);
	
	public void awake() {		
		camera = new Camera();
		
		greenRectangle.addComponent(new SpriteRenderer(new Color(0, 255, 0, 255))); // Creates a new green sprite component
		mario.addComponent(new SpriteRenderer(new Sprite(Assets.getTexture("src/assets/images/marioSprite.png"))));	// Loads the image from the filesystem into a sprite component
	}

	public void update() {
		background(50, 50, 50); // Sets the clear color
	}
}

Simple example with Dear ImGui

public class Main extends Scene {
	public void awake() {		
		camera = new Camera();
	}

	public void update() {
		background(50, 50, 50);
	}

	public void imgui () {
		ImGui.begin("Demo Window");
		ImGui.text("Hello World");
		ImGui.end();
	}
}

Prerequisites

  • OpenGL capable graphics card (minimum core 330)
  • OpenGL capable graphics driver
    • Linux nouveau drivers for nvidia cards do not currently work, you will have to install proprietary drivers.
    • FOSS AMD Drivers for linux do work.

Installation

You can find additional instructions in the Wiki.

Clone: git clone https://github.com/athaun/Gprocessing.git open Eclipse, and select import project.

  • Eclipse: Select the run icon > Run As > 1 java application

  • Intellj: you might have to provide a VM option in the build configuration -Dimgui.library.path=libary/LibImGuiBinaries

Documentation

Milestones:

+ 5.1.2020 Started the project
+ 6.2.2020 begin convert to modern OpenGL
+ 6.23.2020 Entity Component System
+ 8.14.2020 Added ImGui
+ 9.21.2020 Fixed imGui input callbacks
! 9.21.2020 Created First game using the Engine!

Known Issues

+ Dynamic window resizing doesn't work correctly
+ Transperancy issues on windows

License

Copyright (c) 2020 Asher Haun MIT License See LICENSE for more information.

Contact

Discord: Asher#6411

Credits

gprocessing's People

Contributors

athaun avatar

Watchers

James Cloos 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.