![]() |
![]() |
#901 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
But I mainly learned from inspecting other people's code inside MonST. In fact 99% of my debugging goes on inside MonAM (The Amiga equivalent) because I just find it super easy to use. When I got an Amiga with an Action Replay cart I was then able to understand the Amiga hardware as well. |
|
![]() |
![]() |
#902 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,360
|
assembler isn't the biggest difficulty (apart from the fact that you have to have a strong discipline, and even with that you can make mistakes that take you days to uncover, like wrong size addressing, register corruption,...). The biggest difficulty is chipset & writing a game engine (with events, data loading, ...).
I see an issue with asm: it's difficult to reuse routines from someone else because there's no such thing as a calling convention/parameter passing, unlike C... Writing the game in C or even C++ would be slightly easier, but still hard because of all the low level stuff happening. EDIT: I never wrote a game in 68000 asm, only tools. I only wrote games in C/C++/Java for Windows most of them were remakes. Last edited by jotd; 30 March 2019 at 22:51. |
![]() |
![]() |
#903 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
Some principles of object orientated programming have helped massively too in my learning too, I was able to take them and apply them to assembler. I could probably give some examples if people are interested. |
|
![]() |
![]() |
#904 |
Competition Moderator
Join Date: Feb 2008
Location: Germany
Posts: 4,756
|
Looks, sounds and feels pretty genuine. I had the Lynx-port back in the day (the only Atari hardware I ever owned) - this Arcade conversion seems between 16 and 64 times better.
![]() Had one freeze but that's it. Certainly the most ambitious of the five submissions for the contest. |
![]() |
![]() |
#905 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Another quick update here....
Added the ropes on round 5 and the transition to round 6. I need to tidy up the round transition when the previous round is shorter. I'm pleased with the ropes though - thanks to the Amiga Hardware Reference Manual for the simple line drawing example routine too. ![]() [ Show youtube player ] |
![]() |
![]() |
#906 |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
Nice one Graeme, looking good
![]() |
![]() |
![]() |
#907 | |
Registered User
Join Date: Dec 2018
Location: Málaga
Posts: 61
|
Quote:
|
|
![]() |
![]() |
#908 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
![]() |
![]() |
#909 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
I just want to plug here a thread I just created regarding some custom backgrounds that I'm thinking about...
if interested then pm me. http://eab.abime.net/showthread.php?...50#post1314050 |
![]() |
![]() |
#910 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,053
|
Just some basic speed/size optimizations (lines starting with ;; ):
Looking at 020+ code makes me sad&angry, register scaling is soooo useful ;(. Code:
; ; ANIMATE ; ; The sprite handler is called with the sprite to work on in d0 ; Then ANIMATE is called from the handler with the animate type in d1 ; ; In ; d0 = sprite number animate in sprite list (player 1 is 0) ; d1 = Type of animation ie. (0 standing, 1 walk left, 2 walk right) ; Out: ; d6 = -1 = End of sprite loop reached ; ANIMATE: move.l d0,-(a7) move.l d1,-(a7) lea SPRITE_SLOTS,a0 move.l (a0,d0*4),a0 ; PLR_RYGAR ; a0 points to sprite base. move.l a0,a1 move.l a0,a2 move.l a0,a3 ;; addq.w #6,a0 ; Point to Animation Sets ;; add.w (a0,d1*2),a1 ; a1 now pointing to base animation set ;; move.l a1,a0 ;; move.l a2,a1 add.w (6,a0,d1*2),a0 ; a0 now pointing to base animation set ;; add.w 0(a0),a1 ; a1 points to variables ;; add.w 2(a0),a2 ; a2 points to frames ;; add.w 4(a0),a3 ; a3 points to speed add.w (a0)+,a1 ; a1 points to variables add.w (a0)+,a2 ; a2 points to frames add.w (a0)+,a3 ; a3 points to speed lea SPRITE_SLOTS,a0 move.l (a0,d0*4),a0 add.w (a0),a0 ; a0 points to global sprite vares ;---- move.w (a1),d1 ; Current frame move.w (a3),d2 ; Current speed moveq #0,d6 move.w (a2,d1*2),d3 ; Store the current frame ; need to compare $fffe here for play sprite once. ; if true then we need to disable and pop the sprite from the list. ; Are we at the end of the loop? bpl.s .cont ; Yes we are, reset loop counter back to zero. clr.w (a1) ; reset frame from start addq.w #1,d3 ; is value $fffe->$ffff or $ffff->$0000? beq.s .end ; If not zero then do not set end of animation flag. moveq #-1,d6 ; Was $fffe (-2) so set end flag. .end: moveq #0,d1 move.w (a2,d1*2),d3 ; ; Has the speed reached the set speed? .cont: move.w d3,(a0) ; Set Frame cmp.w 2(a1),d2 ; speed reached? next frame bne.s .loopdone move.w #-1,2(a1) addq.w #1,(a1) ; Next frame .loopdone: addq.w #1,2(a1) ; Increase speed. .exit move.l (a7)+,d1 move.l (a7)+,d0 rts ; ; CAST_SPRITE ; ; Adds a sprite in the sprite list ; ; In: ; d0 = Sprite type (0, bombjack, 1=MUMMY ; d1 = start xpos ; d2 = start ypos ; d3 = sprite control word to set ; a0 = offset address of handler to assign ; ; Out: ; d4 = Allocated Sprite number PUSH_SPRITE: cmp.w #MAX_ACTIVE_SPRITES-1,NUM_SPRITES_INPLAY ; Sprites may be pushed beq .exit addq.w #1,NUM_SPRITES_INPLAY lea SPRITE_FREE_LIST,a1 moveq #0,d4 ;;.spr1: cmp.w #-1,(a1)+ ; Find next spare sprite ;; beq .spare ; In free list. ;; addq.w #1,d4 ; Slot count! moveq #-1,d5 .spr1: REPT 2 cmp.w d5,(a1)+ ; Find next spare sprite beq.s .spare ; In free list. addq.w #1,d4 ; Slot count! ENDR bra.s .spr1 .spare: ;; move.w d0,-2(a1) move.w d0,-(a1) lea SPRITE_DEF_BASE,a1 lea SPRITE_DEFS,a2 add.w (a2,d0*2),a1 ; CHECK THIS FOR OVERFLOW. ; a1 now points to source lea SPRITE_SLOTS,a2 ; Pointer to available sprite list move.l (a2,d4*4),a2 ; a2 now points to available sprite space. ; copy the sprite to a2 move.l #$80808080,d6 .copy_sprite ;; move.l (a1)+,d5 ;; cmp.l #$80808080,d5 ;; beq.s .copy_done ;; move.l d5,(a2)+ REPT 4 move.l (a1)+,d5 cmp.l d6,d5 beq.s .copy_done move.l d5,(a2)+ ENDR bra.s .copy_sprite .copy_done: ; a2 now has copy of the sprite data. lea SPRITE_SLOTS,a1 ; Pointer to available sprite list move.l (a1,d4*4),a1 ; a1 now back at the head of the sprite data. move.l a0,2(a1) ; Save the sprite handler address ;; move.l a1,a2 ;; add.w (a1),a2 ; a2 now pointing to sprite vars ;; move.w d0,(a2) ; Initialize Sprite number (unused) ;; move.w d1,2(a2) ; Store x pos ;; move.w d2,4(a2) ; Store y pos ;; move.w d3,6(a2) ; Store Type add.w (a1),a1 movem.w d0-d3,(a1) ; Initialize Sprite number (unused) .exit: rts |
![]() |
![]() |
#911 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
Thanks for this a/b... very nice. I haven't done any optimisations on the code yet so that is why it is the way it is. Let me know if you want more challenges though... I have plenty. ![]() |
|
![]() |
![]() |
#912 |
uber cool demi god
![]() Join Date: Jun 2006
Location: Kent/England
Posts: 2,073
|
Awesome work mcgeezer, love reading this thread.
|
![]() |
![]() |
#913 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
I thought I'd do just a quick update on where I am with progress on the project.
![]() I estimate the game should be done in about the next 6 weeks, if it's not then it won't be done until October as i have lots of well deserved holidays planned with the family and friends. Geezer |
![]() |
![]() |
#914 |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
![]() ![]() ![]() Looking at your very impressive project plan, I don't see "Flip after bouncing off enemies"? Last edited by DamienD; 04 April 2019 at 16:55. |
![]() |
![]() |
#915 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
![]() |
![]() |
#916 |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
![]() |
![]() |
![]() |
#917 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Here's another update on progress of Round 5.
[ Show youtube player ] The Cavebat is a hardware sprite and the little bombs that are dropping are bobs. I know there's a few graphical glitches here that need fixing, they're mainly off by 1 errors or crap that I've stuck in the map that I just need to remove as I had other ideas previously on how to control events in the game..... things evolve as you code I guess. All of the enemies except for the little crabs are done for rounds 1-4, the hardest enemy to code on Round 5 still remains to be the Blue Monkey as it's probably that most complicated enemy of the lot. Thanks to all those that are following the thread, it helps a lot with motivation now that the game compo is done. The other update I've done is made the code hunk 100% relocatable, the data hunk still has 220 relocation offsets, I was mainly bothered about optimising for speed but may go the whole hog and make the entire thing 100% relocatable ... depends how my OCD is I guess. Perhaps some of the other coders can list the pros and cons of doing it. Geezer |
![]() |
![]() |
#918 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Monkeys, Ape's and Crabs added...
[ Show youtube player ] More to come tomorrow! ![]() |
![]() |
![]() |
#919 |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
Nice
![]() |
![]() |
![]() |
#920 |
Registered User
Join Date: Feb 2013
Location: Dublin/Ireland
Posts: 403
|
Looks great, top work!
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Entry: Rygar AGA Edition | mcgeezer | Coders. Entries | 75 | 28 February 2019 20:41 |
On the Ball - World Cup Edition AGA | djcasey | request.Old Rare Games | 4 | 25 January 2013 12:39 |
On The Ball League Edition AGA , Player Manager 2 | StarEye | Games images which need to be WHDified | 11 | 22 January 2010 18:21 |
The Vague #1 AGA-RTG edition is released ! | kas1e | Amiga scene | 12 | 30 October 2007 00:27 |
On The Ball: World Cup Edition AGA | CodyJarrett | request.Old Rare Games | 11 | 27 May 2003 06:14 |
|
|