Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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  
  Looking for help (2D Java)  (Read 2046 times)
0 Members and 1 Guest are viewing this topic.
Offline RooKee

Senior Newbie




Java games rock!


« Posted 2005-01-28 04:58:26 »

Hey guys...

I am programming Java since 5 month. I have experience in Php, SQL und C++. But I need some help to start a game. I had written 2 browsergames, but this was easy to handle with graphics. Just loading new images and so on...

But in Java it is not so easy. I am looking for an tutorial to programming games in java. Does anybody have so a tutorial?
Online kevglass

JGO Kernel


Medals: 172
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2005-01-28 05:19:17 »

To blow my own trumpet, you might take a look at:

http://grexengine.com/sections/externalgames/articles/Kevin%20Glass-Space%20Invaders%20101-1.html

Kev

Offline RooKee

Senior Newbie




Java games rock!


« Reply #2 - Posted 2005-01-28 05:27:12 »

oh, cool.

Thanks for the tutorial.

But I am looking for a game tutorial like http://www.puzzle-piraten.de/ . This is a funny game. But how did it realised???

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online kevglass

JGO Kernel


Medals: 172
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #3 - Posted 2005-01-28 05:46:26 »

Ah Puzzle Pirates! Its essentially the same technology just more so.

Kev

Offline RooKee

Senior Newbie




Java games rock!


« Reply #4 - Posted 2005-01-28 12:04:45 »

Realy?

But how does it work with the graphics... if anybody goes 2 steps right. Must the screen complete repaint?

And does they use a database or how could the player communicate?

I programmed browsergames, but that was easy. I just read the database or update the database. Functioned that similarly?

Sorry for the bad english, i come from germany...  Cry
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #5 - Posted 2005-01-28 12:22:39 »

Quote
But how does it work with the graphics... if anybody goes 2 steps right. Must the screen complete repaint?


Some older games (a long, long time ago, in a galaxy far, far away...) used what's called "Dirty Rectangle" painting, which amounts to redrawing only the areas that have changed. This worked okay for large areas where only a little bit changed. However, when you add in scrolling, special effects, cool text popups, etc., it just gets easier to repaint the entire screen. Modern hardware has more than enough horseypower to do it, so don't fret full screen repaints.

Quote
And does they use a database or how could the player communicate?


How do you mean? They probably have a database to keep track of players, stats, and other persistent information, but actual communication is probably done in a client/server fashion.

Quote
I programmed browsergames, but that was easy. I just read the database or update the database. Functioned that similarly?


Sort of. The difference is that you really need to develop your own client server protocol (or purchase a $$$ package to do it for you).

Quote
Sorry for the bad english, i come from germany...  Cry


It's okay. As long as you take the time to do the translation as best as you can, we'll happily work with you. :-)

Java Game Console Project
Last Journal Entry: 12/17/04
Offline RooKee

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-01-29 05:52:29 »

With the communication, I just mean for example

a player write a message to an other player. Then must it INSERT into a database and then I must read for example every second if the player has a new message or how does it work?
Offline KONI

Junior Member




Java games rock!


« Reply #7 - Posted 2005-01-29 06:53:35 »

well this is more a Networking problem than rather a Design Problem.

Normally, you have outgoing messages queues, a Thread sending messages and a Thread receiving them (or with NIO a single thread does both) and then you just add the message to the respective Player Queue.
Offline RooKee

Senior Newbie




Java games rock!


« Reply #8 - Posted 2005-01-29 08:27:03 »

Yes, but normaly its a database. Because it is easy and you can see what player write and control if anybody write bad thinks about other players...

Ok, thanks for the good answers...
Offline gojira

Senior Newbie




Java games rock!


« Reply #9 - Posted 2005-01-29 14:55:55 »

Quote
With the communication, I just mean for example

a player write a message to an other player. Then must it INSERT into a database and then I must read for example every second if the player has a new message or how does it work?


In short, -->** NO!! **<--

For the longer answer, go here.  Ignore the section on multicasting, it's not well supported by the internet.

You want to use client-server in addition to a database (ie, use both).  The database is used for persistent information.  That is, information that stays around after they are logged off.  User-name, password, level or how many points they have, location, etc.  The server relays temporary messages (stuff that could be lost with out consequences if they disconnected suddenly).  Text messages, X-Y movement on screen, a challenge to play a contest, etc. all should be handled by the server, not a database.


For more information, the whole tutorial is here.
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.

Pippogeek (40 views)
2014-09-24 16:13:29

Pippogeek (31 views)
2014-09-24 16:12:22

Pippogeek (21 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (29 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (43 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
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!