Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
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  
  Whats the best startup code for a java2d game ?  (Read 2025 times)
0 Members and 1 Guest are viewing this topic.
Offline zingbat

Senior Duke




Java games rock!


« Posted 2003-05-01 22:50:55 »

Well you know:

- Setting up full screen

-  Quering and allocating the right buffers (after setting full screen)

- Setting up the events to dismiss all those swing and awt unnecessary stuff

- building the right class and callback methods and swap buffers at the right times

- setting up the right game cycle:
setup, (read input, process input, render and swap buffer)*, cleanup and exit

Any idea on the best way to do this ?
Offline mill

Junior Duke




popcorn freak


« Reply #1 - Posted 2003-05-02 09:33:03 »

this might get you up and running http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=share;action=display;num=1036791657


Offline zingbat

Senior Duke




Java games rock!


« Reply #2 - Posted 2003-05-03 10:06:31 »

Quote


That looks good thanks.

As anyone tried to do a 2d scene graph ?

Are there any alternatives for the game interface instead of using awt (i mean for the requirements of 2d game ) ?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JuddMan

Senior Duke


Medals: 1


Your Ad Here


« Reply #3 - Posted 2003-05-04 04:41:39 »

if you're going to use that windowed BufferStrategy example and do it like that, i dont think you can use AWT or Swing components.

With a bit of planning you can make your own classes that manage how the various sprites/tiles/GUI stuff display.

by 2d scene graph i assume you mean a tile map?

it's not hard to do. Easy way is to have a 2d Tile[][] array (you've probably already done this) and in a double for loop, do something like drawImage(tile[j], i*32, j*32, null) (if your tiles are 32x32)

for scrolling tile maps and ones that are larger than the screen you'll have to make a minor alteration that paints only those tiles that are visible to save on processing power, and just use an X offset and a Y offset, for example, to adjust the location of the tiles.

if you need more detail, just ask.
Offline Abuse

JGO Knight


Medals: 13


falling into the abyss of reality


« Reply #4 - Posted 2003-05-04 10:36:55 »

A 2D scene graph is far more than a simple tile map.

I've never come across 1 myself - but then again - i've never looked.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline zingbat

Senior Duke




Java games rock!


« Reply #5 - Posted 2003-05-06 18:32:48 »

My idea of a 2d scene is something similar to the java3d scene graph but with a 3rd coordinate for z ordering of sprites (in screen coordinate system).

I think that having some sort of behaviours like in java3d would be could and maybe 2d  positional sound.

It would have have tiles of course, but in a sort of Tile node and probably the possibility for several projections (isometric , top, front, side) to view the maps.

The 2d interface would be a part of the 2d scene graph.

Anyway I have to think better on this since nobody has ever done anything similar for what I have been able to search in the net.
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.

theagentd (18 views)
2014-10-25 15:46:29

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (45 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!