Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
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 1014 times)
0 Members and 1 Guest are viewing this topic.
Offline Grofit

Junior Devvie

« 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 Devvie

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

Archive (60 views)
2017-02-27 19:41:49

Riven (69 views)
2017-02-27 17:26:59

numerical (439 views)
2017-02-21 07:32:16

numerical (440 views)
2017-02-21 07:31:46

theagentd (554 views)
2017-02-18 13:42:33

theagentd (550 views)
2017-02-18 13:35:16

h.pernpeintner (1725 views)
2017-01-24 22:39:11

h.pernpeintner (1684 views)
2017-01-24 22:38:32

Galdo (2265 views)
2017-01-12 13:44:09

Archive (2183 views)
2017-01-02 05:31:41
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!