Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  A couple of questions about Java  (Read 3237 times)
0 Members and 1 Guest are viewing this topic.
Offline Call Me Jimmy!

Senior Newbie

« Posted 2007-03-10 01:56:45 »

Hey guys, I have 3 questions that have been bugging me for a while during the design of a 2d game in java.

Question 1 - Translucent Images

I notice that java does not have hardware accelerated translucent images and thus they are extremely slow to render, does this apply to simple shapes as well or what?
If so, does this mean that ANY transparent images onscreen will significantly slow down the game? An RPG with nice translucent effects would then be out of the question in java, or am i wrong?

Question 2 - Transformed Images
I was considering a 2d top-down shooter that would include rotating the world but after some preliminary tests it seemed too slow and not feasible because AffineTransforming an image was taking a lot of time and resources. (I am almost 100% sure that nothing else was causing the speed issue). What I don't understand is how something like that can cause a slowdown yet a 3d engine (which manipulates textures in every frame) can run smoothly.

Question 3 - TileMap / Game Design
When designing a game that uses a tilemap of images, how exactly would you allow it to support more than one screen resolution? (Assuming you want the view to be the same for every resolution) My thinking is having a 'native' resolution (1024 768) and then scaling everything based on the difference between the native screen resolution and the actual resolution. So if it was to run in 800 600 then ye scale the image by 800/1024 x  and 600/768 y.
Is that how it is generally done or what?

Anyway, sorry if some of this is unclear but I would appreciate any help with any of these questions. Thanks very much Smiley

Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #1 - Posted 2007-03-10 04:21:48 »

If you want translucent stuff use some opengl binding.

If you want lots of rotations etc use some opengl binding.

And tilemaps... generally those games don't support different resolutions. If you really want to scale around use some opengl binding.

弾幕 ☆ @mahonnaiseblog
Offline DarkMortar

Junior Devvie

Java Padawan

« Reply #2 - Posted 2007-03-10 05:12:00 »

If you run opengl pipelines transluecent images will not slow the game much. I use transparent .png images, and i have a tilemap (and haxagon) program that supports any resolutions you want, so if you wanna talk...

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

Senior Newbie

« Reply #3 - Posted 2007-03-10 13:01:37 »

Thanks for the replies! Wow, I'm surprised that in none of the articles I read about java translucent images etc. that "opengl bindings" were never mentioned. Thanks for the help, I'll do some googling now but if you happen to know a very good source of information on the subject I would appreciate it.

Also, I take it that using an opengl pipeline without translucent images would speed up normal rendering?

About the tilemaps resolution, Dark, is the method of scaling each image and all necessary dimension down the way I mentioned what you did? if not I'de be interested to hear you're approach.

Offline CaptainJester

JGO Knight

Medals: 12
Projects: 2
Exp: 14 years

Make it work; make it better.

« Reply #4 - Posted 2007-03-10 14:46:49 »


2D game libs/enablers:
 Easy Way

3D Scene Graphs:
 jMonkey Engine

Offline DarkMortar

Junior Devvie

Java Padawan

« Reply #5 - Posted 2007-03-10 17:48:12 »

I did incorporate a numerical zoom in / zoom out function on both my tile and hex map programs. They work well, and they only draw the tiles they need. So yes, i did an afflineline transform in the tile draw methods. I also draw coordinates and grids both both programs. If you need, i could upload my tilemap and hexmap program for you to download, yet i dont have many comments so it may look strange, and i never said they way i handled multiple maps was good coding style either lol. i could most easily upload them both in .jars and you can extract their resources from a zipping program.

Pages: [1]
  ignore  |  Print  

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

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

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

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

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

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (898 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (811 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!