Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (532)
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  
  Design patterns for games  (Read 8113 times)
0 Members and 1 Guest are viewing this topic.
Offline Dries

Senior Newbie





« Posted 2010-05-11 16:09:29 »

I'm looking for a good site or pdf that explains different design patterns for games.

I have been looking on the internet, but I can't seem to find a good site that gives a nice overview of the different game design patterns.

Someone here that knows a good source?

Tx.
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #1 - Posted 2010-05-11 16:37:40 »

http://www.cokeandcode.com has a few nice tutorials that might help.
Offline Dries

Senior Newbie





« Reply #2 - Posted 2010-05-12 07:52:02 »

I know this site, it has some nice tutorials.
But it's not what I'm looking for.

I'm looking for a site that has an overview of what design patterns to use to solve certain gaming problems.
Or a site that has an overview of different gaming design patterns.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tom
« Reply #3 - Posted 2010-05-12 09:12:33 »

Don't know of a site, but this book is just what you are looking for:
Game Engine Architecture

Offline Dries

Senior Newbie





« Reply #4 - Posted 2010-05-12 11:14:04 »

Yeah in my search I found this book.
But before I buy a book, that's not in my mother language, I want to be sure the same info isn't out there on the net.
Offline tom
« Reply #5 - Posted 2010-05-12 17:47:14 »

Then your best bet is gamasutra

Offline Dries

Senior Newbie





« Reply #6 - Posted 2010-05-13 12:12:41 »

I found one article about patterns : http://www.gamasutra.com/view/feature/1408/designing_usable_and_accessible_.php

But isn't what I was looking for.

I'm looking for a site that tells you what patterns are best to use in what situation.

A small example :

To implement save games in your game you use best the 'State' design pattern. (Just a random design pattern that I took)
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #7 - Posted 2010-05-13 12:56:53 »

I'm looking for a site that tells you what patterns are best to use in what situation.

A small example :

To implement save games in your game you use best the 'State' design pattern. (Just a random design pattern that I took)

Yeah, you're not going to find that. How you perform (for example) saving, or any other game task is highly dependant on the type of game and the specifics of that game (an RPG is going to require very different saving mechanisms to an RTS, etc.). And high level functionality (like saving) may or may not require the use of multiple patterns in unison.

It sounds like you're treating patterns as some kind of magical holy grail (which often happens to inexperienced programmers who come across patterns for the first time). If you get too hung up on them you'll end up with an over engineered mess and never actually make anything worthwhile.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Dries

Senior Newbie





« Reply #8 - Posted 2010-05-13 13:12:36 »

I'm a Java Developer as profession and work daily in Eclipse with frameworks like spring/hibernate/struts/J2EE/EJB3/WS ...
These frameworks use patterns and we use patterns in our programs.

Before I start programming I want to create an architecture document of my game.
Coding it self is easy once that's oké.

I know that for rpg, rts or fps other mechanics/patterns are used for certain tasks.

That's why I'm looking for a source that explains game designing on an architectural level.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #9 - Posted 2010-05-13 13:18:02 »

Before I start programming I want to create an architecture document of my game.
Coding it self is easy once that's oké.
Big Design Up Front doesn't work well for games (and it rarely works for any other type of programming unless you're doing braindead turn-the-crank CRUD apps).

Just whip up a quick prototype or follow a basic tutorial and go from there. That'll teach you the core update-render loop and set you up for everything else, then you can come back with useful questions we can answer in specifics rather than hand-wavy generalisms.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JL235

JGO Coder


Medals: 10



« Reply #10 - Posted 2010-05-15 23:11:29 »

Big Design Up Front doesn't work well for games (and it rarely works for any other type of programming unless you're doing braindead turn-the-crank CRUD apps).
I disagree. I think good designing works best for apps where it's not straight forward. I mean, if it's straight forward then why bother designing what your planning to do?

I personally have had to write code to solve very complex problems, and managed to avoid hours of coding by sitting down with Word and typing out all the solutions I could make, weighing up pros and cons, and creating diagrams to help explain those solutions. It helped me to find pitfalls early, and so avoid refactoring (or worse when you end up repeatedly refactoring back and forth between multiple solutions). Even if prototyping works better for you, the fact is that designing also works very well for many people and teams around the world. Although just like you can write bad code, you can also make bad designs.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #11 - Posted 2010-05-15 23:57:58 »

I disagree. I think good designing works best for apps where it's not straight forward. I mean, if it's straight forward then why bother designing what your planning to do?

I personally have had to write code to solve very complex problems, and managed to avoid hours of coding by sitting down with Word and typing out all the solutions I could make, weighing up pros and cons, and creating diagrams to help explain those solutions. It helped me to find pitfalls early, and so avoid refactoring (or worse when you end up repeatedly refactoring back and forth between multiple solutions). Even if prototyping works better for you, the fact is that designing also works very well for many people and teams around the world. Although just like you can write bad code, you can also make bad designs.

I'm quite certain just about everybody these days realizes how bad 'waterfall' is. Even at college they teach not to, and that's telling, as education normally lags 10 years behind the best ideas.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #12 - Posted 2010-05-16 02:18:09 »

I disagree. I think good designing works best for apps where it's not straight forward. I mean, if it's straight forward then why bother designing what your planning to do?

That argument works both ways - if it's not straight forward, what makes you think you can come up with perfectly formed design out of your head with no practical feedback?

Extremes of anything are rarely a good idea, and Big Design Up Front / waterfall represents one extreme. Hacking away at code with no thought represents the other. Iterative design/code/test/refactor is the middle ground which is actually practical and delivers results (with greater or lesser amounts of design on each cycle depending on how experienced you are with the problem domain).

The inital post ("i'm new to games programming, tell me what patterns to use") is firmly in the BDUP extreme, and the author's stated experience (big "enterprisey" frameworks) strongly hints at a mindset where architecture is all-knowing and all-powerful, and should be applied regardless of suitability to the task at hand. That kind of thinking leads to something like Jade (10+ years in development, hundreds of classes, lots of abstract factories and interfaces and adapters, and still nothing that even resembles a release or a playable game).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline JL235

JGO Coder


Medals: 10



« Reply #13 - Posted 2010-05-16 10:43:33 »

I'm quite certain just about everybody these days realizes how bad 'waterfall' is. Even at college they teach not to, and that's telling, as education normally lags 10 years behind the best ideas.
I'm not saying everyone should use it, but I've been a part of teams where the Waterfall model has been used successfully.

That argument works both ways - if it's not straight forward, what makes you think you can come up with perfectly formed design out of your head with no practical feedback?
Sometimes you miss large issues just sitting down and coding, until it's really far in. Then you either need to live with a bad design or go back and re-write large sections. Designing first can potentially allow you to highlight those issues and get them solved, earlier. But only potentially.

To help answer the original question, I'm in the mindset that lots of existing technology and design patterns can be applied to games. So I'd recommend just buying a copy of Design Patterns. I personally have applied some of the patterns taught in that book in my own games. For example I often use a Singleton for handling music and sound effects.

Architecture wise; I only have links about multi-threaded architectures. There is a brief overview of three different designs on Gamasutra, another mult-threaded engine on Intel and some slides about Id Tech 5 where towards the end they talk about how they structured their multi-threaded code.

Offline Dries

Senior Newbie





« Reply #14 - Posted 2010-05-16 11:29:34 »

Tx for the links and tip JL235 and next to me I have the Head First : Design Patterns book.

It seems that there is not a really good source, except for the book that Tom has posted.
So I'll have to refactor a bit more while coding :-)





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.

pw (14 views)
2014-07-24 01:59:36

Riven (14 views)
2014-07-23 21:16:32

Riven (13 views)
2014-07-23 21:07:15

Riven (15 views)
2014-07-23 20:56:16

ctomni231 (43 views)
2014-07-18 06:55:21

Zero Volt (40 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (36 views)
2014-07-16 23:30:00

Cero (50 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!