Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  Splitting Logic/Rendering  (Read 650 times)
0 Members and 1 Guest are viewing this topic.
Offline Grofit

Junior Member





« Posted 2007-03-02 10:18:37 »

Ever since i started game development ive always tried to split up the logic from the rendering as best i can. However im not too familiar with Java so im not sure entirely how to do it correctly within Java while making the most of OO styles etc...

Ive currently got an "Engine.Objects" package that contains all my objects (logic) and i have a "Engine.Renderer" package that should be used to render everything. Now im not sure which is the best way to do this...

I can send the GL object from the renderer to the given object if needed so it can render itself, but then the Objects are dependant on it being GL and being that specific renderer class.

The other option is that i give the renderer a set of points to draw from the objects, which sounds alot more appealing, but this way the renderer has to be reliant on the objects to know how the objects are formed and stuff.

This sort of stuff has always bugged me, even back in C++ when i was trying to design a decent framework, i got round it there by prototyping the given classes wherever needed rather than directly including them then when they were passed over they knew what to do with them.

Can anyone give any advice on whats the best way to do this sort of thing?
Offline Zig-Zag

Senior Newbie





« Reply #1 - Posted 2007-03-02 11:24:05 »

Maybe you should check Kevs amazing Space Invaders 103 - Refactoring and OpenGL tutorial there he is explaining how to set up different types of renderer.
Offline Grofit

Junior Member





« Reply #2 - Posted 2007-03-02 11:38:33 »

Cheers checking it out at the moment!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (22 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (67 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (55 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (30 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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!