Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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  
  Geting started in game programming  (Read 5664 times)
0 Members and 1 Guest are viewing this topic.
Offline leon945

Senior Newbie





« Posted 2010-05-05 03:49:39 »

Hello ppl,

As the title states, i want to get started in game programming, and since i already know java, i thought it would be a good idea to start with it.
I obtained a copy of the book Black Art of Java Game Programmig, but i read somewhere on the net that it is no good.

What i need basically are design ideas..i mean.. i really dont know what parts a game must have (in code), i have a vague idea, as in.. there should be a thread that takes care of painting, another for moving.. or something like that.. as you can see, i really dont know..

Can anyone point me in the right direction?
A good book or tutorial for this.. my objective right now are 2D games.

thanks in advance
Offline adon_y_coya

Senior Newbie





« Reply #1 - Posted 2010-05-05 09:06:49 »

Kev's coke&code is the best place to start imho.

http://www.cokeandcode.com/tutorials
Offline williamwoles

Junior Devvie


Medals: 4



« Reply #2 - Posted 2010-05-05 09:37:06 »

After 2 years of thinking(I didn't got time to implement because of university) how the things work and 1 year implementing these things I still found that "Killer Game Programming In Java" book could save me tones of time if I had bought it earlier. I advice you to take a look.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ddyer
« Reply #3 - Posted 2010-05-05 09:38:28 »

I recommend you start with familiar ground - pick the game you want to implement,
or at least the one you want to be like.
Offline leon945

Senior Newbie





« Reply #4 - Posted 2010-05-05 12:28:24 »

thanks for the answers!

ddyer: the kind of game i would like to program is a point and click type of game, like the games seen with ScummVM.

Offline Tobias

Junior Devvie


Projects: 1



« Reply #5 - Posted 2010-05-05 19:41:00 »

Use this: http://www.interactivepulp.com/pulpcore/

It's lovely.

Mad Skills Motocross
Turborilla - independent game developer
Offline leon945

Senior Newbie





« Reply #6 - Posted 2010-05-05 22:03:10 »

thanks!
although i think im gonna try and make my own engine..
i want to see what it really takes to make a game.
Offline williamwoles

Junior Devvie


Medals: 4



« Reply #7 - Posted 2010-05-05 23:04:16 »

Well, point and click won't be very hard to implement.. Just friendly advice think twice on the things you are going to add to game engine, rewriting code sx Tongue, better think twice, draw on paper and after implement..
Offline Nate

« JGO Bitwise Duke »


Medals: 167
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #8 - Posted 2010-05-05 23:14:28 »

Trying to write an engine before understanding how games are written is probably the hardest path. Better to first write some simple games using existing engines.

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #9 - Posted 2010-05-06 00:13:30 »

Trying to write an engine before understanding how games are written is probably the hardest path. Better to first write some simple games using existing engines.
I don't necessarily agree with this. There's a pretty hefty learning curve learning most engines, too. And Java2D, for its part, is very simple and easy to learn (and most people who learned Java learned Java2D along with it). Obviously he shouldn't spend all his time making an engine at this point, but doing his own simple game loop and drawing and mouse handling will teach him a lot of important things.

See my work:
OTC Software
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline williamwoles

Junior Devvie


Medals: 4



« Reply #10 - Posted 2010-05-06 01:59:26 »

Trying to write an engine before understanding how games are written is probably the hardest path. Better to first write some simple games using existing engines.

With such few experience in game programming(around one year) I also probably would disagree. My first project(which I'll post in few weeks in show case or reopen the old topic) was a quite complete game engine with java 2D animations and distributed system to host the game rooms and an orchestrator server in case I'll need to add more machines.. I would say, I have learned programming games from zero... just observing already made games and thinking how the things could be implemented, the best way of implementation of these things.. I think essential in learning game programming is observing and thinking how the things are working and can be done..
Offline leon945

Senior Newbie





« Reply #11 - Posted 2010-05-06 02:58:55 »

good advice all around!
i think ill start with the tutorials at cokeandcode

Smiley
Offline JL235

JGO Coder


Medals: 10



« Reply #12 - Posted 2010-05-06 12:32:32 »

Just my two cents, but I have a very different view to what others have suggested.

thanks for the answers!

ddyer: the kind of game i would like to program is a point and click type of game, like the games seen with ScummVM.
The mainloop structure can typically be applied to any game, from Tetris to Crysis. The difference is just the amount of stuff happening whilst it's painting and updating.

However IMHO point and click is one of the few game genres which really don't match that structure as well. It's very innefficient to use a mainloop for games which don't update or paint constantly (like most point and click titles). Secondly a point and click is far more GUI oriented then most games; buttons and application style mouse interaction are more central to how users interact. That is why I would recommend building this as a conventional event-driven Swing app rather then using a mainloop.

Most point and clicks also use their own domain specific language for scripting the game and it's events (i.e. the text and options to display when characters are clicked on) as it can speed up development by reducing the amount of code needed to be written and by loading/reloading scripts at runtime. This is usually one of the main aspects as this is used to build the actual content to the game itself. So I would advise looking into lexical analysers and grammars, such as JFlex and CUP, as you'll almost certainly need to roll your own point and click DSL.

For research I'd look into the scripting langauges used by Scumm and other point and click engines as a basis. See what works well, what doesn't, which bits you'll need and which bits you don't want. Then I'd find a book on building parsers in Java, but would advise one that is not game oriented (most game oriented ones just skim over how to embed existing languages).

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #13 - Posted 2010-05-06 13:14:45 »

Those are good points. However, a game loop could still be useful (for things like animations) and I don't think he needs to worry about being wasteful at this point. Similarly, trying to implement sn external scripting language in order to gain a few ultimately unimportant benefits is probably too much work at this juncture. He probably just needs to getsomething done rather than doing it perfecty or the best way.

See my work:
OTC Software
Offline ewjordan

Junior Devvie





« Reply #14 - Posted 2010-05-29 19:02:38 »

For research I'd look into the scripting langauges used by Scumm and other point and click engines as a basis. See what works well, what doesn't, which bits you'll need and which bits you don't want. Then I'd find a book on building parsers in Java, but would advise one that is not game oriented (most game oriented ones just skim over how to embed existing languages).

I would recommend against this until you're sure you'll need it.  If you don't know a lot about creating languages, you're going to waste a whole lot of time and end up with a very weak DSL that you have to fight tooth and nail to add any sort of normal scripting feature to.  Plus, that's a potential lifetime-long time-sink that you might get sidetracked thinking about, whereas you don't really need much to specify a game.

If you do really need scripting, Java 6 has a Javascript engine built in (javax.scripting, or look up Mozilla Rhino, which you can drop in as a .jar to a Java 5 project, it's almost exactly the same engine), and it's extremely simple to use once you know a bit of Javascript (plus, it performs well).  I would try to go as far as you can using that before designing your own thing, lately I've been using it for everything under the sun because it integrates so easily.  The functional programming abilities in Javascript make it very well suited to scripting behaviors, and it's also very easy to find people that know Javascript if you end up wanting to get other people to design levels for you, whereas getting people to learn a home-rolled DSL is an uphill battle.
Offline leon945

Senior Newbie





« Reply #15 - Posted 2010-05-29 19:13:16 »

thanks!
i know a bit of javascript myself..
although ive mostly used it in web applications.

right now im making a game, not the one i intended, which was the point and click, but i've been learning some really useful things
Offline JL235

JGO Coder


Medals: 10



« Reply #16 - Posted 2010-05-29 20:20:00 »

If you do really need scripting, Java 6 has a Javascript engine built in (javax.scripting, or look up Mozilla Rhino, which you can drop in as a .jar to a Java 5 project, it's almost exactly the same engine), and it's extremely simple to use once you know a bit of Javascript (plus, it performs well).  I would try to go as far as you can using that before designing your own thing, lately I've been using it for everything under the sun because it integrates so easily.  The functional programming abilities in Javascript make it very well suited to scripting behaviors, and it's also very easy to find people that know Javascript if you end up wanting to get other people to design levels for you, whereas getting people to learn a home-rolled DSL is an uphill battle.
Contrary to what I said, I second this suggestion. You only need to put in 10% of the effort to get 90% of what I was thinking.

There is also beanshell which can also be used for scripting within Java apps. AFAIK the beanshell language is essentially Java, but can also allow the programmer to write dynamic code.

Offline ewjordan

Junior Devvie





« Reply #17 - Posted 2010-05-30 23:43:01 »

There is also beanshell which can also be used for scripting within Java apps. AFAIK the beanshell language is essentially Java, but can also allow the programmer to write dynamic code.

Beanshell is also great, and is likely to make it into J2SE eventually as an official javax.scripting language (http://weblogs.java.net/blog/pat/archive/2005/05/jsr274_standard_1.html), it's definitely worth looking into.  It's a bit behind the latest versions of Java (it's creeping towards 1.5 syntax compatibility right now), but it does the trick.  There's also something very nice about scripting Java using something very close to Java instead of an unrelated language.

That said, Javascript has some real advantages, too, mainly that it's very easy to create level specifications in Javascript that avoid the boilerplate code you'd need in Java - as long as you're using it for simple things and not serious coding, it can offer a huge productivity boost.  When you're not using Javascript in the browser, it's actually a pretty nice language for some tasks.
Offline fletchergames

Senior Devvie





« Reply #18 - Posted 2010-06-05 17:12:25 »

After 2 years of thinking(I didn't got time to implement because of university) how the things work and 1 year implementing these things I still found that "Killer Game Programming In Java" book could save me tones of time if I had bought it earlier. I advice you to take a look.
"Developing Games in Java" is another good one.

And, yes, "Black Art of Java Game Programming" is garbage.
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (335 views)
2018-11-16 13:46:03

hadezbladez (177 views)
2018-11-16 13:41:33

hadezbladez (336 views)
2018-11-16 13:35:35

hadezbladez (81 views)
2018-11-16 13:32:03

EgonOlsen (2175 views)
2018-06-10 19:43:48

EgonOlsen (2203 views)
2018-06-10 19:43:44

EgonOlsen (1376 views)
2018-06-10 19:43:20

DesertCoockie (2008 views)
2018-05-13 18:23:11

nelsongames (1646 views)
2018-04-24 18:15:36

nelsongames (2297 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!