Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
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  
  isometric tiles in Java2D w/ scrolling  (Read 2275 times)
0 Members and 1 Guest are viewing this topic.
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Posted 2005-02-09 16:07:24 »

Here is a little isometric tiling app i wrote, which scrolls a set of tiles. it doesn't work as well as i had hoped, getting only about 100 FPS (Windowed)

it uses transparent GIFs in an array (256x256), and BufferStrategy.

the main classes have comments so anyone can hopefully follow what's going on in it. you can get the source by unzipping the .jar:

http://www.adam.com.au/kellyjones/javagaming/isostuff.jar

-Judd

edit: if anyone knows a more efficient or better way to do this type of tiling (aside from switching to LWJGL or something like that) i'd really like to know about it.
Offline dylanjames

Innocent Bystander




Java games rock!


« Reply #1 - Posted 2005-02-19 01:10:31 »

This looks pretty nice!  I wonder how hard it would be to extend it to non-level terrain?
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #2 - Posted 2005-02-19 20:08:55 »

im getting 216FPS on a pretty naff Gfx (ATI radeon 9200).

The thing that really got to me about this is that the outside tiles are being culled, i would prefer it if the outside's outside are culled instead, so you get a feeling of your still in the terrain, and not isolated...

Its not v. good looking to see the culling happening to speed things up! Smiley

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline dronus

Senior Newbie




"Der CRC32-Hashwert dieses Satzes ist BA5D7983."


« Reply #3 - Posted 2005-02-20 07:28:57 »

I suggest performance by balancing:

two things you have to weight up against each other:

-time to convert data
-time to copy data

when you draw more surface than actually seen (and you do,  as rectified tiles overlap here) maybe a backbuffer-and-copy strategy would be better. i experienced that in my game. the reason is that your images (paletted gifs for example) need to be converted to screen mode which is 24/32bpp mostly and can have several different alignments of data (bitmap type; eg INT_RGB, BYTE etc..)

so there are three different ways to use:

-draw directly to a flip-buffer (as you do, if it is available)
pro: less to draw
con: every tile, and so more then actually visible surface is converted every time drawn

-draw to a backbuffer that exactly matches image-bitmap-mode (eg. paletted mode with global palette for gifs)
pro: conversion is only done once for exact the whole visible surface
con: whole surface will be converted even if less is drawn (eg. no scrolling but moving sprites), for gif's a global palette is needed

-convert all images first
pro: no conversion at runtime at all
con: heavy memory footprint


for me the last worked best
in fact i copy every loaded image to a same-sized bitmap with the exact properties of the output-screen, and use this new duplicates for drawing. if all works, no conversen is done then.
this even accelarates alpha-channel blits i used a lot, but these are allways many times slower than direct blit.

hopes that helps
Paul












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.

atombrot (26 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (58 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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!