Another piece of the gameplay puzzle has finally fallen into place!
It's not really been necessary to do it until now since some gameplay mechanics just get in the way of testing and debugging, but I have now coded the, er, code that detects 'dangerous' scenery around the player and drains energy if touched. The main 'obstacles' in the various levels are mushrooms and pools of green slime and if they are walked upon, energy is subtracted.
I've tried to be fair however; the detection is quite 'loose' and you can jump up near or through such scenery without being penalised, with the energy drain only occurring if the player directly walks on such scenery. However, on some levels the mushrooms may be 'reversed' chars and appear only as silhouettes amongst other scenery; they can be quite difficult to spot in the heat of the action and will probably annoy those who go charging around without stopping, looking and thinking!
Here's how it looks in action (the animation below also showcases the first outing of the girl player, who is now selectable from the title screen!):
The scenery collision detection reuses values calculated from the gravity subroutine so checks what is underneath the players feet. There is a bit of a cheat going on - the subroutine is not checking the mushrooms directly, but 'special' chars underneath the mushrooms that trigger the collision!
Next diary entry coming soon...
Showing posts with label chars. Show all posts
Showing posts with label chars. Show all posts
Tuesday, 25 February 2020
Saturday, 22 February 2020
Level 10 Design
To wrap up my short break from work, late last night I completed the design for Level 10, set down in a basement. As ever, the design is likely to change slightly once proper testing begins, but it already look and 'feels' good to me!
The level includes some pipework and conduit; anyone who knows me knows my love of 8-bit pipes in games! The pipes pump out some green slime which drains your energy on contact. Also new to the scenery are some wooden boxes and some wall chains. I may well add some extra detail later on, depending on whether I have many chars left.
The basement looks a little like this at present...
Although I still need to work out the cross locations for Level 4 onwards, I've have now added all the enemy paths and pattens for all the levels, including Level 10. Here is Level 6 (The Cinema) with it's enemies inserted...
Next diary entry...
The level includes some pipework and conduit; anyone who knows me knows my love of 8-bit pipes in games! The pipes pump out some green slime which drains your energy on contact. Also new to the scenery are some wooden boxes and some wall chains. I may well add some extra detail later on, depending on whether I have many chars left.
The basement looks a little like this at present...
Although I still need to work out the cross locations for Level 4 onwards, I've have now added all the enemy paths and pattens for all the levels, including Level 10. Here is Level 6 (The Cinema) with it's enemies inserted...
Next diary entry...
Friday, 21 February 2020
Level 7, 8 and 9 Design
I've been away for the week, but took my laptop with me so I could carry on designing more levels for Chiller 2! Take pity on my long suffering wife!
Level 7 is set in a park and features the rain from an earlier level expanded to fill more of the screen. I do intend to go back to this level and add a bit more silhouette detail once I've designed further levels - I don't want to run out of chars too early! The park level looks a little like this (excuse the lower quality screen-grab as I'm getting worried about sharing too much of the game)...
Level 8 is set underground in a sewer! This level features an expanded version of the slime pools from the cemetery level, with additional slime 'falls'. As with the park, more detail may be added later when I get a better idea of how many chars I will have remaining after the majority of the levels have been designed. The sewer looks like this (although some modifications have been made since this grab)...
Level 9 is set outside and features a log cabin. All the best horror films have a cabin in the wood scene don't they?! The great thing about this level is that it was pixelled using practically all existing chars, leaving me chars for future use! The log cabin looks like this...
I've also already started designing Level 10, which is set in a basement and will feature more slime oozing from a feature I have a slight fetish for - 8bit pixel pipes and conduits! More on this soon!
Next diary entry...
Level 7 is set in a park and features the rain from an earlier level expanded to fill more of the screen. I do intend to go back to this level and add a bit more silhouette detail once I've designed further levels - I don't want to run out of chars too early! The park level looks a little like this (excuse the lower quality screen-grab as I'm getting worried about sharing too much of the game)...
Level 8 is set underground in a sewer! This level features an expanded version of the slime pools from the cemetery level, with additional slime 'falls'. As with the park, more detail may be added later when I get a better idea of how many chars I will have remaining after the majority of the levels have been designed. The sewer looks like this (although some modifications have been made since this grab)...
Level 9 is set outside and features a log cabin. All the best horror films have a cabin in the wood scene don't they?! The great thing about this level is that it was pixelled using practically all existing chars, leaving me chars for future use! The log cabin looks like this...
I've also already started designing Level 10, which is set in a basement and will feature more slime oozing from a feature I have a slight fetish for - 8bit pixel pipes and conduits! More on this soon!
Next diary entry...
Saturday, 15 February 2020
Level 6 Design
Hot on the heels of designing Level 5 a couple of days ago (read here...), I've only gone and designed Level 6! This level is set inside a cinema and is a call-back to the original game, which also had a level inside a cinema.
The original Chiller level had a slightly odd perspective, with a screen in the distance and chairs that decreased in size the closer to the screen. When static, that kind of looks fine, but when your character sprite approaches the never changing cinema screen, the sprite stays it's original size and things tend to look all strange then.
In Chiller 2, I've drawn a screen at the top of the display and chairs on platforms all around, with no perspective tricks tried at all. I have reused, albeit with different colours, some of the staircase chars from Level 4 (The Haunted House) for some variety. And to combat the original game having a cinema screen that never changed, my cinema screen will have a very simple animated noise effect, with flickering black and white pixels - truth be told, this is already coded and working!
Here's what the level looks like in my editor, ChillED...
As an aside, I've now altered the code slightly so that each level can have it's own 'timer' for the background animations. Up until now, all the background animations (flame, rain, slime, etc.), have shared a timer and been updated every fourth frame, which has been fine until the cinema screen 'noise' was coded up and ended up being too slow. Thus, each animation has now been tweaked to a more suitable speed for what it's displaying.
Also, I cannot tell a lie. I've installed a cheat mode whereby pressing up on the joystick skips to the next level! Hey, the game is getting bigger now and it's the only way I can check that everything is working properly! This cheat will be removed before release!
Next diary entry...
The original Chiller level had a slightly odd perspective, with a screen in the distance and chairs that decreased in size the closer to the screen. When static, that kind of looks fine, but when your character sprite approaches the never changing cinema screen, the sprite stays it's original size and things tend to look all strange then.
In Chiller 2, I've drawn a screen at the top of the display and chairs on platforms all around, with no perspective tricks tried at all. I have reused, albeit with different colours, some of the staircase chars from Level 4 (The Haunted House) for some variety. And to combat the original game having a cinema screen that never changed, my cinema screen will have a very simple animated noise effect, with flickering black and white pixels - truth be told, this is already coded and working!
Here's what the level looks like in my editor, ChillED...
As an aside, I've now altered the code slightly so that each level can have it's own 'timer' for the background animations. Up until now, all the background animations (flame, rain, slime, etc.), have shared a timer and been updated every fourth frame, which has been fine until the cinema screen 'noise' was coded up and ended up being too slow. Thus, each animation has now been tweaked to a more suitable speed for what it's displaying.
Also, I cannot tell a lie. I've installed a cheat mode whereby pressing up on the joystick skips to the next level! Hey, the game is getting bigger now and it's the only way I can check that everything is working properly! This cheat will be removed before release!
Next diary entry...
Thursday, 13 February 2020
Level 5 Design
In the diary entry called 'Level 4 Design', I described that level as 'the toughest so far'.
Forget that!
I've just designed Level 5, set outside in a cemetery and it's an absolute pig of a level! Virtually all of the enemies are in your path constantly, the platforms are quite far apart and are peppered with mushrooms ready to drain your energy AND now there is a new introduction to the gameplay - small pools of green slime that, although can be walked on, drain your energy just like the mushrooms!
I've already added the enemy paths and just need to enter the cross locations in hex. I really may need to make this level a little easier; it may not look that hard but playing it is something all together different, particularly if your energy is low! At the moment, the cemetery looks a little like this...
Next diary entry...
Forget that!
I've just designed Level 5, set outside in a cemetery and it's an absolute pig of a level! Virtually all of the enemies are in your path constantly, the platforms are quite far apart and are peppered with mushrooms ready to drain your energy AND now there is a new introduction to the gameplay - small pools of green slime that, although can be walked on, drain your energy just like the mushrooms!
I've already added the enemy paths and just need to enter the cross locations in hex. I really may need to make this level a little easier; it may not look that hard but playing it is something all together different, particularly if your energy is low! At the moment, the cemetery looks a little like this...
Next diary entry...
Saturday, 18 January 2020
Level 4 Design
Off the back of sorting the cross locations for Level 2 yesterday, the evening saw the beginnings of me tentatively designing Level 4. As stated in a previous blog entry (see here), I never intended to have levels set in exterior and internal locations alternatively, but since I've seemed to set off down this path, it shall continue!
Thus, after Level 3 being set outside, we're back indoors for Level 4 and most of today has been spent creating the inside of a haunted house! This gives me a chance to save some characters in the charset by reusing some used in level 2, as well as adding new chars specifically designed for this level. I need to do this after blowing five chars on the rain in Level 3!
New chars and features for this level include a wooden staircase that can be used to reach higher platforms, a stone fireplace (so as to reuse the animating flame char from Level 2) and a rather ominous looking rope and noose!
Since this is now Level 4, I'm assuming the player is getting better at the game, so platforms in this level are deliberately further apart to make them harder to cross, with gaps below that the player falls down if the jump is 'missed'. Along with avoiding the planned to be fast moving enemies, this level should be the toughest so far. I hope!
What does the level look like? On this occasion, I've done a time-lapse animation showing the build up over the course of the day it took to design. Of course, things will probably change as the enemies and crosses are plonked into place and the level tested.
Next diary entry...
Thus, after Level 3 being set outside, we're back indoors for Level 4 and most of today has been spent creating the inside of a haunted house! This gives me a chance to save some characters in the charset by reusing some used in level 2, as well as adding new chars specifically designed for this level. I need to do this after blowing five chars on the rain in Level 3!
New chars and features for this level include a wooden staircase that can be used to reach higher platforms, a stone fireplace (so as to reuse the animating flame char from Level 2) and a rather ominous looking rope and noose!
Since this is now Level 4, I'm assuming the player is getting better at the game, so platforms in this level are deliberately further apart to make them harder to cross, with gaps below that the player falls down if the jump is 'missed'. Along with avoiding the planned to be fast moving enemies, this level should be the toughest so far. I hope!
What does the level look like? On this occasion, I've done a time-lapse animation showing the build up over the course of the day it took to design. Of course, things will probably change as the enemies and crosses are plonked into place and the level tested.
Next diary entry...
Wednesday, 28 August 2019
Animating Chars
When I first designed the church interior layout for level 2, one of the little background features I added to "fill the gaps" was a flaming wall torch. I say flaming, but originally as designed, the flame was static (see gif's in previous diary entry).
This has now been bugging me for a few weeks; nagging away in the back of my head somewhere has been a little voice muttering, "You want that torch animating really, don't you?". Being new to 6510 coding, I didn't want to start bogging myself down with extras (feature creep?) but it REALLY has been annoying me that the flames don't move. So today the investigation/research into character animation started.
And I wish I'd done it earlier because it turned out to be rather easy! First, here is the code I came up with to "fan the flames" so to speak...
The code above includes a timer (bkgd_timer) that slows the animation so it only executes once every 4 (TV / screen refresh) frames otherwise it animates rather too quick to be visible! How does the rest of it work?
First, where is the flame in memory? Well, when assembling my code, my character set is loaded to $2000 in memory. My flame character is number "114" ($72) in the charset - the blue boxed char in the image above, also shown larger in the magnified section in the right hand side of the above image. Each char is made of 8 bytes (8 rows, or bytes, of 8 pixels, or bits), so 114 x 8 = 912 ($390). Therefore, my flame char should be at $2000 + $390 = $2390 in memory.
In the 6502 instruction set there are a few handy commands called LSR, ASL, ROL and ROR. These basically allow you to shift bits of a byte left or right. When it comes to character sets, this has the effect of "scrolling" a char block left or right 1 pixel, while "wrapping" around within itself.
This is something I'm still coming to terms with; being a graphics person originally, I still think of images (pixels) moving up, down, left, right and so on. But as a coder, you need to thing of bits and bytes of memory moving around, which is what is really happening.
And it's as easy as that! In my code you can see the starting memory location of the flame char being loaded, then the starting location is LSR'd / ROR'd 3 times to shift the char (memory) 3 pixels (bits) right. This is done 8 times overall so each row (byte) of the char is shifted. Why 3 times? Well, that was just experimentation. After pixelling my flame, the overall shape of it suggested that it should be "moved" 3 pixels right every 4 TV frames (screen draws/refreshes) to get the best "flickering" effect. I did try other combinations, but the above worked best for my flame char.
And what does it look like? Savour the animated gif below (disclaimer, the animation looks better than the gif suggests, honest!)...
Next diary entry...
This has now been bugging me for a few weeks; nagging away in the back of my head somewhere has been a little voice muttering, "You want that torch animating really, don't you?". Being new to 6510 coding, I didn't want to start bogging myself down with extras (feature creep?) but it REALLY has been annoying me that the flames don't move. So today the investigation/research into character animation started.
And I wish I'd done it earlier because it turned out to be rather easy! First, here is the code I came up with to "fan the flames" so to speak...
; background animations subroutine ---------------
process_bkgd_anims
ldy bkgd_timer ; load up the bkgrd anim timer
iny ; increase it by '1'
cpy #$04 ; is the timer equal to '4' yet?
bne bkgrd_anim_skip ; no? don't update animation!
; yes? better do some animation then!
ldx #$00 ; zero x register
flame_ror
lda $2390,x ; load mem location of the flame char
lsr
lsr
lsr
ror $2390,x ; shift char to the right a pixel (bit)
ror $2390,x ; and shift again
ror $2390,x ; and again
inx
cpx #$08 ; all 8 bytes done?
bne flame_ror ; no? do the next byte then!
; yes?
ldy #$00 ; load y register with '0'
bkgrd_anim_skip ; to reset bkgrd anim timer and...
sty bkgd_timer ; store y register to bkgrd anim timer
rts ; return to main loop
The code above includes a timer (bkgd_timer) that slows the animation so it only executes once every 4 (TV / screen refresh) frames otherwise it animates rather too quick to be visible! How does the rest of it work?
First, where is the flame in memory? Well, when assembling my code, my character set is loaded to $2000 in memory. My flame character is number "114" ($72) in the charset - the blue boxed char in the image above, also shown larger in the magnified section in the right hand side of the above image. Each char is made of 8 bytes (8 rows, or bytes, of 8 pixels, or bits), so 114 x 8 = 912 ($390). Therefore, my flame char should be at $2000 + $390 = $2390 in memory.
In the 6502 instruction set there are a few handy commands called LSR, ASL, ROL and ROR. These basically allow you to shift bits of a byte left or right. When it comes to character sets, this has the effect of "scrolling" a char block left or right 1 pixel, while "wrapping" around within itself.
This is something I'm still coming to terms with; being a graphics person originally, I still think of images (pixels) moving up, down, left, right and so on. But as a coder, you need to thing of bits and bytes of memory moving around, which is what is really happening.
And it's as easy as that! In my code you can see the starting memory location of the flame char being loaded, then the starting location is LSR'd / ROR'd 3 times to shift the char (memory) 3 pixels (bits) right. This is done 8 times overall so each row (byte) of the char is shifted. Why 3 times? Well, that was just experimentation. After pixelling my flame, the overall shape of it suggested that it should be "moved" 3 pixels right every 4 TV frames (screen draws/refreshes) to get the best "flickering" effect. I did try other combinations, but the above worked best for my flame char.
And what does it look like? Savour the animated gif below (disclaimer, the animation looks better than the gif suggests, honest!)...
Next diary entry...
Subscribe to:
Posts (Atom)










