English Amiga Board


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

 
 
Thread Tools
Old 17 April 2021, 16:06   #21
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,645
Why not go ahead and make something that isn't on Amiga, like R-Type 3? Pretty sure ripping SNES graphics would be easy.

You got a nice thing going here.
Amiga1992 is offline  
Old 18 April 2021, 19:06   #22
LeCaravage
Registered User
 
LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 459
Love reading game's WIP threads.
Nice job.
LeCaravage is offline  
Old 19 April 2021, 18:48   #23
Coppis
Registered User
 
Join Date: Oct 2020
Location: Italy
Posts: 26
Post Development Diary

19/04/2021: Player ship collision with background

We define 4 test points: T1, T2, T3, T4 as in the following figure.




To check if the ship collides with the background, just determine the tile underlying each test point. If the tile is solid, there is a collision.


The calculation of the underlying tile to a point Ti is simple as we used a tile map:
Code:
convert Ti in world coordinates xw,yw
calculate the indices of the underlying tile on the map:
    i = xw/16
    j = yw/16
underlying tile index = map(i,j)
if underlying tile is solid
    change ship state to hit, because there is a ship-background collision
The following video shows the ship-background collision in action:


[ Show youtube player ]
Attached Thumbnails
Click image for larger version

Name:	ship test points.jpg
Views:	638
Size:	21.8 KB
ID:	71643  
Coppis is offline  
Old 19 April 2021, 19:18   #24
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,518
Quote:
Originally Posted by Akira View Post
Why not go ahead and make something that isn't on Amiga, like R-Type 3? Pretty sure ripping SNES graphics would be easy.

You got a nice thing going here.
Even R-type LEO arcade
saimon69 is online now  
Old 19 April 2021, 22:19   #25
Konrad
Registered User
 
Konrad's Avatar
 
Join Date: Apr 2002
Location: Germany
Age: 43
Posts: 742
Please not. Regarding R-type LEO:
Quote:
Originally Posted by Wikipedia
The game was initially conceived as an original shoot 'em up by Nanao before being retooled into an R-Type project by Irem.
You clearly feel it. It doesn't feal anything like R-Type. R-Type III for SNES is another story, that's a good game !

I would vote for not remaking R-Type, as it's already a good port. When the game engine is finished, perhaps use the assets from R-Type 1 and/or 2 and create a new R-Type from there ?

But in the end it's Coppis decision what he does. If he wants to do an easier R-Type 1, then so be it. I would still follow this thread with interest .
Konrad is offline  
Old 19 April 2021, 22:37   #26
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,518
R-type for SNES has somewhere mode 7 that i doubt he can replicate - or am getting confused with Super R-type?
He could even do completely different levels if he has a pixel artist (one could be me in example)

Last edited by saimon69; 19 April 2021 at 23:31.
saimon69 is online now  
Old 19 April 2021, 22:42   #27
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 862
Regarding the collision have you thought of using a hardware sprite for the ship and using the built in collision commands? In JetHunters I draw the tiles then the enemies and bullets then I check if the sprite has hit anything. After that check I then draw the player bullets, stars and powerups.
Coagulus is offline  
Old 20 April 2021, 01:59   #28
Nightshft
Registered User
 
Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 615
Very interesting Coppis, carry on please!
Nightshft is offline  
Old 20 April 2021, 10:05   #29
Coppis
Registered User
 
Join Date: Oct 2020
Location: Italy
Posts: 26
Quote:
Originally Posted by Coagulus View Post
Regarding the collision have you thought of using a hardware sprite for the ship and using the built in collision commands? In JetHunters I draw the tiles then the enemies and bullets then I check if the sprite has hit anything. After that check I then draw the player bullets, stars and powerups.

Thank you for the suggestion, i will try to optimize the game using hardware sprite for the ship and hardware collision detection between sprite and playfield.
Coppis is offline  
Old 21 April 2021, 18:47   #30
Coppis
Registered User
 
Join Date: Oct 2020
Location: Italy
Posts: 26
Development Diary

21/04/2021 - Information Panel

We want to create an information panel, at the bottom of the screen, to show the score, the number of lives etc ... To do this we will take advantage of an Amiga feature that allows you to have different video modes simultaneously on the same screen.
The following picture shows the screen layout:




We have a game window, with a 320x192 pixel size, which starts at raster line 44. The game window uses dual playfield mode with 4 bitplanes for each playfield, so has 16 colors. Then we have an information panel, with a 320x64 pixel size, which starts at raster line 237. In fact we need to leave a 1 raster line gap between two different video modes. The panel uses 3 bitplanes, so has only 8 colors.

The following code snippet initalizes the information panel:


Code:
    ; create bitmap for panel and load graphics
    BitMap #BITMAP_PANEL,#PANEL_WIDTH,#PANEL_HEIGHT,#PANEL_BPP
    LoadBitMap #BITMAP_PANEL,"panel.iff",#PALETTE_PANEL

    ; panel copperlist settings:
    panelCopperList.l = $3              ; 3 bitplanes

    ; initialize copperlist used for panel, starting at y=44+192+1=237, height 64 px, 8 colors
    ; we need to divide the two copperlists at least by 1 scanline
    InitCopList #COPPERLIST_PANEL,237,64,panelCopperList,0,8,0
    
    ; copy color data from palette to copperlist
    DisplayPalette #COPPERLIST_PANEL,#PALETTE_PANEL

    BLITZ 

    ; setup the screen display with the copperlists
    CreateDisplay #COPPERLIST_MAIN,#COPPERLIST_PANEL
In the main loop, we must add the DisplayBitmap command to show the panel:


Code:
Repeat
    VWait
   
    DisplayBitMap #COPPERLIST_PANEL,#BITMAP_PANEL
Drawing score
To draw the current score, we need to draw numbers using a bitmap font. So we create a numeric font, in which each digit is 8x8 pixel and save these tiles into an iff file, like the following:





To display the score, which is a numeric variable, we will convert it into a string. Then we will extract each character from the string, calculate the index into the tilesheet and then blit the tile to the screen. For the blitting we use BBlit command, which saves and restores the background. The background is stored into a dedicated buffer.

This code snippet displays the score:


Code:
Statement DisplayScore{}
    Shared score

    Use BitMap #BITMAP_PANEL
    
    ; restore the background
    UnBuffer #BUFFER_SCORE

    ; convert score into a string
    text$ = Str$(score)
    
    offset=0
    ; loop for each character of the score string
    For i=0 To 5
        ; extract one character from the string
        c$ = Mid$(text$,i+1,1)
        ; get the ascii code of the current character
        ascii = Asc(c$)
        ; calculate shapeID from the ascii code
        shapeID = ascii - Asc("0")
        ; display the current character
        BBlit #BUFFER_SCORE,#SHAPE_NUMFONT+shapeID,56+offset,9
        
        ; space for the next character
        offset = offset + 8
    Next
    
End Statement
Drawing number of lives

The number of lives is displayed using icons. These icons are stored into a spritesheet. When the number of lives decreases, we blit a new frame on the panel, showing the new icons number.
The following code snippet displays the lives on the panel:
Code:
Statement DisplayLives{}
    Shared lives

    Use BitMap #BITMAP_PANEL

    ; restore the lives blob background
    UnBuffer #BUFFER_LIVES

    If lives >0
        ; calculate the offset for frame number
        offset = 3 - lives

        ; display a blob with number of lives
        BBlit #BUFFER_LIVES,#SHAPE_LIVES+offset,1,2
    EndIf
End Statement
In the following video the final panel is shown:


[ Show youtube player ]
Attached Thumbnails
Click image for larger version

Name:	Info panel.png
Views:	529
Size:	8.3 KB
ID:	71662   Click image for larger version

Name:	numeric_font.png
Views:	522
Size:	212 Bytes
ID:	71663  
Coppis is offline  
Old 21 April 2021, 20:41   #31
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,977
Quote:
Originally Posted by saimon69 View Post
R-type for SNES has somewhere mode 7 that i doubt he can replicate - or am getting confused with Super R-type?
If you're talking about R-Type III (Third Lightning) then no, that can't be done on a stock Amiga. Not even the first level.
Dunny is offline  
Old 21 April 2021, 20:52   #32
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
Quote:
Originally Posted by Dunny View Post
If you're talking about R-Type III (Third Lightning) then no, that can't be done on a stock Amiga. Not even the first level.
Pssshhht. Let him try...
Tigerskunk is offline  
Old 21 April 2021, 22:07   #33
Adrian Browne
Jackie Chan
 
Join Date: Mar 2012
Location: Ireland
Age: 46
Posts: 985
If it were an original game I could help out on graphics too as best as I could. Saimon 69 is a good artist too.
Adrian Browne is offline  
Old 23 April 2021, 12:29   #34
E-Penguin
Banana
 
E-Penguin's Avatar
 
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
Quote:
Originally Posted by Coppis View Post
21/04/2021 - Information Panel

To display the score, which is a numeric variable, we will convert it into a string. Then we will extract each character from the string, calculate the index into the tilesheet and then blit the tile to the screen. For the blitting we use BBlit command, which saves and restores the background. The background is stored into a dedicated buffer.
If you're only adding or subtracting values to the score, you could do this more easily using BCD (binary-coded decimal), where each nibble represents one decimal digit. The Amiga's 68000 processor has hardware commands for adding (ABCD) and subtracting (SBCD).

I'll post some example code later. Beware, there's a bug in the Blitz2 compiler when generating the BCD instructions. Search on this forum for a macro work-around.

This would be much faster than converting to a string and doing string manipulations.
E-Penguin is offline  
Old 23 April 2021, 18:52   #35
Coppis
Registered User
 
Join Date: Oct 2020
Location: Italy
Posts: 26
Development Diary

23/04/2021 - Beam bar and beam fire

I implemented beam bar as an animated blob, using 11 frames. There are 2 versions of beam fire: small and big. The first is shooted when beam bar is greater than 50% while the second only when beam bar is full.


Look this video:

[ Show youtube player ]
Coppis is offline  
Old 23 April 2021, 20:50   #36
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,518
Quote:
Originally Posted by Dunny View Post
If you're talking about R-Type III (Third Lightning) then no, that can't be done on a stock Amiga. Not even the first level.
Strictly speaking of stage 1 AND of amiga capabilities (not blitz ones), The twisting structure @4:50 seem straight out of a demoscene intro, so that could be somehow done in a similar fashion, same for the station scaffoldings tunnel @1:01 (sprites), but the remaining stuff (rotating segments) fugghettaboutit :/

[ Show youtube player ]

Last edited by saimon69; 23 April 2021 at 21:05.
saimon69 is online now  
Old 23 April 2021, 20:59   #37
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
you can just use block or whatever it is in blitz for the score you you don't need to restore anything.
Retro1234 is offline  
Old 23 April 2021, 21:14   #38
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
maybe you can help with this, not sure this is the correct thread

https://eab.abime.net/showthread.php...ht=bullet+hell

question raised by Shatterhand you are firing Several bullets at several enemies, what is the quickest way to do your collision?

Quote:
Originally Posted by Dunny View Post
If you're talking about R-Type III (Third Lightning) then no, that can't be done on a stock Amiga. Not even the first level.
That could easily be pre-rendered if the SNES version isn't already, how many frames would it be?

Last edited by Retro1234; 23 April 2021 at 21:23.
Retro1234 is offline  
Old 24 April 2021, 00:24   #39
Dunny
Registered User
 
Dunny's Avatar
 
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 1,977
Quote:
Originally Posted by Retro1234 View Post
That could easily be pre-rendered if the SNES version isn't already, how many frames would it be?
That effect could be done easily enough (assuming you could use a demo effect and then somehow get a playable game on top of it), but I'm more concerned about where the whole level is rotated several times over several seconds through a full 360 degrees prior to that... Yeah you're talking hundreds of frames.

Edit: That was in agreement with Saimon69's post.
Dunny is offline  
Old 26 April 2021, 19:42   #40
Coppis
Registered User
 
Join Date: Oct 2020
Location: Italy
Posts: 26
Development Diary

26/04/2021: Implemented different damage level for enemies



Different damage level for each type of enemy: to hit the enemy in the video below with the basic fire, you need to hit the enemy 3 times.


[ Show youtube player ]
Coppis 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
A bejewelled clone, deviish clone, columns clone Gordon Looking for a game name ? 10 16 June 2014 19:28
What has Happened To clone-A? digiflip Amiga scene 61 23 November 2013 16:41
clone xilinx is possible? cpiac64 support.Hardware 3 24 September 2011 10:35
Clone-A presentation. ppill News 60 16 September 2009 00:57
Name that Turrican clone dreamkatcha Looking for a game name ? 4 17 June 2002 01:23

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 19:28.

Top

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