Jump to content

Photo

The Trouble With Screen/Bitmap Drawing


  • Please log in to reply
1 reply to this topic

#1 ywkls

ywkls

    Master

  • Members

Posted 02 April 2017 - 05:39 PM

So, I've been experimenting with various types of methods to accomplish some fairly specific goals. Many of these have a lot in common with Z3 Scrolling, although not quite the same. Basically, I have two separate problems with similarities, so I'll outline them both here.

 

The first, is a series of screens where I want an object to seem to walk across them from one spot to another in a specific order. To be more precise, this-

 

https://youtu.be/yB317FOcU0Y?t=5185

 

In trying to do this, I discovered a flaw in Screen->DrawScreen. More specifically, one where that the settings of Combo's CSet 2 are disregarded by it. This is the result.

 

https://www.youtube....h?v=LeAlPXY0uIM

 

There are ways to partially trick all of the foreground combos to work, but the background combos don't function correctly no matter what I've tried. Additionally, the large amount of screens being drawn mean that storing the combo ids in an array and then reading that back to the screen becomes problematic since the amount quickly exceeds the 1,000 draws per frame.

 

Drawing it to a bitmap is also impossible, since bitmaps only extend 512 x 512 pixels which means that they can be used to create a maximum of 4 screens. At one point, I tried drawing two separate bitmaps to a third, but that doesn't seem to work either. (Or I'm misunderstanding how I should set it up.)

 

The second problem is a scripted minimap I'm trying to make. I have a number of screens I'm using as sources for the drawing (since using tiles would be prohibitively large, over 1,056 tiles for one map) and then drawing those to a bitmap; then drawing a section of that back to the screen.

 

It automatically adjusts as you move left or right, but the problem comes whenever you have moved so far left that the bitmap has reached the edge of the region it can draw, at which point it starts to stretch before ultimately disappearing.

 

I've been beating my head against these problems for a couple of months now, so I've decided to post about them here and see if anyone has suggestions of methods that I haven't already tried.

 

I haven't figured out how to make a procedurally generated map, like MoscowModder's LTTP map script, without making an array for each map that was as large as the total number of screen which that map contains. 

 

I have code samples for the drawing shown in the video above as well as what I've tried for the Minimap, if that helps.



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 April 2017 - 09:17 PM

Post the code on Pastebin.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users