English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Contest > Coders. Entries

 
 
Thread Tools
Old 03 September 2018, 00:13   #21
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
After finally getting the scrolling and sprite engine sorted out I've moved on to the collision stuff. This basically means that I need to have a sprite to work with so the video below is showing the main player sprite movements implemented.

The game will now follow the same process as Beer Edition, although I still haven't quite worked out the algorithm for making the enemies appear and the difficulty, that will come though as it did with BJ.

Enjoy.

[ Show youtube player ]

Over the coming week I might record some coding sessions which some might find interesting, probably very boring in parts though but you'll get the idea.
mcgeezer is offline  
Old 06 September 2018, 20:57   #22
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Over the last few days I've been working on the collision detection for the platforms, believe me there's two ways to do this and I now know the easiest route.

Route a) Blind debugging or b) Visible debugging!

Games that have poor collision detection are seldom good to play so that's why I've put a lot of effort into getting this bit right.

[ Show youtube player ]

I'll try and explain what is going on in the video but you'll see I've added a lot of onscreen information to help with debugging, without it I was getting nowhere fast and with it I was able to nail it really well.
  • MAPOFX shows the current pixel position in the map.
  • TLOFFX shows the pixel offset of each tile on the X Axis with respect to where the scrolling is to the nearest 16 pixels.
  • SPROFX is the same as TLOFFX but it is in relation to the Rygar sprite.
  • TLLEFT is the tile number under the sprite on the left side
  • TLRGHT is the tile number under the sprite on the right side
  • TLLMSK is the bitmask for the TLLEFT tile
  • SPLMSK is the bitmask for the left part of the sprite
  • RSLMSK is the result of TLLMSK and'd with SPLMSK
  • TLRMSK,SPRMSK and RSRMASK are the right equivalent

if the result of RSLMSK is 0 then the sprite is not standing on any tile at all.

Now toward the end of the video I'm showing the tile and sprite definitions showing the ability to have fine grained collision detection.

Believe me, this wasn't easy...and getting it right is a must. But there it is working.

Next is an exciting bit that should be fairly easy in that I will be able to make the player jump and fall from tiles. As you can see from the video, the background goes Green when Rygar is not standing on a platform.

mcgeezer is offline  
Old 07 September 2018, 00:11   #23
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Another quick vid showing that hard work on the collisions...

As you can see, Rygar now interacts with the world.

Off to bed now. tired and I won't be coding again till Sunday or Monday as tomorrow night I'm fiddling with my new A1200 and having a good supp.

[ Show youtube player ]

PS: As you can see it's not without bugs... (handy as I recorded it!)
mcgeezer is offline  
Old 07 September 2018, 12:43   #24
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Quote:
Originally Posted by buzzybee View Post
Great to see your structured development approach, which results in steady progress. Quite fast too, if I may say so – I wish I would get as quick results with RESHOOT R :-)

I deeply appreciate your many updates here, as I know how much time this easts up. Many more people may now understand how many small little tasks have to be completed, just to get a hero run through a landscape.

Jump curve of the player objects looks nice. Must be great to have a the hero interact with its surroundings for the first time!
Thanks for the feedback. Indeed coding is both rewarding and time consuming, as you'll know with assembler you'll spend most of your troubleshooting and refining code.

Just another small insight, what I did with Bomb Jack was keep a simple project plan to keep me focused which worked really well. As these are arcade games you already have a design template to work to.

I've been doing the same thing with Rygar.



As you can see, lots of work to be done.

Quote:
Originally Posted by Hewitson View Post
The FM chip in the original game was a YM3812. I am wanting to design a card for the Amiga that has one of these (and/or the YM2612 from the Megadrive).

Imagine being able to do arcade/MD ports with the original music intact. That would be fantastic.
Nice, I'm happy to support it for my project but it would be best to wait until I've coded the game before you embark on a hardware project like that as I have no idea how long something like that would take you.
mcgeezer is offline  
Old 10 September 2018, 00:14   #25
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Sometimes when I do code, I implement one thing and break something I already had working ages ago - what a pain!

Anyway, I've continued to work on the collision detection and sharpen it up a bit, things like sticking half way through tiles on platforms and has been ironed out.

When you play Rygar on the Arcade you'll notice that there are some obstacles in the world that you have to jump over, these obstacles are not actually part of the tile maps but are instead inserted into the world/rounds as sprites, so in effect I've had to code that in as efficiently as possible because those obstacles overlay across 2 tiles on the Y Axis ever so slightly.

So then recall back a few posts with @Ross when he was asking about why I only use 1024 tiles and do I make use of the remaining 6 bits? Well I do now. As the world scrolls I cookie cut the obstacles over the tiles and the hook is using those spare bits to blit in a sprite number. I've done this efficiently as possible too as there was two frame spare on each hardware scroll that I wasn't using, handy because there are only ever 2 obstacles on any one 16x16 tile boundary.

On the downside I've broken the left pan scrolling as tile 0 is not blitting - no biggy will fix later. As you can see from the video the collisions need adjusting here and there, but what I'm most pleased about is that these obstacles are placed across two tiles - just like the arcade.

[ Show youtube player ]
Steady progress. Enjoy.
mcgeezer is offline  
Old 11 September 2018, 22:25   #26
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Youtube really doesn't do my videos any good, it forever screws up the quality of them.

Over the last couple of nights I've worked more on the collision detection, most of this is internal stuff that is going on in the game engine which takes time to work out properly.

In this update I've fixed up the collision on the obstacles which is important to the game, there are still a few tweaks to be made though as things are not quite working as they should however it is very very close.

A little bit more info on how the tilemap engine is working. I mentioned previously that there are up to 1024 tiles that can be used for each tile in the tile map, additional objects appear in the round that I've tagged as either collectibles, destructibles or obstacles that are actually from the bank of sprites instead of tiles.

Self explanatory but...
  • Collectibiles are objects that Rygar can pick up
  • Destructibles are objects that Rygar can destroy
  • Obstacles are objects that sprites cant pass through (if applicable)

Each tile uses up to 10 of the bits of each defined word leaving 6 bits available for objects that can appear in the world. If bit 14 is set then the values in bits 11,12 and 13 are combined to make up the collectible objects. If bit 14 is set then the same thing happens but for destructibles. If bit 15 is set then the same thing happens for obstacles.

The reason i've done it like this is down to efficiency, it is damn quick to work out if Rygar is over one of those objects in the world with the video showing the obstacles working.

A couple of things are broken but I know what is wrong with them so will need to fix them up a bit later in the week. I'm aiming to get the collisions working for each object working before I go on holiday next week, that way when I come back from holiday I can get to work on those enemy handlers.

As Youtube does a cracking job of arsing up the video if I've included the source before it was uploaded.

Source here... http://109.228.4.199/rygar12.mp4

Youtube here.. [ Show youtube player ]

Enjoy - Geezer
mcgeezer is offline  
Old 16 September 2018, 00:16   #27
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
A quick update here to say the vertical scrolling is in progress. For some reason I'm finding this difficult to do, it is a real brain teaser.

The process of doing it effectively means you have to split the video display in two at a Y position and display the upper half and lower half of the display.

I have not implemented the copper routine yet but it is close.

As you can see, round 5 is implemented here and I have put triggers in place via the tiles to switch off/on the background blitting, enable/disable vertical scrolling and trigger the round starting and ending.

The difficulty comes in that the rounds with vertical scrolling all have different geometry to the standard rounds which are 176 tiles by 12.

Anyway, here's the updates.

The mangled Youtube version ... [ Show youtube player ]

The WinUAE version that I pretty much see while testing...

http://109.228.4.199/rygar_13.avi

Taking a break now as off on my holiday! yiihhh hahh..

Geezer

Last edited by mcgeezer; 16 September 2018 at 00:33.
mcgeezer is offline  
Old 17 September 2018, 00:03   #28
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
I don't go on holiday until tomorrow.

So with that said... here's the vertical scrolling now implemented (with a couple of bugs though... but no biggies).

To say I'm happy with this is an understatement!

Youtube...

[ Show youtube player ]

What I see... straight from WINUAE

http://109.228.4.199/rygar14.mp4

I'm happy now... can enjoy my jolly.

Geezer
mcgeezer is offline  
Old 04 November 2018, 23:02   #29
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Today I got myself stuck back into some coding and what I'm really pleased with is that I have just about managed to get the Disk Armour working which is a big part of the game.

The way I've coded it is quite nice too as it supports all the weapons upgrades when I come around to coding them.

I do have a small graphical glitch bug and it needs some positional work but it's just about there now.

Great to be back coding after being away for a month.

Here's Damien's fix!

http://109.228.4.199/rygar15.avi

and a crappy Youtube version.

[ Show youtube player ]

Enjoy.

Geezer
mcgeezer is offline  
Old 09 November 2018, 00:49   #30
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
In game coding, sometimes what appears to be the simplest of things can all of a sudden start to be a bit of a brain teaser, and by gum did this one make me think.

Consider when playing Rygar, have you noticed how the items that you can pick up always seem to land on a platform? Well that's no coincidence... it would be pointless if the items fell through the floor as you wouldn't be able to collect them.

This update shows that I've dealt with that. Basically I (fairly efficiently) check the tiles from the right part of the screen and look downward for a platform, if it runs into an obstacle or can't find a platform in that vertical line then it simply goes further along to the right and starts again at the top looking for a platform... when it finds the platform it push the item in there.

The video shows items being placed at particular frames.... notice how the items never fall off the edges.

[ Show youtube player ]

The code to remove them is also done, it's just not shown... I guess I'll save that for the collision stuff.

Geezer
mcgeezer is offline  
Old 10 November 2018, 00:05   #31
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Small update here over and above my previous one.

Here I've included placing the destructible stones but also showing the disk armour fully working.

The stones or items are appearing at specific frame times but only if there is an available platform to the right of the play area away from Rygar.

I'm very tired... gonna have a night off tomorrow and spend time with family and watch the boxing.

Youtube.

[ Show youtube player ]

Direct from WinUAE.... (nice)

http://109.228.4.199/rygar19.mp4

Next up will be animating and removing the stones/items from the map and then getting the collision in place.

Geezer
mcgeezer is offline  
Old 13 November 2018, 23:46   #32
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
This update nearly turned my brain into a cabbage, I had to re-write the routine 3 times however, third time lucky as they say because now the disk armor can interact with objects in the rounds.

Very simple now to get the items and power ups working.

There's still the odd bug to iron out here and there but this is a huge milestone for the development of the game.

When I get the items coded in this weekend Rygar will be able to receive power ups and we'll see the disk armor upgrades working.

I need a rest now for a few days... that did nearly kill me.

[ Show youtube player ]

http://109.228.4.199/rygar_21.mp4

Enjoy, Geezer

Just to add technical detail.... this was difficult mainly for performance reasons, the stones that appear are only sprites while they are animating. Once they've finished animating they become part of the third buffer used for restoring... so before a stone animates I have to make a copy of the background into chip ram and restore it after it has left the scene.

Complex (for me to code) but performance is very good as I'm using simple bound boxing too for collision with the disk armor.
mcgeezer is offline  
Old 17 November 2018, 23:42   #33
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
A short update here showing progress of trying to get the tomb stones working properly.

I have some "off by one" bugs going on somewhere due to some of my calculations of 16x16 blocks.

I managed to get most of the functionality working though which is nice. Gonna take a week long break now as I need to go away with work.

Youtube update here [ Show youtube player ]

and what I see... http://109.228.4.199/rygar_22.mp4

Geezer

@Everyone in the thread.... thankyou all for your support, it really does keep me motivated!
mcgeezer is offline  
Old 20 November 2018, 23:48   #34
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
In this update I added the collectibles (items/powerups etc).

Unfortunately I've introduced a bug in the stones code somewhere which I wasn't able to track down quickly... it'll have to wait until Saturday.

It's important I get this part of the game right as it's really a core part of it. One really big pain in the arse is aligning the 16x16 collectibles centrally... you wouldn't believe how much of a pain this is as there's no easy options.

The problem isn't so much plotting them centrally on screen, it's when they scroll off-screen and come back on screen... half the item will be missing because the 16x16 scrolling routine overwrites half of the sprite that has been shifted into the centre.

There's a couple of options.... none of them easy though.

When I get all this right and bug free, I'll work on the enemies and then it will become a working game - not long now.

Youtube...
[ Show youtube player ]


Geezer
mcgeezer is offline  
Old 25 November 2018, 00:21   #35
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
So I spent a good few hours today rewriting parts of the stone animation code and management of them - they are still broken though but the code is better and cleaner.

There isn't a great deal of extra stuff from the previous video but I'll post it anyway for completeness.

The video is showing I have a bug with the stones that come up from the ground when Rygar jumps, it's an ordering bug because of performance. When the round starts I take a copy of the 4 16x16 tiles behind where the stone would appear and combine them to a 32x32 background. This means that all the objects are managed in the round and not just the ones that are onscreen - so Rygar can basically cause a stone to appear, not touch it and run from one end of the round and back and still destroy the stone with his disk armor.

Things have to be right here or the game will not be right, it is taking time but I'm making steady progress.

http://109.228.4.199/rygar_24.mp4

[ Show youtube player ]

Geezer
mcgeezer is offline  
Old 25 November 2018, 22:53   #36
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
A fair amount of time coding again today - but when things are going good its better to keep going as I was on a roll.

After a bit of overnight thinking in my subconscious I came up with a good idea on how to fix the stones ordering, a very simple and fast solution was just to keep an order list of where each stone was are on the X axis, this way I can tag which stone belongs to which background to restore.

Not only that, but as I had previously put all the collision routines into place I was very quickly able to put the weapon power ups into place.

Now one slight issue I had was with the Crown power up sprite in the disk armor. In the Arcade version you'll see the disk armor weapon gets a little bigger when you collect it... a little bigger is actually 22x22 pixels.... ughh, not exactly great for blitting. To get around it I've simply reduced the size of it to 16x16, in the demo you can just about see it is different (pause the video).

Next up I think I'll be working on memory management, then after that I'll work on the presentation (title/hiscore). Then onto the fun bits of enemies.

The three main weapons are working though so good progress!

http://109.228.4.199/rygar_25.mp4

[ Show youtube player ]

Geezer
mcgeezer is offline  
Old 02 December 2018, 23:21   #37
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
I haven't had a lot of time this weekend (kids parties, family and that kind of imporant stuff) but and won't over the coming couple of weeks (as I'm off on holiday), hence I've worked more on some of the eye candy stuff.

I just want to say yet again, a massive thank you to @ross - he is an extremely helpful guy and without him I would have found this particular part very difficult to achieve.

Thanks mate... I owe you more beer.

[ Show youtube player ]
mcgeezer is offline  
Old 11 December 2018, 01:11   #38
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Well.... a bit of nice eye candy on the intro scene.

I have to extract the font but other that it's pretty close.

[ Show youtube player ]

PS. This weekend I was in Euro Disney Paris and I had the opportunity to catch up with @dflrsilver and his lovely wife, we had a beer and a nice chat about Amiga related stuff.

It was a pleasure to meet you buddy, it really was nice chatting to you...just a shame I only had an hour or so.
mcgeezer is offline  
Old 16 December 2018, 01:13   #39
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
This is a great update as I've added most of the logic in the upper and lower panels.

Everything is implemented including the Ranks (notice how they increase which I have simply automated), the timer is working just about, Lives, Power-ups (although wrong order ) and round guide.

I also did a performance test and the game can still push roughly 20 * 32x32 sprites in one frame - but I'll need to be clever with how I use them as 12 of them need to work in specific screen regions.

Implementing the panels was a bit of a pain because the hardware sprites have priorities which dictate if a sprite is over or behind a playfield. Sprites need to go behind the upper and lower panels but must go infront of the main game area.

Getting there now....must work on that loader. What definetely works for in coding is when I code something non-visual and then visual, I spent ages getting the internal game logic working for the stones and collision detection and then have enjoyed doing these panels.

Once again - thanks to @Ross and @Roondar for their expert copper help - you guys are spot on!

Geezer

[ Show youtube player ]


Edit - here's the nice version of the video.

http://109.228.4.199/panels.mp4
mcgeezer is offline  
Old 18 December 2018, 00:09   #40
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,253
Another quick update tonight which is really nice as I finished the panels complete with timer and round guide, also added some nice eye candy copper to spruce up the bland background. I'm really pleased though with what happens when the timer reaches 0:00, it's really starting to feel like Rygar now.

Crappy Youtube Version

[ Show youtube player ]

Lovely test version that I get direct from WinUAE

http://109.228.4.199/bgfade2.mp4

I really really really must now work more on the memory management and loader otherwise I can't test on real hardware (which is an actual requirement for the compo)

mcgeezer
mcgeezer 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
Discussion: Rygar AGA Edition mcgeezer Coders. Contest 1800 07 September 2020 16:32
On the Ball - World Cup Edition AGA djcasey request.Old Rare Games 4 25 January 2013 13:39
Brian the Lion AGA - Computer Combat edition antonvaltaz support.Games 2 25 November 2011 12:35
The Vague #1 AGA-RTG edition is released ! kas1e Amiga scene 12 30 October 2007 01:27
On The Ball: World Cup Edition AGA CodyJarrett request.Old Rare Games 11 27 May 2003 07:14

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 18:22.


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