Page 1 of 3
Scrolling tile maps with Hollywood
Posted: Sun Jan 18, 2015 5:39 pm
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.
Re: Scrolling tile maps with Hollywood
Posted: Sun Jan 18, 2015 6:38 pm
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...
Re: Scrolling tile maps with Hollywood
Posted: Sun Jan 18, 2015 9:30 pm
by bitRocky
Hi,
here on a Powerbook G4/1.67GHz under MorphOS I have around 14-16 fps.
No bugs encountered.
Re: Scrolling tile maps with Hollywood
Posted: Mon Jan 19, 2015 12:12 am
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.
Re: Scrolling tile maps with Hollywood
Posted: Mon Jan 19, 2015 7:05 am
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)
Re: Scrolling tile maps with Hollywood
Posted: Mon Jan 19, 2015 7:59 pm
by jalih
I updated the package, please test.
- Added support for the hardware double buffer and hardware brushes
Re: Scrolling tile maps with Hollywood
Posted: Tue Jan 20, 2015 8:30 pm
by airsoftsoftwair
Tried it, it's clearly faster than the old version. Maybe about 6 fps faster here on Pegasos 2.
Re: Scrolling tile maps with Hollywood
Posted: Thu Jan 22, 2015 10:00 pm
by jalih
Demo download updated to show the current capability.
I can now also support collision rectangles on maps.
Re: Scrolling tile maps with Hollywood
Posted: Wed Jan 28, 2015 8:35 pm
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.
Re: Scrolling tile maps with Hollywood
Posted: Sun Feb 01, 2015 9:26 pm
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!