28 January 2024, 01:56 | #61 |
J.M.D - Bedroom Musician
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,606
|
|
30 January 2024, 08:34 | #62 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
|
Update on the project: completed (except for missing tunes) and all running nicely ... on WinUAE.
As soon as I'm using cycle exact, the game crawls and is unplayable ... A lot of objects on screen + no palette rework (using 32 colors), no sprites is the reason behind all this. Currently working on a strategy to use 16 colors only & sprites, hoping to keep 50 fps. - level 1: using sprites for static barrels & hammers & oil can & flame can save 8 blits - level 2: using sprites for oil can & flame & hammers & bonuses/hammers can save 5 to 8 blits - level 3: using sprites for bonuses or elevators can save 6 blits - level 4: using sprites for bonuses & hammers can save 5 blits that plus reworking the palette (game displays only 13 colors at once for each level) allows to use 16 colors instead of 32. I hope it's enough. |
30 January 2024, 11:49 | #63 |
Registered User
Join Date: Dec 2016
Location: Italy
Posts: 769
|
We hope, I think an A500 is quite good for a Donkey Kong game
|
30 January 2024, 14:16 | #64 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
|
After seeing it run perfectly on WinUAE, it would be so frustrating to have to cut it down.
I have other optimization ideas too. Hope is not lost! |
31 January 2024, 23:32 | #65 | |
Pixelglass/Reimagine
Join Date: Jun 2012
Location: Athens
Posts: 1,059
|
Congrats mate! Would be lovely to get this game on Amiga
Quote:
1) First the elephant in the room : can't understand why you went with 32 colors in the first place. I've downloaded the assets and also counted colors per level and I'm getting max 14 colors in each one (and even less in some). Which means the game can easily fit to 16 colors with zero losses or changes. Blitting 5 bitplanes for assets that can easily fit in 4 (or even less when talking about individual ones) seems like a massive waste. 2) With many of the objects you mention above you don't need to restore the background at all or do a 'delete object' blit as they never intersect with other objects and they stay in place (and there's also no background behind them), meaning these only need a single blit (no mask) to animate (when they do animate). This would be the case with parts of the kong sprite or the princess. 3) Objects that stay in place but do intersect with others is a similar case. F.e. the flaming barrel at the bottom of the first level doesn't need to be restored every single frame, you just need to check when it does intersect with something and only then attempt a refresh. That would also be the case with collectables as well. Place them and then leave them be. They only need updating if an enemy or Mario comes in contact with them. 4) You can do additional optimizations to the tileset and sprites by merging the two for specific stuff. F.e. the arcade assets have the Kong and barrels as separate objects in level 1. But you can merge these and treat them as extra tiles (in which case point 2 above applies). So you're trading Ram for performance in this case (which you probably can afford since the entire set should already fit on 512k alone, several times). 5) Most moving stuff on screen, including Mario, enemies, collectables and fx seem to be 3 colors only and 16x16 (Mario with hammer can be split in 2) which is a perfect match for Amiga sprites. With some effort you could probably do the entire game (except tiles) just with sprites if you went multiplexing. Else 8 sprites are more than enough to cover the majority (and for additional extras you just blit them). This should again give you a massive performance boost. Anyhow, I'm probably not saying anything new as I've seen you also are considering some of the above |
|
01 February 2024, 03:39 | #66 |
Moon 1969 = amiga 1985
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,914
|
I didn't connect for a long but when i saw this i had to.
jotd Can't wait to see it running. |
01 February 2024, 08:10 | #67 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
|
@Tsak thanks for the detailed advice. I imagine that there's nothing wrong with the way I'm blitting things, it's just that those old arcade machines have 64 or 128 sprites while the amiga only has 8.
The 32 color display was very useful to "mockup" the display and prove that the game runs properly so it was very useful. point 1: you're right, and I managed to get down to 4 bitplanes, not that easy as 4 colors of the palette are dynamic, but by luck, used sprites for each level only used 12 colors max. Miracle number one point 2: yes, I implemented of such optimizations for kong or princess. If no move and no sprite change, then do nothing or just redraw. But it's not going to cut it for the screen where kong moves left & right (pie factory). Another approach could be to have erase size tables for tiles. left corner tile(s) of kong would erase the whole character, whereas others don't erase anything and just redraw. Princess could be done the same way: bottom tile never erases background. (Like a fighting game, Kong is "animated", not a block but rather 6 16x16 tiles) point 3: this looks complex. Furthermore, there are no bonuses in stage 1 (which is already causing issues). For the oil barrell, flame & hammers I'm using sprites now. point 4: yes: there will be a special case for the 4 barrels on top left they will be 2 32x16 sprites, which is cool as they'll only use 1 palette slot (so will hammers, with the blinking to handle, but that can be done with copper as they're never on the same line!) point 5: I'm already using sprites for some objects. You're right, we could put them there and refresh them only if collision, but that's only for the first screen. I'd like a generic approach that will work all 4 screens. And I don't want to go multiplexing. A few games I remade earlier (Pengo, Bagman) used only sprites because the original arcade machine only had 8 sprites to begin with. With some palette grouping & luck, the blitter was completely avoided and I didn't have all those issues. Xevious used a lot of BOBs but it was AGA dual playfield so FMODE=3, no background restore. Another point I don't want to go into is interleaved bitmap which makes bigger blits so probably faster. But I have 2-bitplane tiles to restore with special palette. I reckon that interleaved works best for full 16 or 32 colors for tiles+sprites. Those optimizations are made more difficult by the fact that the original code drives the game, not a amiga-specific implementation. Using some techniques mentioned above, the game now runs much better. I hope I won't have to go 25Hz that would ruin the experience... If you're curious you can check my current state for display routines here: https://github.com/jotd666/donkey_ko...miga/amiga.68k Last edited by jotd; 01 February 2024 at 08:22. |
01 February 2024, 09:09 | #68 | |
Pixelglass/Reimagine
Join Date: Jun 2012
Location: Athens
Posts: 1,059
|
Quote:
Point 3 is not that complex, just a basic check, if object x collides with another -> update. If not then don't. This is basically how the complete screen/map can be covered with collectables in Worthy (plus the player, plus up to 15 enemies, plus effects, plus projectiles, plus the princess) without the game ever dropping a single frame (and it also works on a500 and 50fps). And -mind you- the game doesn't use sprites either, everything is blitted Going interleaved is probably a good move. I think the only downside might be extra RAM consumption (in which case you should be able to afford it)? |
|
01 February 2024, 10:59 | #69 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
|
you're right after all. I may be able to focus on moving stuff then fix side background/immobile objects if they fail to display properly on a specific basis and per level. Kludges for cornercases.
That was an interesting discussion. |
04 February 2024, 01:04 | #70 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
|
published a beta on itch today.
Runs fine on A500 config (didn't test on real hardware) until ... you reach "pie factory" level where things crawl. But playable until then. The whole game was like this before I started optimizing so it will be probably okay after a few hours on it! |
04 February 2024, 02:12 | #71 |
Registered User
Join Date: Dec 2009
Location: nowhere / no.
Posts: 22
|
I see you updated the thread on https://jotd666.itch.io/donkey-kong-500 an hour ago with download beta unavailable. Eagerly await to see people enjoy this on AmigaLive
|
04 February 2024, 10:38 | #72 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,386
|
yes, sorry, I had ticked the wrong box. Now available.
|
04 February 2024, 11:39 | #73 |
Workbitch 1.3
Join Date: Oct 2001
Location: Melbourne, Australia
Age: 47
Posts: 2,084
|
brilliant work, just tried it on amigalive and didn't remember how much harder the arcade ver was.
|
04 February 2024, 12:19 | #74 |
Registered User
Join Date: Dec 2022
Location: East-Germany
Posts: 35
|
a small adjustment is necessary for the whdload information
donkey_kong.slave or donkeykong.slave now works fine! thank you so much! |
04 February 2024, 13:14 | #75 |
Registered User
Join Date: Dec 2016
Location: Italy
Posts: 769
|
Thank You very much Jotd,
another brilliant arcade conversion |
04 February 2024, 13:41 | #76 |
Registered User
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,918
|
Amazing.. looking forward to trying this on both winuae and my real a500
Thx jotd your amazing |
04 February 2024, 13:41 | #77 |
Registered User
Join Date: Apr 2020
Location: England
Age: 53
Posts: 443
|
|
04 February 2024, 14:52 | #78 |
Registered User
Join Date: Sep 2019
Location: Italy
Age: 51
Posts: 303
|
Beautiful, the classic of classics.
Really well done, but it's a habit now, you're spoiling us with these perfect ports! Congratulations! p.s. tested on A600 (for now), I noticed that the audio has a bit of noise. |
04 February 2024, 15:47 | #79 |
Saberman
Join Date: Dec 2016
Location: Kielce/Poland
Posts: 336
|
Awesome game! Gameplay:
[ Show youtube player ] |
04 February 2024, 16:59 | #80 |
Registered User
Join Date: Jul 2018
Location: Scotland
Posts: 852
|
Amazing stuff, another long over due port reaching the world's greatest computer!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[WIP] Tetris conversion | jotd | project.Amiga Game Factory | 160 | 08 May 2024 22:38 |
[WIP] Frogger conversion | JoeJoe | project.Amiga Game Factory | 99 | 24 December 2023 13:11 |
[WIP] Galaxian conversion | jotd | project.Amiga Game Factory | 107 | 16 July 2023 19:37 |
[WIP] Pengo conversion | jotd | project.Amiga Game Factory | 95 | 14 July 2023 17:16 |
Donkey Kong Country 2 in GZDoom | TCD | Retrogaming General Discussion | 4 | 22 December 2022 08:02 |
|
|