Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scramble (arcade game remake)
#41
(03-25-2023, 06:20 PM)grymmjack Wrote: This is incredibly well done. Also, the code is very easy to read.

You sir, have skills.

Thank you for sharing. Scramble was one of my favorites in the arcade. Smile

Always nice to meet another Scramble fan!

(03-25-2023, 06:28 PM)grymmjack Wrote: This is a shining example of how to program something that is easy to understand, easy to learn from, etc. 

Rok: would you mind if I made a YouTube video for my It's More Fun to Compute Series, to give you props that reviewed your program, explained what I like about it, and showed it off? 

Thanks for making this. I'm really impressed with how readable and elegant your code is. Please let me know. I will not do this unless you give me permission.

Also, do you have other games that you've ported Smile ?

GREAT WORK

You're very welcome to add it to a YouTube video. Don't forget to ping me the link if you go ahead with that!

In terms of others ports, the only one I've done in QB64pe is Galaga. If you ever wander across to the block-based world of Scratch though...
Reply
#42
Hi RokCoder
very cool Scramble clone!
It remember me the cabinet's game in the bar!
Reply
#43
(03-26-2023, 10:58 PM)TempodiBasic Wrote: Hi RokCoder
very cool Scramble clone!
It remember me the cabinet's game in the bar!

Kind of you to say - thank you!
Reply
#44
(03-24-2023, 10:41 PM)RokCoder Wrote:
(03-24-2023, 06:32 PM)madscijr Wrote: a version where the graphics look like the art on the packaging / flyers / arcade cabinet.

Totally in the realms of needing an artist or at least someone with time and some artistic flair. There's a reason I tend to use the original sprite sheets Smile

Over the weekend just for fun I googled Scramble and started playing with the graphics from the arcade cabinet and various flyers and manuals, with the idea of modding the game with those (see attached). 

Obviously the resolution of these is much higher than the 1981 game. For example, in the game, the ship's sprite is 32x16 pixels, while the one from the manual is 340x117, and the really nice one from the cabinet is 436x159. The fuel tank is 16x16, while the one from the cabinet is 46x38. 

I think it would be pretty cool to mod the game to hi-res graphics (for a 1080p display or similar) and use the images from the cabinet, etc. I can edit the new images in paint.net fairly easily, to get the right aspect ratio, and create a new sprite sheet with the same layout as yours, just larger by some multiple. 

So as long as the code isn't too hard to tweak to work with larger images, it should be doable in an hour or two. Could you offer any info on what values in the game code would have to be changed, to get it to work with these larger graphics? Any guidance appreciated!


Attached Files
.7z   scramble_new_graphics.7z (Size: 8.11 MB / Downloads: 26)
Reply
#45
(03-27-2023, 04:19 PM)madscijr Wrote:
(03-24-2023, 10:41 PM)RokCoder Wrote:
(03-24-2023, 06:32 PM)madscijr Wrote: a version where the graphics look like the art on the packaging / flyers / arcade cabinet.

Totally in the realms of needing an artist or at least someone with time and some artistic flair. There's a reason I tend to use the original sprite sheets Smile

Over the weekend just for fun I googled Scramble and started playing with the graphics from the arcade cabinet and various flyers and manuals, with the idea of modding the game with those (see attached). 

Obviously the resolution of these is much higher than the 1981 game. For example, in the game, the ship's sprite is 32x16 pixels, while the one from the manual is 340x117, and the really nice one from the cabinet is 436x159. The fuel tank is 16x16, while the one from the cabinet is 46x38. 

I think it would be pretty cool to mod the game to hi-res graphics (for a 1080p display or similar) and use the images from the cabinet, etc. I can edit the new images in paint.net fairly easily, to get the right aspect ratio, and create a new sprite sheet with the same layout as yours, just larger by some multiple. 

So as long as the code isn't too hard to tweak to work with larger images, it should be doable in an hour or two. Could you offer any info on what values in the game code would have to be changed, to get it to work with these larger graphics? Any guidance appreciated!

If all graphics are scaled up by the same aspect ratio then it would be reasonably straight forward. Possibly as easy as changing the TILE_WIDTH and TILE_HEIGHT variables from 8x8 to whatever the new equivalent tile size would be. I haven't tested this but it would certainly do most of the grunt work for you. The premise of the setup is that it's a game based on 8x8 tiles at present - the landscape, the aliens, the player, etc. If your upscaled graphics are four times the size, you'd probably get away with setting the tile size to 32x32 for example. If your new graphics aren't all scaled up from the originals by the same amount then I think it would affect the dynamics of the game. You'd certainly have to change all the initialisation routines in the sprite loader to handle the new sizes, collision boxes, etc.

One part that you might end up having to do by hand is the actual landscape tiles. Or you could just scale the exiting ones up by whatever ratio you're using. They're going to look very blocky compared to everything else though.

If you run into any problems then I'm happy to help. Reach out either here or by DM.

As an afterthought, why not scale the sprite sheet up by 4x (or whatever) and replace the graphics in there with the new ones that way. If you change the TILE_* constants as well then you might have little else that you need to do!
Reply
#46
(03-27-2023, 06:24 PM)RokCoder Wrote: If you run into any problems then I'm happy to help. Reach out either here or by DM.

As an afterthought, why not scale the sprite sheet up by 4x (or whatever) and replace the graphics in there with the new ones that way. If you change the TILE_* constants as well then you might have little else that you need to do!

That sounds like the way to go about it.

I think the most practical way to do the landscape would be to just drop in higher res replacements.

Next question: are the collisions handled by detecting pixels and ignoring whatever the background color is e.g. black?

Last question for now - I tried dropping in some nice Hubble type images of stars, to replace the background images (stars 1-4). The image size + dimensions are the same, but they are displayed in 16-bit or grayscale color. Any idea what would need to change to display with normal colors (e.g. 32-bit color)? Ideally the stars would scroll slowly in the background (I think it's called parallax scrolling?) but just having the static but pretty stars in the background would be neat.

Thanks!
Reply
#47
(03-27-2023, 06:24 PM)RokCoder Wrote: If all graphics are scaled up by the same aspect ratio then it would be reasonably straight forward. Possibly as easy as changing the TILE_WIDTH and TILE_HEIGHT variables from 8x8 to whatever the new equivalent tile size would be. I haven't tested this but it would certainly do most of the grunt work for you. The premise of the setup is that it's a game based on 8x8 tiles at present - the landscape, the aliens, the player, etc. If your upscaled graphics are four times the size, you'd probably get away with setting the tile size to 32x32 for example. If your new graphics aren't all scaled up from the originals by the same amount then I think it would affect the dynamics of the game. You'd certainly have to change all the initialisation routines in the sprite loader to handle the new sizes, collision boxes, etc.

One part that you might end up having to do by hand is the actual landscape tiles. Or you could just scale the exiting ones up by whatever ratio you're using. They're going to look very blocky compared to everything else though.

If you run into any problems then I'm happy to help. Reach out either here or by DM.

As an afterthought, why not scale the sprite sheet up by 4x (or whatever) and replace the graphics in there with the new ones that way. If you change the TILE_* constants as well then you might have little else that you need to do!

OK, I updated the sprite sheet, the tiles are now 128x128 64x64 (the ship is 256x128). 
I didn't get around to the landscape tiles, for now I left the original while it's WIP.
I made some adjustments in the code for the screen + tile sizes and tile sheet file name.
It runs, but the screen is all funky - you can kind of see the ship moving and the bullets / bombs, but it's all garbled, and no landscape.
Not sure what I'm missing, but I'm out of time for now.

UPDATE: see newer post for latest
Everything is in the attached archive:
  • modified program is "scramble-hires.bas"
  • search code for "HI-RES" for the updated lines
  • new sprite sheet is "assets/sprite-sheet-hires.png"
  • editable paint.net sprite sheet is "sprite-sheet.hires.pdn"

How do you like the sprite sheet?
I hope someone gets a kick out of this - it's been fun playing with the graphics!
Reply
#48
(03-27-2023, 06:24 PM)RokCoder Wrote: If you run into any problems then I'm happy to help. Reach out either here or by DM.

As an afterthought, why not scale the sprite sheet up by 4x (or whatever) and replace the graphics in there with the new ones that way. If you change the TILE_* constants as well then you might have little else that you need to do!

Attached is the latest modified game - 2 versions: 
  • "scramble-lowres.(attempt 3).bas" is the game with the new tileset, shrunk to the original 8x8 tiles. This version works.
  • "scramble-hires.(attempt 2).bas" is the game with the new full hi-res tileset (64x64 tiles). It runs but the screen is garbled, no idea why.

See "README (scramble-hires).txt" which explains what was changed, how to edit the graphics, etc.

It's WIP, so the original tiles are still used for the terrain. 
Eventually I'd like to replace the background with a slowly scrolling pic of a Hubble/Webb image.

Enjoy!


Attached Files
.7z   ScrambleTest.7z (Size: 9.45 MB / Downloads: 25)
Reply
#49
(03-28-2023, 03:34 PM)madscijr Wrote:
(03-27-2023, 06:24 PM)RokCoder Wrote: If you run into any problems then I'm happy to help. Reach out either here or by DM.

As an afterthought, why not scale the sprite sheet up by 4x (or whatever) and replace the graphics in there with the new ones that way. If you change the TILE_* constants as well then you might have little else that you need to do!

Attached is the latest modified game - 2 versions: 
  • "scramble-lowres.(attempt 3).bas" is the game with the new tileset, shrunk to the original 8x8 tiles. This version works.
  • "scramble-hires.(attempt 2).bas" is the game with the new full hi-res tileset (64x64 tiles). It runs but the screen is garbled, no idea why.

See "README (scramble-hires).txt" which explains what was changed, how to edit the graphics, etc.

It's WIP, so the original tiles are still used for the terrain. 
Eventually I'd like to replace the background with a slowly scrolling pic of a Hubble/Webb image.

Enjoy!

I should have checked the forum for updates before I embarked on this. The last time I checked there were notes of graphic issues with the hi-res sprite sheet so I jumped into the code to tackle it. Having sorted it out I've just seen your version with the new versions of the graphics reduced to the original resolution and it works great!

Anyway, and for what it's worth, I have a version here that I've modified to allow higher resolution sprites. There are a few notes that should go with it though -

1) With your original hi-res sheet, the sprites have increased resolution by x8. This means that you'll need a monitor resolution of 3584x2048 to play the game in the correct aspect ratio with those graphics. I've actually got that resolution here but the game plays very slowly when throwing around sprites at that resolution. I've also tweaked the initialisation so it can downscale for lower resolution screens if you want to continue down that path.

2) I reduced your hi-res sprite sheet so that it's x2 the original resolution which seems more realistic to use here. You'd probably get away with x4 or more but would need to experiment.

Code: (Select All)
    $IF HI_RES THEN
        'spriteSheet& = LoadImage&("sprite-sheet-hires")
        'spriteSheet& = LoadImage&("sprite-sheet-hires-256")
        spriteSheet& = LoadImage&("sprite-sheet-medium-res-256")
    $ELSE
            spriteSheet& = LoadImage&("sprite-sheet")
    $END IF

3) There was a lot of code scattered around that required tweaking so it wasn't a simple case of increasing TILE_WIDTH and TILE_HEIGHT. To simplify it a little I added a TILE_SCALE so that all the original position placements and calculations didn't need modifying - just the actual rendering to the virtual screen display.

Code: (Select All)
$IF HI_RES THEN
    CONST TILE_SCALE = 2
$ELSE
        CONST TILE_SCALE = 1
$END IF

4) I added a bunch of pre-processor settings so that it's easy to switch gaming modes around. All of your modifications are included in these -
 
Code: (Select All)
$LET HI_RES = 1
$LET WIDESCREEN = 1
$LET SPEED_CONTROLS = 0
$LET EXTRA_BOMBS = 0
$LET EXTRA_LIVES = 1
$LET FREE_ROAMING_SHIP = 0

I think it's all a little redundant having seen your low-high-res version but I'm posting it anyway seeing as it's done now Smile


.zip   ScrambleTest.zip (Size: 10.74 MB / Downloads: 22)
Reply
#50
(03-29-2023, 05:37 PM)RokCoder Wrote: I think it's all a little redundant having seen your low-high-res version but I'm posting it anyway seeing as it's done now Smile

Not redundant at all - it looks like you made some important improvements.
The "low res" version was just a hack to see how the tiles looked.
What I was really hoping for was to get the game looking like the cabinet art.
Doubling the resolution is definitely an improvement.
I'll give this a try and try to make some progress in chopping up the terrain into tiles.
Thanks for your help with this!
Reply




Users browsing this thread: 4 Guest(s)