Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  AWTEngine2D WIP | A 2D Engine using only AWT Canvas  (Read 1151 times)
0 Members and 1 Guest are viewing this topic.
Offline zeejfps
« Posted 2014-07-04 08:46:20 »



Game Example:







Hello, I am Zeejfps and I am fairly new to this forums. I have programmed in java for a while now and  I want to share something I have been working on for a few days now. It is a 2D game engine like frame work of sorts. I had attempted this before however this time I think its by far my best, so here goes nothing:

The basic principle of this project is to create a framework / engine that will help out in creating very simple prototype 2D games in java without using any external libraries and then be able to display it in either a JFrame or an Applet.

The basic steps are: you extend a Game class and then do your game logic and rendering in the appropriate methods without having to worry about the game loop or how the rendering works, as well as a couple of helpful classes for loading SpriteSheets, etc...Because the only real way I am able to render without using openGl is using AWT Graphics, the performance is not superb, however I believe I have made it render as fast as it is possible without an external library.

I am still working on all of the java docs and comments any and all criticism will be appreciated and if somebody wants to contribute they can go ahead.

The code as well as examples can be found here: https://github.com/Zeejfps/AWTEngine2D



Update (07/05/2014) :

  • Added toString() and equals() methods to the Vector2 class
  • Added Matrix2 and Matrix3 classes
  • Getting ready to change around the rendering code

Update (07/04/2014) :

  • Finished the Vector2 class
  • Added ability to rotate a Bitmap
  • Created a very simple snake game as an example
Offline wessles

JGO Wizard


Medals: 66
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #1 - Posted 2014-07-04 14:53:21 »

Very good work so far; everything is wrapped around AWT so nicely!

I found some issues by surfing the source and posted them to the Github Issue Tracker.

-wes

Offline zeejfps
« Reply #2 - Posted 2014-07-04 15:38:25 »

Ok thanks for the feedback, I will definitely flesh out the vector2 class today and will add a setFillColor method.

Edit: Finished the vector2 class. I think I have added all the methods you possibly need for a vector class.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2014-07-04 22:43:14 »

Hi

Because the only real way I am able to render without using openGl is using AWT Graphics, the performance is not superb, however I believe I have made it render as fast as it is possible without an external library.
Actually, by default Java2D may use one of its (badly optimized) hardware accelerated pipeline (OpenGL or Direct3D/Direct2D under the hood). I understand you're not a big fan of external libraries but GLG2D contains an optimized implementation of Graphics2D based on JOGL (JogAmp), it might be useful to get better performance with extremely minimal changes.

Offline zeejfps
« Reply #4 - Posted 2014-07-04 22:49:42 »

Hi

Because the only real way I am able to render without using openGl is using AWT Graphics, the performance is not superb, however I believe I have made it render as fast as it is possible without an external library.
Actually, by default Java2D may use one of its (badly optimized) hardware accelerated pipeline (OpenGL or Direct3D/Direct2D under the hood). I understand you're not a big fan of external libraries but GLG2D contains an optimized implementation of Graphics2D based on JOGL (JogAmp), it might be useful to get better performance with extremely minimal changes.

Hmm, its not that I am against external libraries, It is just I thought it would be a lot more fun to try accomplishing this without the use of them.

I know that AWT used some Hardware acceleration for some things but I always thought it was very minimal. I will however take a look at this library as I have never seen it before.
Offline Sickan

Senior Member


Medals: 9



« Reply #5 - Posted 2014-07-04 23:46:10 »

Thank you for linking this, I had no idea it existed.
Offline zeejfps
« Reply #6 - Posted 2014-07-05 00:26:13 »

Added a snake game I made real quickly, its far from perfect but should provide a good basic example of how to use all of the engine's / framework's features.

Need ideas to what I should add, Really I think its mostly complete, other then a few more comments here and there.
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (12 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (27 views)
2014-08-22 19:31:30

atombrot (40 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (34 views)
2014-08-16 06:22:17

Tekkerue (24 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!