ZippyRedPlumber Posted December 22, 2022 Share Posted December 22, 2022 (edited) I've brought upon not one, but two gifts for the loving 7800 community. Gift Number 1: A playable demo of my Lyra game ported to the 7800 in both rom formats that tickle your fancy.rumchurjump_take4.bas.a78rumchurjump_take4.bas.bin My second gift is something special, for those that want to make a smooth platformer using 7800basic, I'm providing the source as a template for anyone to use. I'm hoping @RevEng would put the sample code in the next 7800Basic update. Source Code: rumchurjump_take4.bassmoothplatformer.bas HAPPY HOLIDAYS, ATARIAGE! AND HAVE A MERRY CHRISTMAS! Edited December 22, 2022 by ZippyRedPlumber 18 2 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/ Share on other sites More sharing options...
SlidellMan Posted December 23, 2022 Share Posted December 23, 2022 Thank you, and a piece of advice: Put the .bas/.78b files in a .zip with the graphics files and folder. Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5176744 Share on other sites More sharing options...
ZippyRedPlumber Posted December 24, 2022 Author Share Posted December 24, 2022 17 hours ago, SlidellMan said: Thank you, and a piece of advice: Put the .bas/.78b files in a .zip with the graphics files and folder. Noted Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5177106 Share on other sites More sharing options...
Mord Posted December 24, 2022 Share Posted December 24, 2022 Unfortunately I can not like this thread more than once! 2 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5177231 Share on other sites More sharing options...
ZippyRedPlumber Posted December 25, 2022 Author Share Posted December 25, 2022 17 hours ago, Mord said: Unfortunately I can not like this thread more than once! What do you mean? Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5177550 Share on other sites More sharing options...
Mord Posted December 26, 2022 Share Posted December 26, 2022 Meaning it's a toggle and not a counter. Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5177867 Share on other sites More sharing options...
Ecernosoft Posted December 27, 2022 Share Posted December 27, 2022 (edited) On 12/22/2022 at 3:01 PM, ZippyRedPlumber said: I've brought upon not one, but two gifts for the loving 7800 community. Gift Number 1: A playable demo of my Lyra game ported to the 7800 in both rom formats that tickle your fancy.rumchurjump_take4.bas.a78rumchurjump_take4.bas.bin My second gift is something special, for those that want to make a smooth platformer using 7800basic, I'm providing the source as a template for anyone to use. I'm hoping @RevEng would put the sample code in the next 7800Basic update. Source Code: rumchurjump_take4.bassmoothplatformer.bas HAPPY HOLIDAYS, ATARIAGE! AND HAVE A MERRY CHRISTMAS! Merry christmas @ZippyRedPlumber! I'd post my 2600 christmas and snow demos, but due to the fact that I've moved to a new compy, I've lost them. =( Edited December 27, 2022 by Ecernosoft Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5178793 Share on other sites More sharing options...
ZippyRedPlumber Posted January 26, 2023 Author Share Posted January 26, 2023 Managed to make lyra walk left, but when she walks right the animation glitches out. Can anyone help me with this? Rom : lyra_7800_2023y_01m_24d_0335t.78b.binlyra_7800_2023y_01m_24d_0335t.78b.a78 Source: lyra_7800_2023y_01m_24d_0335t.78b Graphics: gfx.zip 1 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5196744 Share on other sites More sharing options...
Mord Posted January 26, 2023 Share Posted January 26, 2023 1 hour ago, ZippyRedPlumber said: Managed to make lyra walk left, but when she walks right the animation glitches out. Can anyone help me with this? In the two lines of code below, I changed herodir=1 to herodir=2 and the glitching disappeared. if joy0right then herodir=1:herox=herox+1:goto joydone if joy0right && gravity=0 then herodir=1:herox=herox+1:goto joydone Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5196793 Share on other sites More sharing options...
ZippyRedPlumber Posted January 29, 2023 Author Share Posted January 29, 2023 On 1/26/2023 at 2:54 PM, Mord said: In the two lines of code below, I changed herodir=1 to herodir=2 and the glitching disappeared. if joy0right then herodir=1:herox=herox+1:goto joydone if joy0right && gravity=0 then herodir=1:herox=herox+1:goto joydone Thanks @Mord that worked like a charm Now I need to know how I can change sprite frames as she's jumping & or when down is held on the joystick. Is this correct? Quote ;used when player moves left/right while jumping or falling. if !_FireB_Restrainer then plotsprite fire_jump 1 herox heroy if !joy0left && !joy0right && !_FireB_Restrainer then plotsprite fire_jump 1 herox heroy ;used when player moves left/right while jumping or falling. plotsprite fire_jump 1 herox heroy if !joy0left && !joy0right && then plotsprite fire_jump 1 herox heroy gfx.zip Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5198312 Share on other sites More sharing options...
Mord Posted January 29, 2023 Share Posted January 29, 2023 Not entirely sure although the last two lines of code you have won't work well - they appear to be missing variables. the last one in particular will case a panic since there's nothing after the && to compare/test, so it'll try to test the 'then' keyword I think. You'll probably want to make sure you're only going to hit one plot statement for plotting the player during the subroutine though. So after you plot, you'll want a return statement. Otherwise you'll potentially have more than one plotted character overlapping each other. If what you want is to display the fireball sprite while the player is in a jump or falling, you'll want something like this for your drawhero routine. if _Fall_in_Progress || _FireB_Restrainer then plotsprite fire_jump 1 herox heroy : return mytemp1=herodir+walkframe plotsprite walk_left_1 1 herox heroy mytemp1 If you only want it when going up, you can probably remove the _Fall_in_Progress portion of the if and test just on _FireB_Restrainer. If you want the fireball sprite during a full active jump, but not during a passive fall (walking off a ledge) you could make a variable that gets set to 1 when you press the jump button, and gets reset to 0 when the player lands/touches a solid tile. That way if they walk off a ledge the fire sprite won't be displayed. If you do use a variable like that, you can test that variable when plotting the fire_jump instead of _Fall_in_Progress and _FireB_Restrainer. Could be wrong, but feels like it would work. 1 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5198371 Share on other sites More sharing options...
ZippyRedPlumber Posted February 4, 2023 Author Share Posted February 4, 2023 So, I decided to make Lyra a 16x32 character by stitching 2 8x16 sprites & it's back to graphical glitches to the top sprite. Any idea on how to fix this? Rom:lyra_7800_2023y_02m_03d_0706t.78b.a78 Bas:lyra_7800_2023y_02m_03d_0706t.78b Graphics:graphix.zip 1 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202228 Share on other sites More sharing options...
+Muddyfunster Posted February 4, 2023 Share Posted February 4, 2023 I don't think you need to stitch two sprites together (unless you have a specific reason for doing so) as the 7800 will happily take a 16x32 sprite. In fact, the 7800 is happy with sprites in any multiple of 4 for the width so 8, 12, 16 would all be fine. Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202246 Share on other sites More sharing options...
ZippyRedPlumber Posted February 4, 2023 Author Share Posted February 4, 2023 1 hour ago, Muddyfunster said: I don't think you need to stitch two sprites together (unless you have a specific reason for doing so) as the 7800 will happily take a 16x32 sprite. In fact, the 7800 is happy with sprites in any multiple of 4 for the width so 8, 12, 16 would all be fine. There is a specific reason, so that the sprites display properly. I just did it the way you suggested by making some tall frames, but now it only displays the characters head. Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202277 Share on other sites More sharing options...
+Karl G Posted February 4, 2023 Share Posted February 4, 2023 6 minutes ago, ZippyRedPlumber said: There is a specific reason, so that the sprites display properly. I just did it the way you suggested by making some tall frames, but now it only displays the characters head. Could you zip up your modified source and graphics so one of us can see what's going on? I guarantee that @Muddyfunster is correct in saying that you shouldn't have to stitch together two sprites to do what you are trying to do here. Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202279 Share on other sites More sharing options...
ZippyRedPlumber Posted February 4, 2023 Author Share Posted February 4, 2023 19 minutes ago, Karl G said: Could you zip up your modified source and graphics so one of us can see what's going on? I guarantee that @Muddyfunster is correct in saying that you shouldn't have to stitch together two sprites to do what you are trying to do here. Sure thing @Muddyfunster @Karl G Here you go. lyra7800.zip Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202290 Share on other sites More sharing options...
+Karl G Posted February 4, 2023 Share Posted February 4, 2023 1 hour ago, ZippyRedPlumber said: Sure thing @Muddyfunster @Karl G Here you go. lyra7800.zip 10.24 kB · 0 downloads You had "set tallsprite off", which would explain why it got cut off. I commented that out, and I also had to rename graphix to gfx to get it to compile. After that, it seems to display correctly. There are still some issues with frame progression with your animation that you will need to address, though. 1 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202336 Share on other sites More sharing options...
ZippyRedPlumber Posted February 4, 2023 Author Share Posted February 4, 2023 Quote There are still some issues with frame progression with your animation that you will need to address, though. That's kinda why I asked for help... Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202350 Share on other sites More sharing options...
+Karl G Posted February 4, 2023 Share Posted February 4, 2023 Looking at the graphics, they are still 8x16 images, not the combined 16x32 images like was discussed. Looking at the code, you are also plotting the sprite in sections, too. If you combine your images and let 7800basic handle the bigger images, you will save CPU time as well as making debugging of the animation frames much simpler. Your drawing routine: drawhero if _Fall_in_Progress || _FireB_Restrainer then plotsprite fire_jump 1 herox heroy:return if _Duck_in_Progress then plotsprite fire_jump 1 herox heroy:return mytemp1=herodir+walkframe plotsprite walk_left_bottom 1 herox heroy mytemp1 mytemp2=heroy-16 plotsprite walk_left_top 1 herox mytemp2 mytemp1 return Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202412 Share on other sites More sharing options...
ZippyRedPlumber Posted February 4, 2023 Author Share Posted February 4, 2023 Can you provide an example of combining images? I'm still new at 7800Basic... Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202453 Share on other sites More sharing options...
+Muddyfunster Posted February 4, 2023 Share Posted February 4, 2023 Whatever application you are using to draw your sprites, draw them as one image, rather than many smaller ones that you have to combine in 7800basic. 2 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202460 Share on other sites More sharing options...
ZippyRedPlumber Posted February 4, 2023 Author Share Posted February 4, 2023 Tried the tallsprite method, it worked now I got to fix the playfield collision. It's gotta look like the picture @Karl G posted. lyratallsprite.zip 1 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5202496 Share on other sites More sharing options...
ZippyRedPlumber Posted February 5, 2023 Author Share Posted February 5, 2023 (edited) Went back to the stitch method, managed to fix some frames but still ran into a problem. Can anyone care to show me what I did wrong & what I can do to fix it. Here's a diagram of my issue. The green checks mean that frames are correct, red Xs mean these frames need fixed; Folder: lyra7800.zip Edited February 5, 2023 by ZippyRedPlumber Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5203023 Share on other sites More sharing options...
Ecernosoft Posted February 13, 2023 Share Posted February 13, 2023 On 12/22/2022 at 3:01 PM, ZippyRedPlumber said: I've brought upon not one, but two gifts for the loving 7800 community. Gift Number 1: A playable demo of my Lyra game ported to the 7800 in both rom formats that tickle your fancy.rumchurjump_take4.bas.a78rumchurjump_take4.bas.bin My second gift is something special, for those that want to make a smooth platformer using 7800basic, I'm providing the source as a template for anyone to use. I'm hoping @RevEng would put the sample code in the next 7800Basic update. Source Code: rumchurjump_take4.bassmoothplatformer.bas HAPPY HOLIDAYS, ATARIAGE! AND HAVE A MERRY CHRISTMAS! Merry late christmas @ZippyRedPlumber!! I know it's almost Valentines but still. I'm coming back breifly...... for some reason. Keep up the good work! Hopefully, one day, Lua will become a reality....... 1 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5208122 Share on other sites More sharing options...
+saxmeister Posted February 14, 2023 Share Posted February 14, 2023 (edited) When you declare your frame by frame animations for a sprite you need to keep them in the correct order for the keyframe counter to work correctly. This code: incgraphic gfx/walk_left_bottom.png 160A 0 1 2 3 1 incgraphic gfx/walk_left_bottom2.png 160A 0 1 2 3 1 incgraphic gfx/walk_right_bottom.png 160A 0 1 2 3 1 incgraphic gfx/walk_right_bottom2.png 160A 0 1 2 3 1 incgraphic gfx/walk_left_top.png 160A 0 1 2 3 1 incgraphic gfx/fire_jump.png 160A 0 1 2 3 1 incgraphic gfx/walk_right_top.png 160A 0 1 2 3 1 To keep it clear I would change it to this: incgraphic gfx/walk_left_bottom.png 160A 0 1 2 3 incgraphic gfx/walk_left_bottom2.png 160A 0 1 2 3 incgraphic gfx/walk_right_bottom.png 160A 0 1 2 3 incgraphic gfx/walk_right_bottom2.png 160A 0 1 2 3 incgraphic gfx/walk_left_top.png 160A 0 1 2 3 incgraphic gfx/walk_right_top.png 160A 0 1 2 3 incgraphic gfx/fire_jump.png 160A 0 1 2 3 This not only reorders the graphics in an easier to read format, it also keeps like things together. Notice that I also removed the additional "1" at the end of the color declarations on the images. 160A can only have 4 colors (0-3) so the additional color might cause issues. That additional "1" is used for the plotsprite command and defines the keyframe. The main issue is with your "keyframe" code that defines the animation image to show. I know that you are planning on replacing the two separate sprites and stitching them together. That would fix the animation issue, but you have walk_left_bottom.png and walk_left_bottom2.png in order. So your two keyframes are 0 and 1. If you go over that number then you get the next image, which would be walk_right_bottom.png instead of flipping back and forth between the two images. The following code is in your "main": frame=frame+1 if (frame&7)=0 then walkframe=(walkframe+1)&1 By adding "1" to the frame immediately you are jumping to another frame of animation. It does seem to work overall, though. Also, here you are setting the animations for the bottom and the top. I only see one top image, yet you are adding keyframes for 2 images. Remove the "mytemp1" from the walk_left_top OR add images for the second frame of animation. mytemp1=herodir+walkframe plotsprite walk_left_bottom 1 herox heroy mytemp1 mytemp2=heroy-16 plotsprite walk_left_top 1 herox mytemp2 mytemp1 I see that changing that also does not change the direction of the character's head. So additional variables for the direction could be added here instead. 0 would be left and 1 would be right. You might be able to use "herodir" but it currently is set for 0 is left and 2 is right. And the herodir+walkframe equation doesn't work correctly that way. So it would need to be adjusted. I replaced that last line with the following and it seems to work properly (for the case that your character only looks left or right): if herodir=0 then plotsprite walk_left_top 1 herox mytemp2 0 else plotsprite walk_left_top 1 herox mytemp2 1 Also, herox should have a limit to stop it from going outside the boundaries (unless you are attempting to wrap around). Any value greater than the width of the screen and less then 256 will be plotted outside of the visible screen. Once a character gets past the screen width it should jump to 0 (or somewhere close, unless you want to write a routine that plots your character twice across the sides of the screens to make it look like it is wrapping around. This looks great! Your jump code is very nice as well. I like the concept of the game. Let me know if I can help out any further. Below is the 7800BASIC code changes attached as well as an .a78 file of the working animation. JS7800: https://raz0red.github.io/js7800/?cart=https://forums.atariage.com/applications/core/interface/file/attachment.php?id=1004457&key=21a95a817ed04d36452b42c81d94323b lyra_7800_2023y_02m_14d_0312t.saxmeister.78b lyra_7800_2023y_02m_05d_0536t.78b.a78 Edited February 14, 2023 by saxmeister 4 Quote Link to comment https://forums.atariage.com/topic/345383-merry-x-mas-gifts-from-me-to-the-loving-7800-communtiy/#findComment-5208887 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.