Lady Bug
Re: Lady Bug
Looking good, glad the memory jog was useful.
Re: Lady Bug
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
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
Re: Lady Bug
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
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
Re: Lady Bug
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
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
Re: Lady Bug
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
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
I had a go at drawing ladybugs upward facing sprites, not perfect but ok
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
Last edited by lovebug on Sat Apr 10, 2021 3:05 am, edited 1 time in total.
Re: Lady Bug
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
its not perfect but im happy with it so far
Re: Lady Bug
Wow, they look awesome zipping around at top speed with them googly eyes!! Love it!
Please subscribe to the ABug YouTube channel!
Re: Lady Bug
redid the horizontal enemy bugs, they looked too thin, much better now
Last edited by lovebug on Sat Apr 10, 2021 6:30 am, edited 2 times in total.
Re: Lady Bug
My artistic talent is one reason I stick with mode 1. Your bud look great
- cardboardguru
- Posts: 239
- Joined: Fri Mar 09, 2018 10:26 pm
- Contact:
Re: Lady Bug
Looking good!
Re: Lady Bug
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
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
- cardboardguru
- Posts: 239
- Joined: Fri Mar 09, 2018 10:26 pm
- Contact:
Re: Lady Bug
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.
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.
Re: Lady Bug
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
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
Re: Lady Bug
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
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
Re: Lady Bug
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
---- edit ---- after playing around with gimps settings a lot I found a solution, see below
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
---- edit ---- after playing around with gimps settings a lot I found a solution, see below
Last edited by lovebug on Mon Apr 12, 2021 10:23 pm, edited 6 times in total.
Re: Lady Bug
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.
Re: Lady Bug
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
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
- Kecske Bak
- Posts: 753
- Joined: Wed Jul 13, 2005 8:03 am
- Location: Mélykút, Hungary
- Contact:
Re: Lady Bug
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.
[url]https://kecskebak.hu]
Re: Lady Bug
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 ratioKecske 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.
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.
Re: Lady Bug
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
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
- Kecske Bak
- Posts: 753
- Joined: Wed Jul 13, 2005 8:03 am
- Location: Mélykút, Hungary
- Contact:
Re: Lady Bug
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
[url]https://kecskebak.hu]
Re: Lady Bug
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
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
Re: Lady Bug
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 1 enemy 4 enemys 8 enemys
0 enemys 1 enemy 4 enemys 8 enemys
- marcusjambler
- Posts: 1150
- Joined: Mon May 22, 2017 12:20 pm
- Location: Bradford
- Contact:
Re: Lady Bug
Loving this dev and game port.... Thankyou lovebug
Re: Lady Bug
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