Lady Bug

developing/porting a new game or gaming framework? post in here!
Post Reply
User avatar
tricky
Posts: 7721
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

Looking good, glad the memory jog was useful.
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

thanks tricky :)



I added a little bit of code to processSprites that handles the erase and draw, now its checking the sprite direction and choosing which set of sprite tiles to display

im only drawing left and right sprites at the moment as I havent added any vertical sprites to sprites.bin yet
 
 
 
ladybug.ssd
(13.75 KiB) Downloaded 51 times
screenshot.png
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

sprites.bin will contain ladybug and 8 enemy bug types each with 3 frames of animation and two directions (left and up) of 70 bytes each
this will come to 9 * 3 * 2 * 70 = 3780 bytes

each game level has a maximum of 4 enemy types on screen + ladybug so just before a round starts i need to generate sprite images into a buffer for

left facing shifted 1 pixel right
right facing
right facing shifted 1 pixel right

so thats 5 bug types each with 3 frames of animation and 3 directions of 70 bytes each
this will come to 5 * 3 * 3 * 70 = 3150 bytes

total space required for sprites.bin and generated sprites = 6930 bytes

downward facing sprites dont require any pixel swapping/shifting and can be drawn in reverse order directly from the original upward facing sprite without any speed penalty so dont require any buffer space

ive just calculated I have 3792 bytes remaining before optimization to finish the game, its getting tight
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

just got all 4 directions working for the sprites but using temporary images as i havent drawn anything still

I think the next thing I need to do is get the rotating green turnstyles to change direction when ladybug pushes against them so I can test ladybug escaping the enemys and also controlling the enemys movement by changing the maze layout
 
 
 
ladybug.ssd
(14 KiB) Downloaded 51 times
screenshot.png
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

wow its difficult drawing rotated sprites when the pixels are 2:1 ratio

I had a go at drawing ladybugs upward facing sprites, not perfect but ok

 
 
ladybug.ssd
(14 KiB) Downloaded 38 times
screenshot.png

I can see this is gonna take a long time to draw all the enemy bugs, i've gotta redraw all these in 9 x 14 pixels
 
!arcade-sprites-bbc-colors.png
!arcade-sprites-bbc-colors.png (3.55 KiB) Viewed 3886 times
Last edited by lovebug on Sat Apr 10, 2021 3:05 am, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

I had a go at drawing one of the enemy bug sprite sets, I needed a break from the code and just wanted to see some bugs:D

its not perfect but im happy with it so far
 
 
ladybug.ssd
(14 KiB) Downloaded 43 times
Image Image Image Image
User avatar
Arcadian
Site Admin
Posts: 4227
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Lady Bug

Post by Arcadian »

Wow, they look awesome zipping around at top speed with them googly eyes!! Love it!
Please subscribe to the ABug YouTube channel!
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

redid the horizontal enemy bugs, they looked too thin, much better now
 
sprites.png
sprites.png (982 Bytes) Viewed 3882 times
 
 
ladybug.ssd
(14 KiB) Downloaded 43 times
screenshot.png
Last edited by lovebug on Sat Apr 10, 2021 6:30 am, edited 2 times in total.
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

tried to fix the bugs eyes as best I could
sprites.png
sprites.png (979 Bytes) Viewed 3881 times
 
 
ladybug.ssd
(14 KiB) Downloaded 38 times
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

fixed the eyes and tummy
sprites.png
sprites.png (973 Bytes) Viewed 3872 times
 
ladybug.ssd
(14 KiB) Downloaded 38 times
Image Image Image Image
User avatar
tricky
Posts: 7721
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

My artistic talent is one reason I stick with mode 1. Your bud look great :)
User avatar
cardboardguru
Posts: 239
Joined: Fri Mar 09, 2018 10:26 pm
Contact:

Re: Lady Bug

Post by cardboardguru »

Looking good!
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

thanks guys

im finding it really difficult to work on the graphics using photoshop 7 as it only seems to supports 1:1 pixel size so im having to guess what it looks like on the beebs 2:1 pixel screen

ive tried working on double width images drawing two pixels at a time but it usually goes wrong

do you know if there is any setting that ive missed that could support 2:1 pixel ratio in photoshop 7 or a quick hack that could be applied ?

thanks
Image Image Image Image
User avatar
cardboardguru
Posts: 239
Joined: Fri Mar 09, 2018 10:26 pm
Contact:

Re: Lady Bug

Post by cardboardguru »

Apparently Asesprite can do wide pixels.

https://imgur.com/1yZKUcs

You can buy it as finished installable application, or get the source from GitHub for free and build it yourself.

I haven't tried it.
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ah thanks for that i'll take a look

I do have cheat engine installed which i use for various things ;) I might be able to find photoshops internal x and y scaling variables and tweak it

when you zoom in and out of an image there is some scalling performed on the image so it might be possible to hack it a bit
I could search for the code that reads the scale factor and applies it to x and y and add a little extra code to double it before applying it to the x
Image Image Image Image
User avatar
tricky
Posts: 7721
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Lady Bug

Post by tricky »

I don't know Photoshop, does it have any brushes or patterns that would grid align?
In paint shop Pro, you can set a grid size to view over the image, if PS has it, maybe a 2x1 pixel grid would help. Failing that, how about a chequer board of 2x1s in a translucent layer over the sprites?
I was also wondering if you could change your desktop resolution to squish your actual pixels :)
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

interesting ideas there tricky :)
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

foundation for turnstile map alteration and animation in place but not complete yet so currently doesnt draw or change anything
turnstile detection for ladybug working so she can pass through the turnstiles but nothing happens yet because of above

dot detection and removal working in tilemap, 10 points scored for each dot

im still not redrawing the tile behind the sprites yet so what ever they pass over gets erased from the screen but is still there in the tileMap
press return/enter to redraw the tileMap if you want to see how many dots remaining or to repair the broken turnstile you've driven through

altered the drawMapTile back to storing all bytes (was skipping &00) just to gain that extra few cycles (removes 24 BEQ instructions when a tile is drawn) but then I was back to the original issue of the timer cropping the skulls and letters on the left side (because they are wider and hang over from column 1 to 0) so I had to add a test after drawing the timer tile to check that if its in column 0 then read then check the tile in column 1 and if its an object tile then redraw it. doesnt happen often so it shouldnt cause an issue. if you drive over the objects in column 1 now you'll see them return when the timer passes by lol

tidied up some code here and there

I will be working on the turnstyle animation and sprite tileMap background restoring next

I had a crazy idea of compiling gimp on windows and then writing an extra option for pixel aspect ratio so I can work on the beebs sprites easily :D
---- edit ---- after playing around with gimps settings a lot I found a solution, see below
 
 
ladybug.ssd
(14.25 KiB) Downloaded 44 times
screenshot.png
Last edited by lovebug on Mon Apr 12, 2021 10:23 pm, edited 6 times in total.
Image Image Image Image
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Lady Bug

Post by lurkio »

lovebug wrote: Sun Apr 11, 2021 8:46 pm ladybug.ssd
Really fast and smooth!

=D> =D> =D>
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

lurkio wrote: Sun Apr 11, 2021 8:53 pm
lovebug wrote: Sun Apr 11, 2021 8:46 pm ladybug.ssd
Really fast and smooth!

=D> =D> =D>
thanks, I tried my best to get it as smooth as possible by doing the following

the screen is split into upper and lower halves
up to 3 sprites can be drawn in any half @ 50 fps but will drop to 25 fps if theres more than 3 (frame skip)
this doesn't affect the other half and it will continue to draw @ 50 fps

all movement calculations are done @ 50 fps regardless of the drawing speed so that the movement stays constant and the game doesnt slow down


btw you can try the bugs at different speeds as the speed is picked randomly every time you boot (for testing)

in the final game it'll start at 1 pixel/frame and increase every round up to some maximum limit yet to be decided
ladybug always moves at 1 pixel/frame and never increases in speed so the game becomes a real challenge at higher levels
Last edited by lovebug on Mon Apr 12, 2021 10:24 pm, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

great news, i just downloaded gimp art editor and found its possible to change the pixel aspect ratio

in view menu disable dot for dot
in image menu print size unlink the x and y resolution and set the dpi for x resolution to 1/2 the y resolution, x 36 y 72 in my case.

this will display the beebs double width mode 2 pixels correctly, very handy for editing beeb graphics
 
 
screenshot.png
Image Image Image Image
User avatar
Kecske Bak
Posts: 753
Joined: Wed Jul 13, 2005 8:03 am
Location: Mélykút, Hungary
Contact:

Re: Lady Bug

Post by Kecske Bak »

That's really interesting. I've been using GIMP to design graphics for the Beeb for years, but what I had been doing was using a 2x1 pixel grid and a 2x1 pixel brush. This doesn't stop you from getting a pixel half way between two pixels, so your method is much better.
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

Kecske Bak wrote: Mon Apr 12, 2021 12:30 pm That's really interesting. I've been using GIMP to design graphics for the Beeb for years, but what I had been doing was using a 2x1 pixel grid and a 2x1 pixel brush. This doesn't stop you from getting a pixel half way between two pixels, so your method is much better.
yeah ive been using photoshop 7 and having the same issue of displacing by 1 pixel so have been working 1:1 but it was really difficult because of the wrong aspect ratio

ive tried gimp before but I never really looked through all the settings, but today I went through everything and found a way
who would have thought you could control the pixel aspect ratio through the print size menu ! madness

-----edit------------- I was expecting to have to rewrite the 4 programs i created (fontmaker, spritemaker, tilemaker, vegetablemaker) which take the raw pixel format i was saving from photoshop and convert them into .bin files in the beebs pixel format for inclusion into the game with incbin

I exported raw rgb from gimp and was expecting the graphics to be a complete mess or not work at all but it works fine, its exactly the same format ! what a bonus
Last edited by lovebug on Mon Apr 12, 2021 10:01 pm, edited 3 times in total.
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

ive been working on the turnstile code and everything is in place
the changing of the turnstile tile data to horizontal or vertical and the screen animation from one to the other including the diagonal frame between the two

but something is very wrong with the calculated tileMap addresses and its corrupting memory all over the place including the program code, had some really random and funny crashes but mostly freezing

i'll fix the address calculation bug and i'll upload it soon
Image Image Image Image
User avatar
Kecske Bak
Posts: 753
Joined: Wed Jul 13, 2005 8:03 am
Location: Mélykút, Hungary
Contact:

Re: Lady Bug

Post by Kecske Bak »

lovebug wrote: Mon Apr 12, 2021 6:14 pm ive tried gimp before but I never really looked through all the settings, but today I went through everything and found a way
who would have thought you could control the pixel aspect ratio through the print size menu ! madness
Yes, I'd have never thought of that! Sometimes I also use BeebSpriter by Rich Talbot-Watkins. That also handles 2x1 pixels as it's designed for Mode 2.

http://www.retrosoftware.co.uk/wiki/ind ... eebSpriter
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

beebspriter looks great, how easy is it to work with ?
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

these turnstile have given me a lot of headache

had to remove the turnstile diagonal animation frame as it looked really terrible, I just couldnt make diagonal lines in a 6x8 tile look good
im having issues with the tiles disapeering some times and requires return/enter to redraw the screen
but its working and at least its not crashing now

the only other thing I have done is add a variable for the number of enemys to be processed (target ladybug, change direction and move) which can now be from 1 to 8, going to use this on the game settings screen for difficulty level
 
 
ladybug.ssd
(14.5 KiB) Downloaded 32 times
Image Image Image Image
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

finally found the cause of the turnstile erase was down to the order of things being drawn in the main loop and once I had juggled things around it worked fine and ladybug doesnt erase the turnstiles now although the enemys will if they follow behind and get through, this is caused by the sprite erase but I think that once I have added the background redraw behind the sprites it should solve that

0 enemys
ladybug.ssd
(14.75 KiB) Downloaded 29 times
1 enemy
ladybug.ssd
(14.75 KiB) Downloaded 28 times
4 enemys
ladybug.ssd
(14.75 KiB) Downloaded 27 times
8 enemys
ladybug.ssd
(14.75 KiB) Downloaded 29 times
Image Image Image Image
User avatar
marcusjambler
Posts: 1150
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Lady Bug

Post by marcusjambler »

Loving this dev and game port.... Thankyou lovebug =D>
User avatar
lovebug
Posts: 1765
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Lady Bug

Post by lovebug »

marcusjambler wrote: Fri Apr 16, 2021 12:00 am Loving this dev and game port.... Thankyou lovebug =D>
thanks marcusjambler

im gonna have a go at writing the background restore next although even before I start I can already see theres gonna be an issue with the background tile restore on one sprite cutting holes into another sprite when they are close to each other, i'll have to see how it looks
Image Image Image Image
Post Reply

Return to “new projects in development: games”