Scrolling tile maps with Hollywood

Discuss any general programming issues here
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Scrolling tile maps with Hollywood

Post by jalih »

Hi all,

I added a function to render scrolling tile maps into my framework.

I made a simple demo to show off it's functionality. I was lazy, so random map is generated. Could you test it with AmigaOS4 and MorphOS? Please give me information on how it performs and if you find any bugs.

Demo available here.
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Scrolling tile maps with Hollywood

Post by jalih »

I will try to get my AmigaOS4 machine running again in near future, so I can use the latest version of the Hollywood. I wonder, if support for hardware brushes would help performance...
bitRocky
Posts: 150
Joined: Fri Nov 14, 2014 6:01 pm

Re: Scrolling tile maps with Hollywood

Post by bitRocky »

Hi,
here on a Powerbook G4/1.67GHz under MorphOS I have around 14-16 fps.
No bugs encountered.
User avatar
airsoftsoftwair
Posts: 5895
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Scrolling tile maps with Hollywood

Post by airsoftsoftwair »

Tried it... the tiles are currently all messed up and do not show any level layout but I think that's intended. Concerning speed, I'd say that hardware brushes and a hardware double buffer should really speed things up here significantly.
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Scrolling tile maps with Hollywood

Post by jalih »

airsoftsoftwair wrote:Tried it... the tiles are currently all messed up and do not show any level layout but I think that's intended.
Yep, the demo just creates the map using:

Code: Select all

dim map[20][20]

For Local row = 0 To 20-1
  For Local col = 0 To 20-1
    map[row][col] = Point:new( { x = Rnd(7) + 1, y = Rnd(5) } )
  Next
Next
The map tile graphics are all saved in one image and the tile map engine knows which one to draw based on the id number.

We just need to define the tile rectangle, map rectangle, view port rectangle and position offset point for the view port rectangle.

To draw the tile map, we call the drawing function with the above information and with our position on the tile map. That's all what is needed...

Code: Select all

game.buffer:drawtilemap(map, mapr, tiler, vpr, vprpos, pos)
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Scrolling tile maps with Hollywood

Post by jalih »

I updated the package, please test.

- Added support for the hardware double buffer and hardware brushes
User avatar
airsoftsoftwair
Posts: 5895
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Scrolling tile maps with Hollywood

Post by airsoftsoftwair »

Tried it, it's clearly faster than the old version. Maybe about 6 fps faster here on Pegasos 2.
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Scrolling tile maps with Hollywood

Post by jalih »

Demo download updated to show the current capability.

I can now also support collision rectangles on maps.
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Scrolling tile maps with Hollywood

Post by jalih »

Here is a Windows binary for the demo of the current status of my tilemap engine.

- Uses three tile sets
- Uses three maps layered to look as one.
- Uses separate view ports for each map.
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Scrolling tile maps with Hollywood

Post by jalih »

Here is a demo for Windows showing the current status of my support routines for scrolling tile based games.

Sorry, ground collisions only now, the platform collisions will follow later. Uses real layered tile map with collision detection done using collision rectangles and collision points. Collision maps could easily be supported also.

Have fun!
Post Reply