27 July 2017, 19:12 | #1 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
2D Platformer Engine
OK time to start a new thread.
As mentioned elsewhere I started to work on a 2d Platformer Engine some time ago. Posted even as example in Gallahad's thread in Amiga Scene forum on EAB. Well. Today's the time to show the latest progress with this little Blitz Basic Platform Engine. http://retronavigator.com/post/16349...-2d-engine-v05 Facts about this early version (0.05) - It's Blitz Basic 2.1 with no Asm code yet - pure BB2 - It's AGA (and decided to remain AGA) - It uses sprites (no blitting yet) and 16 color tilemap bitmap (will change to more colors or dbl-plfld) I count on your help guys! There's a lot to be done! I still don't know so many things about BB2, so expect lots of questions |
27 July 2017, 19:31 | #2 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
There is a hack for dual playfields I have never seen done before. AGA can bank switch a playfield palette to another set of 16 with a single Copper move to allow double buffering of color changes or more. A platformer would be uniquely suited for such an effect.
|
28 July 2017, 00:16 | #3 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,658
|
Good job!
|
28 July 2017, 12:35 | #4 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
ok. continuing discussion from other thread...
I think I get the idea of Double buffering. I still think it's hardly adaptable to my case as I should have repaint all tiles. Will investigate though. But I started to have more questions regarding current version of my engine - the sprites. I have 32pix wide sprites - 16 colors. But I can only display 2 at the same time. Is it OK? I thought that in this mode I could display 4 of them if I understand sprite channels correctly. what I do is DisplaySprite COP0, shape, x,y, 0 - for player sprite DisplaySprite COP0, shape2, x,y, 2 - for enemy1 but when adding DisplaySprite COP0, shape2, x,y, 4 - for enemy2 the 3rd sprite is colored badly as it would lack free chanels how should this work to show 4 sprites ? |
28 July 2017, 12:41 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
You don't have to repaint all tiles when doublebuffering unless you're repaint all tiles when singlebuffering as well.
You have eight sprite channels, with four colours per sprite. A sprite with 16 colours consumes two channels (a so-called attached sprite). One sprite is 16 pixels wide, which means that a 32-pixel, 16-colour sprite consumes four channels. This is how OCS sprites work. With AGA, you can have 32- and 64-pixel sprites, but you must set the correct fetchmode (I think) to use those features. Last edited by idrougge; 28 July 2017 at 12:50. |
28 July 2017, 13:48 | #6 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
I set correct fetch mode I guess because as seen on the move above sprites are displayed correctly
I did it the way the shmup demo does my problem is I can't display more than 2 sprites, sprites on channel 4 and 6 are displayed incorectly |
28 July 2017, 15:41 | #7 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
If you scroll horizontally you have to allow space on the left side of the screen to fetch the first section of the playfields before it is offset to the right.
|
28 July 2017, 16:12 | #8 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
@Samurai Crow
Sorry I don't get that. What you mean? |
28 July 2017, 16:42 | #9 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
Leave a wide border and see if it works.
|
28 July 2017, 16:48 | #10 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
OK I think I fixed it.
I was experimenting with InitCopList "type" parameter. Seems it should be $14438 and I had $12438 before. OK next thing on features list - parallax scrolling. |
28 July 2017, 17:32 | #11 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
Which resolution are you going to use?
|
28 July 2017, 17:50 | #12 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
I use lores . main level window is 320x224. Why?
|
28 July 2017, 18:31 | #13 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
You will lose sprites if you scroll horizontally at 320 pixels wide. Try 276x224 with the left border set at 104 pixels offset to allow the sprites and 32 bits of horizontal offset for the smooth scroll register to fetch the data.
|
29 July 2017, 11:20 | #14 | |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
Quote:
I started to play with DisplayAdjust command DisplayAdjust CopList#,fetchwid,ddfstrt,ddfstop,diwstrt,diwstop but TBH even looking into HRM it's still a mystery and I just try and fail rather than know what I'm doing. for now when the params are set like this: Code:
DisplayAdjust CopList#,-1,7,0,16,-16 I think I need some help from more hardware experts @Samurai Crow how the params you suggest apply to the DisplayAdjust command? |
|
29 July 2017, 11:23 | #15 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
Sorry, I am unfamiliar with Blitz BASIC, I program in AmigaE.
Edit: If the last 2 parameters are the left and right side adjustments, change them to 32 and -32 respectively. Last edited by Samurai_Crow; 29 July 2017 at 11:41. |
29 July 2017, 13:55 | #16 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
The HRM won't really help you since it's OCS/ECS only. I think the Blitz manual has some pre-made values for your situation.
|
29 July 2017, 15:44 | #17 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
I played a bit with the parameters and looks like I've found the solution
DisplayAdjust cop0, -2,8,0,16,-16 looks like these parameters are also used in one example in BB manual. Thanks idrouge - I'll look in there more often. |
01 August 2017, 17:41 | #18 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
OK parallax scrolling works fine.
+ more new features. Take a look http://retronavigator.com/post/16367...2d-platfoermer |
01 August 2017, 21:31 | #19 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
This is looking really impressive and very smooth.
|
02 August 2017, 01:28 | #20 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 477
|
I'll read/view all of it later. Keep proceeding anyway, best wishes from me.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Best ever Amiga platformer? | Fingerlickin_B | Retrogaming General Discussion | 104 | 11 February 2016 20:39 |
a little platformer I'm working on | mjnurney | Amiga scene | 8 | 03 March 2015 20:22 |
Best PD Platformer? | Dreedo | request.Old Rare Games | 11 | 13 August 2011 17:45 |
puzzle platformer | Asimir | Looking for a game name ? | 4 | 19 November 2005 23:50 |
3d platformer | superquake | Looking for a game name ? | 4 | 04 October 2005 20:42 |
|
|