Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
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  
  Transforming 2D Tiles  (Read 1254 times)
0 Members and 1 Guest are viewing this topic.
Offline psiegel

Junior Devvie

Adamant about gaming.

« Posted 2003-06-05 11:14:12 »

I'm having a problem and I don't know where to start on it.  I'm hoping someone on this forum has dealt with something similar.

I'm laying out a bunch of tiles as flat textured planes.  The size of the planes is the same as the pixels of the original source graphics, which is 24x24 per tile.  Everything looks fine.

Next, I try to do some fancy effects such as rotating the entire scene, or translating on the z axis to create a zooming effect.  As soon as I do this, thin black lines appear between all the tiles.  They seem to no longer have their edges perfectly lined up with each other.

Does anyone have ideas on how to approach this problem?  I'm not sure if I need to look at how I set up my projection matrix, dig up some kind of hints to be setting, or what.  Thoughts?


Paul Siegel
Adamant Games, Inc.
Offline psiegel

Junior Devvie

Adamant about gaming.

« Reply #1 - Posted 2003-06-05 12:34:29 »

Ok, going to answer my own question.  Smiley

Trying all kinds of different projections and hints, I eventually came across this bit of code that I've been using for sprites with transparency:

gl.alphaFunc(GL.GREATER, 0.1f);

It would seem my value of 0.1 was a bit too strict.  I upped it to 0.5, and lo and behold all those black lines went away.  I guess the edges of those graphics had a very slight alpha value.

Well, thanks for listening anyway.


Paul Siegel
Adamant Games, Inc.
Offline zparticle

Senior Devvie

Thick As A Brick

« Reply #2 - Posted 2003-06-05 19:36:03 »

Thanks for posting your own solution, I wish more people would do this.

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

« JGO Spiffy Duke »

Medals: 567
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #3 - Posted 2003-06-06 09:55:58 »

I render all my tiles using the same indexed vertex coordinates which guarantees they're stitched together as well.

Cas Smiley

Offline psiegel

Junior Devvie

Adamant about gaming.

« Reply #4 - Posted 2003-06-06 13:37:56 »

Yes, I had thought of stitching the tiles together.  Unfortunately at this point that would be a pretty big gutting of my code, which was origianally written on top of Java2D.   I'm glad I was able to work around it this way instead.


Paul Siegel
Adamant Games, Inc.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Coldstream24 (11 views)
2015-09-03 00:41:28

Andrew_3ds (23 views)
2015-09-01 19:08:10

afikri (16 views)
2015-08-31 09:30:22

afikri (24 views)
2015-08-31 09:30:07

afikri (12 views)
2015-08-31 09:27:24

afikri (16 views)
2015-08-31 09:26:40

Roquen (23 views)
2015-08-29 11:30:54

GamerC4 (34 views)
2015-08-22 20:38:50

GamerC4 (31 views)
2015-08-22 20:37:18

GamerC4 (37 views)
2015-08-22 20:37:01
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37: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!