15 August 2021, 16:13 | #1 |
Registered User
Join Date: Jan 2021
Location: FRANCE
Posts: 30
|
double buffer and autoback tilemap answer issue
Hello
I create a map editor on AMOSPRO. I coded everything myself, even the silder. I use drawing instructions (box, bar, plot) for the sliders and grid, a bob for the arrow and a sprite for the map cursor. I find it extremely slow to display the map in a 34*34 plot it takes several seconds. I have tried double buffering, autoback, nothing I have found a solution. WINUAE 68020 + fast... or 68030 the fastest is the same. ' Dungeon crawler by DarkN3mo |
15 August 2021, 16:40 | #2 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
How long does it take to draw 20*16
double buffer will obviously be slower take a look at an existing map editor like Tome or the excellent Mac Map for comparison. |
15 August 2021, 16:44 | #3 | |
Registered User
Join Date: Jan 2021
Location: FRANCE
Posts: 30
|
Quote:
20*16 about 2 seconds I know there are other editors but I prefer to code all my own utilities. I'm not sure how to do this, but I'm not sure I know how to do it. |
|
15 August 2021, 16:48 | #4 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
Yeah good idea but just for comparison.
If you load it into a Dim variable it might speed it up but I agree 2 seconds seems a bit long. print command is also a weakest link it's very slow remove it. |
15 August 2021, 17:07 | #5 | |
Registered User
Join Date: Jan 2021
Location: FRANCE
Posts: 30
|
Quote:
not necessarily the goal, because in binary you consume less space. ok TEXT command is faster. Last edited by DiabloV; 15 August 2021 at 17:14. |
|
15 August 2021, 17:24 | #6 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
iirc Text and other bar, line etc are very slow
most stuff like this removing print will be significantly faster but for a map editor it's not a big deal but for a game you should look to replace text with Paste bob or better Paste Icon. |
15 August 2021, 17:30 | #7 | |
Registered User
Join Date: Jan 2021
Location: FRANCE
Posts: 30
|
Quote:
yes of course, for the game I'll use bob sprite and bitmap text. for the map, I redraw the map each time I change the slider, to take into account the offset, I have no choice my editor will be usable in the end for several types of games on the other hand, I'm currently making an old school Dungeon crawler engine (Dungeon Master like) It's going pretty well. If you have any ideas I'm interested I'll share the progress on the forum I've taken up the Amos again after more than 20 years off, argh! |
|
15 August 2021, 17:36 | #8 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
I have no idea about that type of game but iirc they did something with Bloodwych? on the Amos factory maybe those guys can help.
instead of redrawing the map use Screen offset to scroll, hardware scrolling is always the fastest method to scroll. O and good luck! |
15 August 2021, 17:38 | #9 | |
Registered User
Join Date: Jan 2021
Location: FRANCE
Posts: 30
|
Quote:
Yes I know but this would mean drawing the whole map on another screen which can take up a lot of chip space if the map is large. but that's something to consider too. thanks |
|
15 August 2021, 17:42 | #10 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
more complex Hardware scrolling called wrap around or corkscrew means you can have a smaller screen and hardware scroll endlessly but gets more complex.
you can also use the old software scrolling with Screen Copy I never liked this and don't know if it would be faster than redrawing the whole screen but it was commonly used, Tome used it. also there's a turbo extension that can paste Icons even quicker but I had some problems using it and Double Buffering but I only looked briefly but it is faster. |
15 August 2021, 19:40 | #11 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
Actually, Tome didn't use it. The culprit is that the blitter clocks at only 3.5 MHz with 16 bit bus accesses. Even on AGA.
|
15 August 2021, 20:58 | #12 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
I never really looked but iirc nearly all the Tome examples used screen copy for scrolling like these
[ Show youtube player ]
|
15 August 2021, 21:01 | #13 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
Screen copy uses large blitter operations. Very expensive. Screen scroll uses screen offsets and the copper for almost no time cost.
|
15 August 2021, 21:06 | #14 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
Screen offset is the command is the command built into Amos that allows smooth hardware scrolling all the Tome commands for scrolling and Screen copy are very slow.
If you look at the Tome examples there mainly based on very small screens because of this, there also very jerky unlike the Screen Offset command. |
19 May 2022, 13:44 | #15 | |
Registered User
Join Date: Jan 2021
Location: FRANCE
Posts: 30
|
Quote:
[ Show youtube player ] |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Game development using C and sys functions, double buffer problem | balrogsoft | Coders. C/C++ | 7 | 28 December 2022 21:32 |
Double Buffer & Hardware Scroll | DanielAllsopp | Coders. Asm / Hardware | 13 | 29 January 2020 19:07 |
ScrollVPort double buffer problem with garbage pixels | balrogsoft | Coders. General | 5 | 29 May 2014 12:31 |
Double buffer copper?? | h0ffman | Coders. General | 8 | 19 July 2011 19:10 |
Vsync Fullscreen and Double Buffer, incorrect frame rate? | rsn8887 | support.WinUAE | 1 | 07 April 2011 20:43 |
|
|