Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (670)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: drawing images and rotating with JOGL on: 2009-12-25 21:08:24
excellent, thanks!
2  Java Game APIs & Engines / JOGL Development / drawing images and rotating with JOGL on: 2009-12-02 18:10:30
All my images are PNG format.  I've gotten to the point where I can draw these images using gl.glDrawPixels().  I generate all the byte[] buffers upon load of the game, however this itself isn't adequate if I want images rotated during the game.  What is the best way to implement this?

1) Use Java2D to apply AffineTransform rotation to image and then produce byte[] for each frame.  Seems like this add a lot of overhead, especially with 60+ fps.

2) Use Textures?  I'm wondering if I convert an image to texture if JOGL can do the rotation for me.

3) Any other ideas?

3  Game Development / Game Play & Game Design / Creating Additional Derby Databases During Game on: 2009-07-02 07:24:32
I'm writing a simple text adventure game.  I have a master database that I populate by running an SQL script with the 'ij' tool.  This is fine for creating the master database for my application.  My intent, when the user creates a new game, is to create a duplicate database in a unique directory for that game, and then populate the DB to match the master schema.  So each game will have its own database based on the master db.  I'm not sure the best way to do this.  Is this a valid approach?  I tried creating a windows script that java could reference to run my SQL script to populate a new database, but the windows script can't execute any commands after the "ij" tool starts.  Alternatively, I could just create the entire DB schema using SQL statements within a java object, but that seems really obtuse.  Any ideas?  How do they handle this in other games?

*** To avoid confusion:  I know how to "create" a new database with Java, just not how to populate it without using SQL statements.

4  Game Development / Game Play & Game Design / Re: Executing logic outside "game loop" thread on: 2009-02-18 19:55:21
Thanks for the replies guys.  I'm not sure I would get any concurrent access modification errors because I never explicitly iterate over a collection.  The drawing is done through for-loops on a master array.  All logic accesses the object to-be-modified directly, no iterators.  I went ahead and piped the mouse input into the game loop anyways though, where logic is now being processed at the FPS. 

The mouse clicks feel slightly more responsive now that I am intentionally checking for them at my FPS rate, so that is a good thing!
5  Game Development / Game Play & Game Design / Executing logic outside "game loop" thread on: 2009-02-18 01:27:28
I've set up a turn based strat game that relies solely on mouse clicks from the user.  I have a main loop that merely draws the world, then sleeps for the excess time.  This same runnable object that contains the loop also is the mouse listener.  When the mouse listener gets an event, it relays the event down to the main "game logic" class to perform some calculation... however this is done on the fly and totally independent from the main loop.  Is this a dangerous way to design the game despite only having very isolated moments of working game logic?

Another slightly related question is using Thread.sleep(excess time) vs. Thread.yield() and if one would hurt the Event Dispatching Thread "liquidity" more than the other.  I've been using Thread.yield() and it kills any machine I run the game on.  Thread.sleep() however barely uses any processor so I'm inclined to use it instead especially if there is no disadvantage.

6  Game Development / Game Play & Game Design / Re: Hexagon board on: 2009-01-28 20:31:44
I'm planning on large (1000+) hex maps, so iterating through them is definitely not an option.  Like you said,  I'll probably index the hexagons in an array so they map quickly to pixels, but then use the link mappings for movement.  I was just wondering if there was a clever way of using the "link" method for all of my needs Smiley
7  Game Development / Game Play & Game Design / Re: Hexagon board on: 2009-01-28 18:44:51
If you establish the hex grid solely through linking from a central spot, can you still do pixel - hex coordinate conversion for mouse events and such?  What about finding the viewable hexes for efficient drawing?
8  Game Development / Newbie & Debugging Questions / Re: Creating an advanced text log... on: 2008-06-17 21:58:20
Thanks, this will work fine!  If the document object gets very large (like 1000+ lines of text), will the program slow down noticeably each time i add text and reset the document in the textPane?
9  Game Development / Newbie & Debugging Questions / Creating an advanced text log... on: 2008-06-17 19:57:44
Hello everyone, I am trying to create a text log that updates throughout gameplay with meaningful information.  I've already done this before using a JTextArea, but this time I want the log to display different fonts/colors/sizes, not just one font for the whole thing.  I've spent hours trying to figure out how to do this with the JTextPane or JEditorPane but I am getting confused and frustrated trying to figure out if I need to have a seperate document etc...  is there a simple way to do this???

10  Game Development / Newbie & Debugging Questions / Re: Storing Images for a Tile Map on: 2008-02-28 16:16:46
Awesome... never though to of the array thing.  so each idex in the array corresponds to the index of map
  • [y].  I'm just using a BufferedImage[ ] array at this point.  Is that the simplest array to use (as opposed to a Vector or ArrayList?).  Thanks everyone again for the fast help!
11  Game Development / Newbie & Debugging Questions / Re: Storing Images for a Tile Map on: 2008-02-28 05:53:48
I don't plan on having more than one type of terrain, and the tiles are 25x25 pixel png's.  I'm also wondering how to get around my paintComponent method looking like:

  • [y]==1) {
    g.drawImage(trees, x, y...)
  • [y]==2) {
   g.draw Image (rock, x,y...

.if (map
  • [y]==100) {

Is this the only way to do it really?
12  Game Development / Newbie & Debugging Questions / Storing Images for a Tile Map on: 2008-02-28 02:08:29
Right now I have a class that draws a tile map.  It has about 10 different BufferedImage objects that are defined in the class.  All the images are stored in a folder on my computer.

BufferedImage Img1 = ...C:/path/img1.bmp
BufferedImage Img2= ...C:/path/img2.bmp

The thing is, I"m going to have over 100 images by the time the game is complete.  Is it normal/standard to have 100+ BufferedImages defined in the field above the constructor in a given class?  Once the images are initialized as the program is loaded, will it have any hinderence on performance during map scrolling later on?

13  Game Development / Newbie & Debugging Questions / Re: Representing pieces in a 2d tile game on: 2008-02-18 17:52:49
Great, thanks everyone for the advice.  Very helpful and much appreciated Smiley
14  Game Development / Newbie & Debugging Questions / Re: Representing pieces in a 2d tile game on: 2008-02-15 22:11:25
hm.... ok.  So perhaps I should have a JFrame that goes through a list of all the units and redraws the "unit layer" each time a piece moves, and so each piece is actually based on a non-swing class?
15  Game Development / Newbie & Debugging Questions / Representing pieces in a 2d tile game on: 2008-02-15 17:18:57
Hello all, I'm relatively new to Java and I'm developing a 2d, turn-based, military strategy game.  I have a layered pane that holds the terrain tiles at the first level, the grid at the next level, and I have a bunch of Jpanels on the 3rd level representing the game pieces.  These Jpanels are invisible except for an icon that they load that shows what the unit is.  Is this the best way to do this, using JPanels to represent the pieces?  I plan on having 100+ on the board at a time, and I'm not sure if this is an inefficient way to accompish something that has been done a million times over already by others Smiley  Thanks in advance!

Pages: [1]
IanParcs (35 views)
2016-04-18 14:18:53

KaiHH (35 views)
2016-04-18 08:35:41

KaiHH (66 views)
2016-04-15 12:43:58

theagentd (66 views)
2016-04-14 02:16:17

theagentd (73 views)
2016-04-14 02:15:43

IanParcs (66 views)
2016-04-12 03:51:16

IanParcs (36 views)
2016-04-12 03:50:03

IanParcs (32 views)
2016-04-12 03:49:54

IanParcs (29 views)
2016-04-12 03:49:52

IanParcs (36 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 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!