Lady Bug

developing/porting a new game or gaming framework? post in here!
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

i shouldnt give up on this, im very sorry but i just cant seem to make it work well

:(
Image Image Image Image
User avatar
fizgog
Posts: 618
Joined: Thu Jun 17, 2021 3:18 pm
Location: Nottinghamshire
Contact:

Re: Lady Bug

Post by fizgog »

You might want to leave it for a few months and come back to it later with a fresh pair of eyes.

Take your mind off it by creating a new game instead :wink:
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003338

(fixed) im now clearing player input when a level restarts after ladybug dies as it was possible for ladybug to turn the wrong way when the level restarts due to the previous pending player input

(fixed) missing pixels in enemy set 1

(change) altered the colors a little in boot.bas instructions

(change) [Conf] [ConfR] [Maps] [Maze1] [Maze2] [Maze3] renamed to _Conf _ConfR _Maps _Maze1 _Maze2 _Maze3
 
Lady Bug.ssd
(50.5 KiB) Downloaded 27 times
 
source.zip
(702.56 KiB) Downloaded 22 times
Last edited by lovebug on Sun Oct 02, 2022 11:22 pm, edited 4 times in total.
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

fizgog wrote: Sun Oct 02, 2022 4:45 pm You might want to leave it for a few months and come back to it later with a fresh pair of eyes.

Take your mind off it by creating a new game instead :wink:
true
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

maniacminer wrote: Tue Aug 30, 2022 1:27 amonly a slight slowdown when all the nasties are patrolling at full whack.
@maniac miner I really must thank you for this comment,the automatic frameskip does make the game look like its slowing down and it got me thinking about the problem and I think I have found a solution
 
In all builds so far this is how the frameskip functioned

The screen is split into two halves (upper and lower) and in each half up to 3 sprites can be drawn within 1 frame at 50Hz

If more than 3 sprites appear in a half screen then the extra sprites will be postponed until the next frame which causes the update rate for those sprites to be 2 frames (25Hz)

This automatic frameskip was applied to ladybug and enemies both
 
In this new build I have altered the sprite processing code in .redrawSprites so that ladybug is given priority and will always be drawn within 1 frame at 50Hz without frameskip, only enemies will have frameskip applied when needed so this should make things look smoother

Build 003340
 
Lady Bug.ssd
(50.5 KiB) Downloaded 31 times
 
source.zip
(702.67 KiB) Downloaded 18 times
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ERROR! this is completely wrong, please ignore !
I removed ladybug from the auto frameskip in the previous build but I forgot to reduce the sprite processing length by 1 so the .redrawSprites was still trying to process 5 sprites instead of just the 4 enemies, fixed now

Build 003341

 

 
Last edited by lovebug on Sun Oct 09, 2022 7:53 am, edited 2 times in total.
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ERROR! this is completely wrong, please ignore !
hmm I noticed that theres an issue with the enemy movement not looking smooth so I slowed the game down in beebem and can see that even when theres only 1 active enemy that its being drawn for 3 frames and then skips 1 frame

looking into the issue
Last edited by lovebug on Sun Oct 09, 2022 7:53 am, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003340 is correct and wasnt skipping a frame

I have recorded video and single frame stepped the game and its seems ok, please use 003340 thanks
Im still not sure what was causing the issue but it seems ok now

viewtopic.php?p=372315#p372315

Build 003341 is incorrect and has been deleted
Sorry guys


---- edit ----
Actually it was probably me poking around with things late at night and half asleep then thinking it was the build I had just posted :oops:
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

I just discovered an error in beebem's 6502 core

the SED (set decimal) and CLD (clear decimal) instructions are not clearing the carry and this is causing ladybug to give an extra 10 points on some items



you can test this with

Code: Select all

DIM C% 100:P%=C%:[SEC:SED:LDA#0:ADC#0:CLD:RTS:]:PRINT USR C% AND 255
answer should be 0


---- edit ----
ignore this, the information on 6502 im using is wrong :(

time to fix ladybug !
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003343 fixed missing clc instructions in the bcd math routines
 
Lady Bug.ssd
(50.5 KiB) Downloaded 35 times
 
source.zip
(702.89 KiB) Downloaded 26 times
 
this is kind of annoying because I originally had clc instructions but removed them after reading a dodgy 6502 datasheet that showed the sed and cld instructions also clear the carry :evil:

well that datasheet is now burning in silicon hell :P
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

i just checked back on my old builds and up to build 003333 i had the clc instrructions, build 003334 i had removed them because of that crappy 6502.txt file i was using from some random bbs backup. sorry guys

im going to stick with this reference from now on
Attachments
6502.pdf
(103.77 KiB) Downloaded 36 times
Image Image Image Image
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

I know I've shared this somewhere, but this is my little cheat sheet that I have on my desk, stuck to a piece of porridge box!
I can't guarantee that it is correct as I only occasionally look at what can be ,x and ,y when I forget!
I just had a look and thought that I had missed SEV, but it seems that there isn't one!
It is 6502 only, no undocumented/illegal opcodes.

Warning!
TobyLobster has stopped a mistake in branch timing when crossing a page.
Attachments
Tricky 6502.pdf
(81.87 KiB) Downloaded 43 times
Tricky 6502.doc
(75 KiB) Downloaded 19 times
Last edited by tricky on Thu Oct 13, 2022 3:28 pm, edited 1 time in total.
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

thanks tricky, very handy

the 6502.pdf I just posted is from the acorn atom user manual
Image Image Image Image
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Lady Bug

Post by 0xC0DE »

I usually keep a browser tab open with https://www.masswerk.at/6502/6502_instruction_set.html
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

thanks 0xC0DE very handy
Image Image Image Image
User avatar
TobyLobster
Posts: 618
Joined: Sat Aug 31, 2019 7:58 am
Contact:

Re: Lady Bug

Post by TobyLobster »

Tricky: I think branches take 4 cycles to branch to a new page don’t they (not 5 as your pdf shows)?
0xC0DE: I use that same page.
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

yeah its 3 cycles normally +1 cycle if to new page
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003345 I just managed to squeeze in an indication of the diamond bonus available in the lower panel just below the lives value, disapeers if you die, collect non-cyan objects or get the diamond bonus
 
Lady Bug.ssd
(50.75 KiB) Downloaded 26 times
 
source.zip
(703.63 KiB) Downloaded 23 times
 
003345 diamond bonus available.png
Last edited by lovebug on Tue Oct 18, 2022 3:17 pm, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

I couldnt do a more fancy looking indicator as the game is totally out of memory now

Sorry
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

oh it turns out that I had loads of free space in the sideways ram but due to a mistake in loader.asm and memory.asm (and my lack of skill when it comes to math) it was reporting incorrectly

i'll work on making a nice sparkly diamond sprite and the code to display it :D
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003346

Added sparkly diamond bonus available tiles and code replacing the previous

Fixed yet another memory report error this time in build.asm

Altered the map editor tiles to better show the end pieces

Added a long overdue thank you to the github readme.md

Code: Select all

A big thank you to
Kieranhj for their image2mode7 utility allowing me to make the lovebyte loading screen
Dreamland Fantasy's for their image2bbc utility allowing me to make the maze editor tiles
HeadHunter for recreating the enemy release sound for 50Hz using math !
And to everyone at the stardot forums for their kind words, help and support
 
Lady Bug.ssd
(51 KiB) Downloaded 25 times
 
source.zip
(700.19 KiB) Downloaded 16 times
 
003346 lower diamond.png
 
003346 editor tile ends.png
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003347 fixed a mistake

vegetable bonus score update

when vegetable bonus score is displayed it draws over the center enemy box, when the score is removed I was drawing the two vertical bars of the enemy box but if a player creates their own map that didnt contain a center box then this action is incorrect

fixed it by reading the tileMap background buffer and drawing the correct content
 
Lady Bug.ssd
(51 KiB) Downloaded 19 times
 
source.zip
(705.56 KiB) Downloaded 18 times
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Build 003348

A while back i modified boot.bas so that the instructions page in the basic $.Boot showed the user defined keys

One thing that bugged me about the instruction pages is that the information about extra lives, special bonus, diamond bonus were hard coded into the page which will be incorrect if someone reassembled the game and altered these constants for more lives etc

To fix this ive added an extra file bonus.asm which sets up the constants in memory which is then saved by build.asm to $._Bonus so that the $.Boot can read the values and display the correct information in the instruction pages
 
Lady Bug.ssd
(51.25 KiB) Downloaded 29 times
 
source.zip
(706.54 KiB) Downloaded 21 times
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Final Build 003350

ages ago I noticed that when redefining the keys in the lady bug menu when using jsbeeb emulator that the turnstile sound was incorrect for the first 3 keypresses but the final key sounded ok, strangely all 4 key presses sounded ok in beebem :?

I just discovered the cause was down to the function .keyboardScan which was setting via1 porta ddr bit 7 as input for the keyscan but wasnt setting it as output for the psg before exiting which caused sound data corruption from the missing bit 7

fixed now so final build again :lol:
 
Lady Bug.ssd
(51.25 KiB) Downloaded 34 times
 
source.zip
(706.84 KiB) Downloaded 27 times
Last edited by lovebug on Wed Jan 18, 2023 8:50 pm, edited 4 times in total.
Image Image Image Image
User avatar
fizgog
Posts: 618
Joined: Thu Jun 17, 2021 3:18 pm
Location: Nottinghamshire
Contact:

Re: Lady Bug

Post by fizgog »

lovebug wrote: Mon Dec 19, 2022 9:49 pm fixed now so final build again :lol:
:lol:
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

wow I just spotted a silly mistake in the function that draws 4 random enemies on the main menu screen

in .mainMenuDrawEnemies I call .random at the start to get the first random enemy and direction from randomSeed + 1 and randomSeed
but in the loop I do this :(

Code: Select all

	inc randomSeed				; increment direction for next sprite
	inc randomSeed + 1			; increment sprite image for next sprite
well this is very bad because if by chance the seed contained &FCFC when entering this function the seed would end up set to &0000 on exit after drawing the the 4 enemies and thats game over for the random number generator, this would cause the game to lockup completely as .random would only generate an infinite string of 0's :(

ive fixed this silly mistake by using a copy of the seed keeping the original safe :D

theres been a few other things like optimizations, allowing the last dot munch sound to play fully before ending the level, a new clear screen function for the map editor and more... check out the github repo history for details

Lady Bug Build 003351
 
Lady Bug.ssd
(52 KiB) Downloaded 19 times
 
003351.png
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ive always wondered why the sprites flicker when crossing the center line threshold between the lower and upper half of the screen
I think I found it, well it seems to work

I havent seen any side effects from this change \:D/

Build 003353
 
Lady Bug.ssd
(52 KiB) Downloaded 11 times
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

I did spot two side effects with the recent change, the cursor box and ladybug on the high score name registration screen flickered so ive fixed that

Build 003356
 
Lady Bug.ssd
(52 KiB) Downloaded 28 times
 
003356.png
Last edited by lovebug on Fri Jun 09, 2023 9:36 pm, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

thats gotta be the final build :P
Image Image Image Image
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Lady Bug

Post by marcusjambler »

Congrats =D>
Post Reply

Return to “new projects in development: games”