English Amiga Board


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

 
 
Thread Tools
Old 14 April 2021, 19:01   #1
Coppis
Registered User

 
Join Date: Oct 2020
Location: Italy
Posts: 14
R Type clone

I started development of a R Type clone for A1200 AGA using Blitz Basic 2.1.
The graphics have been ripped from original Amiga version of R Type using MapTapper.
The game uses dual playfield mode with two playfields of 4 bitplanes each: one playfield is used for background and the other playfield for the bobs, in order to use the most efficient QBlit mode.
Link to a video:

[ Show youtube player ]

Last edited by Coppis; 19 May 2021 at 19:24.
Coppis is offline  
Old 14 April 2021, 19:24   #2
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 867
We all love R-Type What is your plan with this? Make if arcade perfect or do your own game?
nikosidis is offline  
Old 14 April 2021, 19:43   #3
saimon69
J.M.D - Bedroom Musician

 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 1,993
If you are looking for ideas take also a peek at the Rayxamber series on FM Towns and PC Engine (did inspire me at the time for Powder too) - and as usual i offer my help for assets, mostly music but also some pixel art

Rayxanber
[ Show youtube player ]


Rayxanber II
[ Show youtube player ]


Rayxanber III
[ Show youtube player ]

Last edited by saimon69; 14 April 2021 at 19:56.
saimon69 is offline  
Old 14 April 2021, 19:45   #4
Coppis
Registered User

 
Join Date: Oct 2020
Location: Italy
Posts: 14
Quote:
Originally Posted by nikosidis View Post
We all love R-Type What is your plan with this? Make if arcade perfect or do your own game?

I don't like the excessive difficulty of the arcade version, so I plan to make the game easier, but leaving the fundamental mechanics such as: beam, force and weapons.
Coppis is offline  
Old 14 April 2021, 21:08   #5
Havie
Registered User
Havie's Avatar
 
Join Date: Mar 2012
Location: UK
Posts: 1,187
Looks good already.
Havie is offline  
Old 14 April 2021, 23:45   #6
lmimmfn
Registered User

 
Join Date: May 2018
Location: Ireland
Posts: 257
looks excellent, great job!

I'm not sure if dual playfield is the correct method though(unless used with parallax)?
As far as i know in RType other than bullets there's very little/no overlap with the scenery. Its only stars in the background, those can be handled with the CPU. Collisions also shouldn't have any overlap.
Maybe sprites can be used for enemy bullets making sure to not exceed max number of sprites per line?
lmimmfn is online now  
Old 15 April 2021, 11:48   #7
Coppis
Registered User

 
Join Date: Oct 2020
Location: Italy
Posts: 14
Development Diary

15/04/2021 Collisions between player ship and enemies

Today I will implement collisions between player ship and enemies. Both player ship and enemies are Blobs (Blitter Objects). Blitz Basic 2 (BB2) provides the following function:
Code:
ShapesHit(shape#,x,y,shape#,x,y)
This function will calculate whether the rectangular areas occupied by 2 shapes overlap.
ShapesHit will automatically take the shape handles into account. If the 2 shapes overlap,
ShapesHit will return true (-1),otherwise ShapesHit will return false (0).

This pseudo code snippet shows the logic for the collision check:
Code:
CheckCollisionsShipAliens:

loops through all the aliens
     if alien is active AND player ship collides with the current alien
        if ship state is not "hit"
            change player ship state to "hit"
            decrease lives number
Player ship states

In the following picture is shown a diagram of the player ship states:



In "Active" state the player can control the ship using the joystick, moving around the screen and firing. When there is a collision between the ship and an enemy or a bullet, the ship switches to the "Hit" state. In this state, the player can not control the ship and the ship explodes. When the explosion animation ends, the ship goes into "Invulnerable" state, in which the player can control the ship, but the ship can not collide with enemies and bullets and the ship is flashing. After a given amount of time (i.e. 5 seconds), the ship returns in the Active state.

Player ship explosion

The player ship explosion animation uses the following 7 frames:




Each frame size is 32x30 pixels, 4 bitplanes.
Here is a preview of the animation:



Planning future work:
  • Collisions between player ship and background
  • Information panel
  • Show score and number of lives
  • Beam bar and beam fire
  • Pick ups
  • Force satellite
  • Fire power ups
  • End level boss
  • Sound effects
  • Music
  • Game over
  • Intro screen
  • Optimizations

In the following video you can see the ship explosion:

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

Name:	expl03.png
Views:	448
Size:	1.3 KB
ID:	71594   Click image for larger version

Name:	Ship state diagram.png
Views:	449
Size:	7.7 KB
ID:	71597  
Attached Images
 

Last edited by Coppis; 15 April 2021 at 20:43.
Coppis is offline  
Old 16 April 2021, 07:50   #8
Adrian Browne
Jackie Chan
 
Join Date: Mar 2012
Location: Ireland
Age: 43
Posts: 862
Might be cooler with new graphics and gameplay?
Adrian Browne is offline  
Old 16 April 2021, 09:14   #9
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 49
Posts: 5,567
A1200? maybe use the original arcade graphics instead?
jotd is offline  
Old 16 April 2021, 09:31   #10
malko
Ex nihilo nihil

malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 3,482
@Coppis : Really nice result so far
Wish you all the best with your project
malko is offline  
Old 16 April 2021, 09:35   #11
Steril707
Tigerskunk!

Steril707's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,115
I wish you a lot of strength for a project that might easily take a few years to realize for one guy...

Keep us updated, mate.
Steril707 is offline  
Old 16 April 2021, 10:04   #12
Coppis
Registered User

 
Join Date: Oct 2020
Location: Italy
Posts: 14
Quote:
Originally Posted by jotd View Post
A1200? maybe use the original arcade graphics instead?

The reason I chose to use the Amiga version graphics is that I was able to rip the graphics easily using Maptapper.
To rip the graphics of the arcade version you need to find some tools for the MAME. Can anyone point me to some tools or tutorials for ripping graphics from MAME?
Coppis is offline  
Old 16 April 2021, 10:11   #13
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 2,970
I'm not 100% sure on this, but I seem to recall that the original Arcade GFX used more than 16 colours per layer. So if you do go the Arcade GFX route, be aware you might need to colour reduce them. You may also run into resolution issues as the original R-Type used a very wide screen.

Regardless, good luck with the game. Always nice to see new Amiga games
roondar is offline  
Old 16 April 2021, 10:17   #14
Steril707
Tigerskunk!

Steril707's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,115
Thinking about it, may I ask what the ambition here is, seems a bit unclear to me.

I mean, there is already the old version of the game with those graphics assets you are using now running quite well on A500s.

An arcade quality conversion running on AGA machines would be a cool thing, though.
Steril707 is offline  
Old 16 April 2021, 10:56   #15
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 49
Posts: 5,567
color reduced arcade graphics on AGA (32 colors in dual PF? more with sprites?) will probably look much nicer than original OCS amiga graphics
jotd is offline  
Old 16 April 2021, 11:00   #16
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 867
I agree with Steril707. I seen you plan to do a more easy version but if you go with AGA you should try to rip the arcade GFX.
If you do that there will be much more interest. Even if the original port to Amiga was good it is first of all the GFX that is not on par with the arcade. That said, the Amiga version at the time was by far the best arcade port
nikosidis is offline  
Old 16 April 2021, 16:17   #17
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 49
Posts: 12,219
Quote:
That said, the Amiga version at the time was by far the best arcade port.

You mean on a home computer (the good Sharp X68000 was released in 1989 too). The PC-Engine version was much better though.
Retro-Nerd is offline  
Old 16 April 2021, 18:30   #18
Coppis
Registered User

 
Join Date: Oct 2020
Location: Italy
Posts: 14
Development Diary

16/04/2021: Player ship "invulnerable" state

After the ship is hit and the explosion animation ends, the ship is returned to its original position. It may happen that in this position there are enemies and then the ship is hit again. Losing a life like this is frustrating for the player. To avoid this I have introduced the "invulnerable" state, where the ship is controllable but cannot be destroyed by enemies. The ship enters this state immediately after the explosion animation ends. The permanence in this state is regulated by a timer, currently set at 5 seconds. To give the player visual feedback that the ship is invulnerable, we let the ship flashing.


The following code snippet shows how I implemented flashing durign "invulnerable" state:


Code:
#SHIP_FLASH_DELAY = 5  ; flashing duration (in frames)


; if the state is invulnerable, makes the ship flash making it disappear and reappear
If myShip\state = #SHIP_STATE_INVULNERABLE
    shipFlashingDelay = shipFlashingDelay + 1
    ; if the flashing time has elapsed
    If shipFlashingDelay = #SHIP_FLASH_DELAY
        ; reset the flashing timer
        shipFlashingDelay = 0
        ; toggle ship visibility
        shipVisible = 1- shipVisible
    EndIf
EndIf

If shipVisible = 1
    QBlit #QUEUE_ID+db,shapeID,myShip\x,myShip\y
EndIf
The duration of the "invulnerable" state is checked in the MoveShip function, shown in the following code snippet:


Code:
; move and update the player ship
Statement MoveShip{}
   Shared myShip,shipInvulnerabilityTimer

    ; if ship is in invulnerable state
   If myShip\state = #SHIP_STATE_INVULNERABLE
       shipInvulnerabilityTimer = shipInvulnerabilityTimer+1
       ; if the time period for invulnerability has elapsed
       If shipInvulnerabilityTimer = #SHIP_INVULNERABLE_STATE_DURATION
           ; reset invulnerability timer
           shipInvulnerabilityTimer = 0
           ; change state to active
           myShip\state = #SHIP_STATE_ACTIVE
       EndIf
   EndIf
The following video shows the player ship flashing after a collision with the enemies.


[ Show youtube player ]
Coppis is offline  
Old 16 April 2021, 20:40   #19
saimon69
J.M.D - Bedroom Musician

 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 1,993
Hey, if you hit a wall on performance ask advice to mcGeezer and Earok!
saimon69 is offline  
Old 16 April 2021, 23:30   #20
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 45
Posts: 9,250
This looks good. Can you speed it up at all?
BippyM 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 11:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.14799 seconds with 14 queries