Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] I have problems with creating engine.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Captain Goatse   Banned   -  Reputation: 100

Like
Likes
Like

Posted 14 January 2000 - 11:12 PM

I''m creating engine on standalone, but I have found some problems in drawing images. I probably need some sort of component because drawing on the window is so freaking limited(I suppose with my experience) Any good suggestions? (It''s tile based scrolling engine and personal charachter is in the middle of it) Also, should i draw the whole map at time or just the point of view position and then load map all the time? I suppose first one is faster once it has loaded.

Sponsor:

#2 javanerd   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 January 2000 - 09:20 PM

Have you taken a look at my "GameFrame for Java" library? You can find it from:
http://www.gamedev.net/hosted/javanerd/
and it provides many things that are needed for 2D game programming.

You shouldn''t draw the whole map at a time, but you should have the 2D array representing the tiles loaded all the time (if you aren''t using HUGE tile maps that take up tens of megabytes of memory) and draw parts of that instead.

You didn''t mention do you want to move the character with jumps from one tile to another or smoothly pixel by pixel.
I''ll take the latter one as an example.

You need an offscreen image that is larger than you display size. You draw the tiles from the map data to that image (using some offsets to the map data) and use the image to draw the map on to the screen. By changing the drawing offset of the image you can smoothly scroll that piece of map on the screen and when the player moves enough pixels to count as one tile you just change the offset to the map data accordingly and redraw the image using tiles and reset the image drawing offsets.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS