Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
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  
  Event driven games  (Read 1309 times)
0 Members and 1 Guest are viewing this topic.
Offline K.I.L.E.R

Senior Devvie

Java games rock!

« Posted 2005-03-27 07:10:00 »

Well after reading books everyone of those books kept bugging me to use events vs manual in game polling.
I have done some re-reading of events and then read some more on custom events. I still don't get some things and how they apply to games development.

So I'm starting to use events.
I have worked out how custom events, could someone tell me if this is a good generic model for game based events?

I really would like more insight on event driven coding in games.
For example, how would I implement collision detection under such a model?

Personally I really wonder how many events are needed and how big of an issue would it be to keep track of.

Wouldn't events make my game loop useless?
Technically speaking all I need is a single event in my main method which just yields or exits.

Can someone please provide some insight on how events should be used to make the development process as clean and understandable as possible?


Is there a name for a "redneck" programmer?

Unemployed. Wink
Offline tom
« Reply #1 - Posted 2005-03-28 01:02:30 »

The following link has some thoughts about event driven games:

What kind of game are you making?

Collision detection would be handled by adding an event for the next time the entity needs to be updated. For many games this is every frame. Then you need to add an event that will be triggered the next frame. Events are benefitial if your game updates the entites rarely, and there are many entites. In any other case it just makes it more complicated.

You will keep your game loop, but instead of a "updateAll" call you'll have a "updateEvents" call.

Offline K.I.L.E.R

Senior Devvie

Java games rock!

« Reply #2 - Posted 2005-03-29 00:01:11 »

The game framework is supposed to be able to handle real time games and turn based.
It's supposed to be able to handle anything.

Thanks for the info.

Is there a name for a "redneck" programmer?

Unemployed. Wink
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Riven (26 views)
2015-07-27 22:08:00

Riven (16 views)
2015-07-27 21:05:20

Riven (20 views)
2015-07-27 17:56:13

Riven (10 views)
2015-07-27 17:53:39

BurntPizza (27 views)
2015-07-25 05:44:37

BurntPizza (39 views)
2015-07-25 03:36:39

BurntPizza (22 views)
2015-07-24 11:36:53

NoxInc (25 views)
2015-07-23 03:46:53

NoxInc (17 views)
2015-07-23 03:43:39

Jesse (39 views)
2015-07-22 08:40:36
List of Learning Resources
by gouessej
2015-07-09 16:59:36

How Do I Expand My Game?
by bashfrog
2015-06-14 17:04:43

List of Learning Resources
by PocketCrafter7
2015-05-31 11:07:30

Intersection Methods
by Roquen
2015-05-29 13:49:33

List of Learning Resources
by SilverTiger
2015-05-05 15:50:32

How to: JGO Wiki
by Mac70
2015-02-18 02:26:16

2D Dynamic Lighting
by ThePixelPony
2015-01-02 01:55:42

How do I start Java Game Development?
by gouessej
2014-12-28 01:11: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!