Java-Gaming.org 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  
  isometric animation loop  (Read 1766 times)
0 Members and 1 Guest are viewing this topic.
Offline MickeyB

Senior Devvie




my game will work, my game will work!


« Posted 2003-04-20 13:38:17 »

Just so I am on the right path.  When ding the animation loop for an isometric scroller, each tile, each tile overlay(layer) and each overlays overlay, have to be moved when scrolling the screen within the animation loop?

Just seems like a lot of work for the loop.   I havent dug into planetation yet, but do most of you then clip the viewable area at this point then paint?


M

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Offline Orangy Tang

JGO Kernel


Medals: 57
Projects: 11


Monkey for a head


« Reply #1 - Posted 2003-04-20 13:51:04 »

An easier way I use (and probably almost everyone else) is to have a Camera class which contains the position and size of the current viewing area - your tiles stay exactly where they are in the world, and you just choose the appropriates ones to draw (and shift their screen positions accordingly).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline MickeyB

Senior Devvie




my game will work, my game will work!


« Reply #2 - Posted 2003-04-20 15:35:42 »

so the "world" map could be 1276*1024 and the view window of the 'camera' is 400*300.  

I want to draw my camera contents for x=100 y=100 plus appropriate width and height.

Sounds good, Ill take a crack at it.

thanks

M

MickeyB

Current Project: http://www22.brinkster.com/mbowles/
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder




Got any cats?


« Reply #3 - Posted 2003-04-21 17:17:39 »

An intermediate solution is to use a "background buffer" for the floor and only redraw it when the camera shofts (generally all you have to do is blt it "over" and redraw the exposed areas.

The disadvantage of this approach is that it assumes that tiles are only going to be sued for the floor.  Anything that "stands up" has to be an object or "sprite" depending on youir favorite terminology.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 

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

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

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

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

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

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

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

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

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

Solater (144 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
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!