English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 25 October 2023, 21:13   #1
seko
Registered User
 
seko's Avatar
 
Join Date: Jun 2018
Location: istanbul * turkey
Posts: 93
Blitz pang

I have been working on the pang game engine with Blitz basic for more than 2 weeks. In the first try, I modeled the movements of the game balls. I created player control. Then I moved more than one colored ball together. Then I wrote the collision controls.


I created the screen as a dual playfiled screen. I used the second screen plane for the player and the balls. However, when there is more than one ball on this second screen plane, the frame rate drops significantly. Apart from that, there was no problem. Now the final game is as shown below.

Note:Frame rate drops on Amiga 500. The frame rate is very good for the Amiga 1200.


first video

[ Show youtube player ]


second video
[ Show youtube player ]


last video
[ Show youtube player ]

Last edited by seko; 25 October 2023 at 21:19.
seko is offline  
Old 25 October 2023, 21:37   #2
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,529
What if you render balls with sprites? Usually are not much that three colors
saimon69 is offline  
Old 25 October 2023, 21:47   #3
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,180
in all these years, i know "of" pang, seen it played by others, but it's weird i have never actually played it myself, i think the closest things to it i have played are Oops Up and Super Obliteration.
DisasterIncarna is offline  
Old 26 October 2023, 10:06   #4
Seiya
Registered User
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,365
a very nice reworking
Seiya is offline  
Old 26 October 2023, 10:10   #5
aNdy/AL/COS
Registered User
 
aNdy/AL/COS's Avatar
 
Join Date: Jan 2022
Location: Wales
Posts: 91
Looking great!
aNdy/AL/COS is offline  
Old 26 October 2023, 10:17   #6
dreamkatcha
I've got a new byline
 
dreamkatcha's Avatar
 
Join Date: Mar 2002
Location: Manchester, UK
Posts: 1,219
You have to correct that DI. Pang is one of the few games with a perfect difficulty curve. That's how it lures you in, then you're hooked and find yourself progressing with each try. It's so well designed it should be studied in game dev courses if it isn't already.
dreamkatcha is offline  
Old 26 October 2023, 10:21   #7
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,196
Quote:
Originally Posted by saimon69 View Post
What if you render balls with sprites? Usually are not much that three colors

you generally can't as there are max 8 sprites and 16 pixels wide in ECS


I'd go AGA & 16+16 dual playfield to avoid all the cookie cut blitting that WILL slow down if there are too many balls.
jotd is offline  
Old 26 October 2023, 10:34   #8
Reynolds
Alien Breeder
 
Reynolds's Avatar
 
Join Date: Dec 2007
Location: Szigetszentmiklos / Hungary
Age: 46
Posts: 1,096
The soundtrack sounds a bit weird, like multiple playing a sample for one note...?
Reynolds is offline  
Old 26 October 2023, 10:47   #9
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
How are you drawing and erasing the balls? I think you should be able to blit them on an A500 without slowdowns, especially when you're using a dual playfield because there's no background to restore.
Daedalus is offline  
Old 26 October 2023, 11:01   #10
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,196
ECS + dual playfield = 8+8 colors. Very limited unless you're talented & you use colored sprites for main character like they did in Leander.
jotd is offline  
Old 26 October 2023, 11:22   #11
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,598
Quote:
Originally Posted by Reynolds View Post
The soundtrack sounds a bit weird, like multiple playing a sample for one note...?
Especially in the last video it sounds like the player messes up the song.

Is this a different game or different set of levels to the Pang released by Ocean?
TCD is offline  
Old 26 October 2023, 11:41   #12
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
Quote:
Originally Posted by jotd View Post
ECS + dual playfield = 8+8 colors. Very limited unless you're talented & you use colored sprites for main character like they did in Leander.
Yup, but from the OP it sounds like that's what was used. If not, then maybe more clarity is needed... It should still be possible to draw and erase those balls without frame drops on an A500.
Daedalus is offline  
Old 26 October 2023, 12:40   #13
seko
Registered User
 
seko's Avatar
 
Join Date: Jun 2018
Location: istanbul * turkey
Posts: 93
Quote:
Originally Posted by saimon69 View Post
What if you render balls with sprites? Usually are not much that three colors

Balls must consist of at least 4 colors. Using sprites is a problem in terms of color. Another problem is that the sprites remain within the 16 pixel width limit. Multi-plexing the sprites will significantly reduce the frame rate in the game. balls were created with blitter.



Quote:
Originally Posted by dreamkatcha View Post
You have to correct that DI. Pang is one of the few games with a perfect difficulty curve. That's how it lures you in, then you're hooked and find yourself progressing with each try. It's so well designed it should be studied in game dev courses if it isn't already.

I agree with what you said. A correction will be made.

Quote:
Originally Posted by jotd View Post
you generally can't as there are max 8 sprites and 16 pixels wide in ECS I'd go AGA & 16+16 dual playfield to avoid all the cookie cut blitting that WILL slow down if there are too many balls.

I think the same for AMIGA 1200

Quote:
Originally Posted by Reynolds View Post
The soundtrack sounds a bit weird, like multiple playing a sample for one note...?

mod music file i can be shared with you



Quote:
Originally Posted by Daedalus View Post
How are you drawing and erasing the balls? I think you should be able to blit them on an A500 without slowdowns, especially when you're using a dual playfield because there's no background to restore.

I used a double play area. background layer 8 color. foreground 8 color. Blitz basic used qbilit for biliter operation

Quote:
Originally Posted by TCD View Post
Especially in the last video it sounds like the player messes up the song.
Is this a different game or different set of levels to the Pang released by Ocean?
I never noticed this music glitches. I will check it. This will be Super Pang's version or something close to it.


We continue to develop this game. We always see the results as a draw.


seko is offline  
Old 26 October 2023, 15:14   #14
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
Quote:
Originally Posted by seko View Post
I think the same for AMIGA 1200
The A1200 can use 64-pixel-wide sprites. It's probably still not enough to use the sprites for all the balls because for 15-colour sprites you can still only have 4. 3-colour sprites you could have 8...

But instead of using sprites for the balls, what about using sprites for the player and the harpoons? That would free up some blitter time and also allow for the player to have different colours to the foreground playfield.

Quote:
I used a double play area. background layer 8 color. foreground 8 color. Blitz basic used qbilit for biliter operation
Hmmmm, that should be quick enough. Perhaps it's not the blitting that's taking up most of the time, but the other stuff? Are you calculating with quick or float variables? It might be worth poking the background with different colours at different steps of your main loop to see what's taking up most of the frame time.
Daedalus is offline  
Old 26 October 2023, 21:53   #15
seko
Registered User
 
seko's Avatar
 
Join Date: Jun 2018
Location: istanbul * turkey
Posts: 93
Quote:
Originally Posted by Daedalus View Post
The A1200 can use 64-pixel-wide sprites. It's probably still not enough to use the sprites for all the balls because for 15-colour sprites you can still only have 4. 3-colour sprites you could have 8...

But instead of using sprites for the balls, what about using sprites for the player and the harpoons? That would free up some blitter time and also allow for the player to have different colours to the foreground playfield.


Hmmmm, that should be quick enough. Perhaps it's not the blitting that's taking up most of the time, but the other stuff? Are you calculating with quick or float variables? It might be worth poking the background with different colours at different steps of your main loop to see what's taking up most of the frame time.



the hooks are made from sprites. only full length hook graphic block starting point multiplied by number 8 pixel height pieces step by step incrase are shown in sprite. simple method easy. there is no blitter operations for hooks.



Attached sprites made for player character tryed result low frame rate


The best way is to use the qbit command. However, more than five blitter objects reduce low frame rate . When I tried it on Amiga 500 standart 1 mb chip ram .


The game consists of simple arithmetic and logical operations, comparisons and loops that are not very complex.


It consists of game subroutines. Subprograms were created with very short codes. The longest is twenty-five lines.


If I had designed this game for the Amiga 1200, it would definitely have better gameplay and graphics. This is due to Amiga 1200 hardware efficiency and AGA chipset.


Below New video show Sound fx test. Hook sound fx and bursting balloon.




[ Show youtube player ]

Last edited by seko; 26 October 2023 at 22:29.
seko is offline  
Old 27 October 2023, 04:42   #16
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,529
Another way is still dual playfield but use a similar method to what Ocean did for the original pang and make custom copperlists changing the palette on the fly.

I would get in touch with colin vella to have insight on how to accelerate the rendering, though; you could update enemies position not every frame but every two

And i could help with the soundtrack but this time will use my own samples or melodies to make it more relevant
saimon69 is offline  
Old 27 October 2023, 10:03   #17
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
Hmmm, if you're still getting slowdowns when using joined sprites, something else is causing the slowdowns. Sprites are more or less free to display, so the slowdown must be caused by the game logic somewhere.

Are you doing any multiplication or division? They're very slow on a 68000 and much faster on a 68020. Also, make sure you're defining variables as words or bytes where possible, because Blitz uses "quick" variables by default and these are also much slower to deal with on a 68000 than a 68020.
Daedalus is offline  
Old 28 October 2023, 15:19   #18
seko
Registered User
 
seko's Avatar
 
Join Date: Jun 2018
Location: istanbul * turkey
Posts: 93
Quote:
Originally Posted by Daedalus View Post
Hmmm, if you're still getting slowdowns when using joined sprites, something else is causing the slowdowns. Sprites are more or less free to display, so the slowdown must be caused by the game logic somewhere.

Are you doing any multiplication or division? They're very slow on a 68000 and much faster on a 68020. Also, make sure you're defining variables as words or bytes where possible, because Blitz uses "quick" variables by default and these are also much slower to deal with on a 68000 than a 68020.

Daedalus, you are right. When I convert the variable value of the vector speed value types of the codes that model the movement of the balls from a float number to an integer type, the frame rate improves.




Now there is a problem here. When the variable vector velocities are integers, the ball's movements are very fast.
and at the same time the ball moves linearly.
I will fix the code for linear motion.


Thanks.Daedalus
seko is offline  
Old 05 November 2023, 19:09   #19
seko
Registered User
 
seko's Avatar
 
Join Date: Jun 2018
Location: istanbul * turkey
Posts: 93
Ball move and reaction fixed and balls move speed up. Tested on Amiga 500. You need enough 1mb chip ram and kick rom 2.04 version. If you try it on Amiga 1200 you will see speed issues.Player and balls collision detection disabled. Sound fx mode. No music.


Adf disk image : https://drive.google.com/file/d/1YVc...ew?usp=sharing

[ Show youtube player ]

Last edited by seko; 05 November 2023 at 19:15.
seko is offline  
Old 11 November 2023, 11:42   #20
seko
Registered User
 
seko's Avatar
 
Join Date: Jun 2018
Location: istanbul * turkey
Posts: 93
Shoot the balloons and balloon splitted.


New Video



[ Show youtube player ]
seko is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pang 2 rygar request.Old Rare Games 2 28 May 2023 22:09
[blitz] amiga/blitz Mode speed question peceha Coders. Blitz Basic 3 10 January 2021 18:52
Pang sprites qtelSparrow project.Sprites 3 12 March 2010 22:10
Pang method project.Sprites 5 04 February 2006 19:10
Anyone completed Pang? Dalai support.Games 24 12 January 2002 19:33

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:45.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09344 seconds with 13 queries