View Single Post
Old 15 February 2017, 03:53   #20
Anakirob
Unregistered User
 
Anakirob's Avatar
 
Join Date: Nov 2005
Location: Tasmania
Age: 42
Posts: 893
Quote:
Originally Posted by Havie View Post
I did something similar - is this a process we all go through when learning? Although I also experimented with using bobs instread of ascii characters to create a Gauntlet like effect (worked but slow and didn't go very far).
Indeed, I did something very similar. And actually had quite a nice little engine, which has sadly been lost many years ago. Anyway, My notes on experimenting with the Monsters code. Note that I was using a stock A1200 at the time.

Initially quite slow

MASSIVE speed improvement by replacing many small Print commands with big NPrint strings. A realtime ascii rouge like on an 8-bit screen could be done at around 12.5 fps on a stock A1200 and maybe a consistent 25 fps with fast memory, possibly only needing to slow down to load or generate more data. I had to set the refresh rate to greater than four frames (I'm a bit vague, but I think 5-8 should be stable but slow) to make the game playable anyway.

Had to change the AI and rendering routines back to how I found them to adapt the code to individual Blits. But I also switched to Blitz mode. I chose an 8 bitplane display which was a different 256 colours for the top and bottom and 4 bitplane + 4 bitplane dual playfield in the middle which was done manually with copper pallete changes and BitplanesBitmap. I didn't want any black lines on my display and had graphics that blended the edges of the panel with the playfield. (Sorry, that Amiga is long gone and I don't have any examples, But I think some of the code was a bonus game in a WIP AHX music disk called Blue Moon I was working on in 2007 I think, which could possibly be floating around on some polish sceners hard drive: )

I used relatively small maps with about 16-64 monsters. I don't know what refresh rate I was getting, but it was fast enough for me to want to make the main loop wait for 4 VWaits, as the mosters still moved in 8 pixel jumps, and therefore quite fast. Although I had a 16 pixel high 8-bitplane scroller at the bottom of the screen going at 25 fps.

I may have made one or two tweaks to the monster AI, but it was pretty much unchanged. But there were a few changes to make Blitting more efficient or even possible. Especially the walls and holes which could be done with Block's and only needed to be done once. When a monster or the player twas over a hole it would just clear the hole for me automatically. I just had to update the string holding the map data in memory when I removed the monster.

Another thing I did which could be useful for this game (the 32 colour shooter) was use the QAmiga command to load level data, which I did every time the player left the edge of the screen. Which I found I could do without missing a beat, although I did have 4 whole frames to load around 40 ascii strings from disk (developed on HD, but tested with about 50/50 success on floppy) and switch back to Blitz mode before the next screen update. Personally I'd like to see more games that take a SWIV style approach to the concept of levels.

Also maybe consider capping your framerate at the lowest acceptable setting to avoid slowdown, I'd rather play at 17fps with no slowdowns than 25 fps if it missed even the occasional frame.

(as you may have guessed I was planning an Egyptian themed realtime rogue like where an unarmed archaeologist had to navigate his way to the burial chamber while avoiding an army of mummies and traps (holes), often using the former to clear the latter. I kinda lost interest about half-way though when I began work on Blue Moon (ECS Multitasking, but I'm not sure how a plain A600 would handle it) and then sadly lost the machine with the data)

Last edited by Anakirob; 15 February 2017 at 04:19.
Anakirob is offline  
 
Page generated in 0.04593 seconds with 11 queries