Jump to content

jbs30000

Members
  • Content Count

    486
  • Joined

  • Last visited

Posts posted by jbs30000


  1. OK, here's phase two with jumping sounds. Also, if you fall through a hole in the floor the game is over. If you hold the fire button without letting go and have Mario jump the whole way through you can pretty much jump over everything, even the holes on the floor, but he has to jump on top of the pipes.

     

    Anyway, how is the jumping sound? It's channel 12 frequencies 5 through 30.

     

    default.bas.bin


  2. What's a good way to make a jumping sound? About a year ago I probably would have been able to figure it out, but not using any sound commands for so long I'm not sure any more.

     

    I just need a good combination of AUDV0, AUDC0, and AUDF0. I played around with the tone toy program, but that didn't help.

     

    I'm done with phase two of the Super Mario game, having Mario in the game, now I just want to add sound when he jumps. Thank you.


  3. I just found the source of the flicker and it wasn't a vblank that fixed it. In my routine to move Mario to the right I was drawing him twice. First when the routine was entered, and then again if the screen needed to be scrolled. By taking out the second set of commands to draw Mario the screen doesn't flicker as bad.


  4. I did read your notes, but you have

     

    vblank

    pfscroll left

    return

     

    Is that example for a program that constantly scrolls non-stop? Or if you want to control when you scroll the screen, how do you do so without a gosub to the vblank command?

    batari just used that as an example. You can put pretty much anything you want in there as long as it doesn't take too much time and you want it to happen all of the time.

     

    If you want to control scrolling, forget about vblank and do it in your main loop.

    I already do it in my main loop, and there's flickering. That's why I want to try the vblank.


  5. I did read your notes, but you have

     

    vblank

    pfscroll left

    return

     

    Is that example for a program that constantly scrolls non-stop? Or if you want to control when you scroll the screen, how do you do so without a gosub to the vblank command?

     

    Anyway, tomorrow (or technically later today) I'll try just adding

     

    vblank

    return

     

    to the end of my program and see what happens (it's 3:26am and I need to get some sleep).


  6. In my Super Mario Bros game when Mario is causing the screen to scroll it constantly flickers. I've tried using vblank but I can't do it right.

     

    My game is 32K so I know that I have to put it in bank 8. If I put

     

    vblank

    pfscroll left

    return otherbank

     

    in bank 8 then the screen continuously scrolls, even if I don't gosub to it. If I just put

     

    vblank

    return otherbank

     

    gosub to it, then do a pfscroll the screen still flickers.

     

    So, how do you properly use vblank and fpscroll in a multibank program? Thank you.


  7. So after a few days of ignoring my Super Mario Bros game, I decided to work on phase 2, put Mario in the game and let the user move him around.

     

    Everything is fine, unless you hit the fire button to let him jump. When that happens, the screen kind of splits. It's kind of like the 6 sprite kernel. There's a hole in the ground and then when you walk to the edge and the screen starts scrolling, you'll things scroll to the right, and then a second later a mirror image of things scrolling to the left.

     

    I guess the best way to explain is to see it yourself. You can jump right at the beginning or walk until you hit the first pipe (you won't be able to walk through it) and you can hit jump then. I'm not sure what's happening, so I don't know if I can fix it. But of course I'll try.

    default.bas.bin

     

    Also, while you can walk (for now) over a hole in the floor, if you jump you'll fall through and you'll have to reset the game.

     

    Edit to add, you can control the height of the jump depending on how long you hold the fire button down.


  8. Looks great so far, although there's a couple of problems. First, on the title screen Mario moves faster than the screen. Second, what's with the flashing?

    1. The title screen isn't part of the game.

     

    2. The flashing has to do with the scrolling. There's a command I mentioned called vblank which is supposed to help, but when I tried using it I had problems. When I add Mario they'll be less flicker because just pushing the joystick right won't automatically scroll. Mario will have to be at the far right of the screen and not have a pipe or steps in front of him before the screen scrolls.


  9. default.bas.bin

    OK, I finally completed the first step in making a bB Super Mario Bros game. Horizontal scrolling.

     

    I couldn't figure out how to use vblank to stop the occasional screen flicker because when I played with it it caused non-stop scrolling.

     

    So, anyway, if you're interested then start the game, press the fire button, and hold the joystick to the right and the screen will scroll through world 1-1 (the only level I'm going to do in this game).

     

    Yeah, the graphics aren't great, and I had to take out the clouds and background plants so it's just ground, pipes or stairs, and blocks. The hollow blocks are the power up blocks and if I could work with a better screen resolution would have question marks in them. So the solid blocks are blocks that just break apart when giant Mario hits them.

     

    Although I ran into a whole slew of strange problems, like a rem line being too long causing the compiler to crash, this was probably the easiest part. I still have to put in code to move Mario, place and move enemies, be able to detect if he hits a block with a mushroom or something else in it, and so on. It's going to be tough to make a working game, but I have some ideas I'll try. Fingers crossed everybody.


  10. Edit:

    There seems to be a problem with spacing. For instance, sometimes I'd get an error when trying to build my program, so I put a return in-between two lines, for instance

     

    Line 1

    Line 2

    Fails

     

    Line 1

     

    Line 2

    Works

     

    But then for one problem, I simply deleted returns after labels

     

    Label

    Line 1

    Fails

     

    Label Line 1

    Works

     

    So anyway, I deleted a bunch of code and now I can't build my program any more. So I'm back to the older 2600Basic.exe.

     

    My program has set romsize 32kSC and has a ton of code, so those might be contributing factors. People making small programs may not run into this issue.


  11. Both the default.bas and the file jwierer sent to me build just fine. The extraneous end is a warning, not an error, and it's correct.

     

    The problem with both does seem to be data statements. The errors: (13): Error: Unknown keyword: B and this error: (595): Error: Unknown keyword: 2☺ are both right after data statements.

     

    I looked at the code and there is some uninitialized memory during data statements, and I didn't think the memory was used, but just in case I have cleared it all before use. Let me know if this fixes those weird errors.

     

    Also, this build fixes some variables that previously conflicted with keywords (like "foreground") and improves keyword detection overall. This version also spots a previously undetected error in the file jwierer sent to me (and I expect this to happen again, but these are truly errors anyway.)

    Yes, whatever you did fixed the problem. Thank you.


  12. default.bas

     

    This simple file that only contains

    rem Generated 8/27/2010 8:35:10 PM by Visual bB Version 1.0.0.550
    rem **********************************
    rem *<filename>                      *
    rem *<description>                   *
    rem *<author>                        *
    rem *<contact info>                  *
    rem *<license>                       *
    rem **********************************
    
    
    data Test
    0, 1, 2, 3, 4
    end
    

    Gives this output in the message windows of VisualbB

    Compile started at 8/27/2010 8:36:54 PM
    Compiling D:\bB Projects\Test Project\default.bas
    2600 Basic compilation failed!
    LINE -->Microsoft Windows [Version 6.1.7600]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    D:\bB Projects\Test Project>preprocess <default.bas >f3140bdf-3565-4f97-83b0-610017e63cc2.tmp
    
    D:\bB Projects\Test Project>2600basic -i <f3140bdf-3565-4f97-83b0-610017e63cc2.tmp %bB%
    game
    .L00 ;  rem Generated 8/27/2010 8:35:10 PM by Visual bB Version 1.0.0.550
    
    .L01 ;  rem **********************************
    
    .L02 ;  rem *<filename>                      *
    
    .L03 ;  rem *<description>                   *
    
    .L04 ;  rem *<author>                        *
    
    .L05 ;  rem *<contact info>                  *
    
    .L06 ;  rem *<license>                       *
    
    .L07 ;  rem **********************************
    
    .
    ; 
    
    .
    ; 
    
    .L08 ;  data Test
    
    JMP .skipL08
    Test
    .byte  0, 1, 2, 3, 4
    
    .skipL08
    
    D:\bB Projects\Test Project>@exit
    
    Post compilation files deleted
    

    Crimson editor gives this

    ---------- Capture Output ----------
    > "C:\Atari2600\bB\2600bas.bat" C:\Atari2600\bB\samples\default.bas
    batari Basic v1.01 (C)2005-2007
    (13): Error: Unknown keyword: B
    
    Compilation failed.
    
    > Terminated with exit code 0.
    

    If line numbers start with 1, and blank spaces are counted, then line 13 is the "end" statement.


  13. Try removing the space in your directory name (between bB and Projects) and try it again.

    ---------- Capture Output ----------

    > "C:\Atari2600\bB\2600bas.bat" D:\bBProjects\Undecided2\default.bas

    batari Basic v1.01 ©2005-2007

    (134): Error: Unknown keyword: B

     

    Compilation failed.

     

    > Terminated with exit code 0.


  14. Sorry, still doesn't work.

     

    Maybe it's my include div_mul.asm line. Try putting that in a program and see what happens.

     

    Hmmm, this is weird. VisualbB says

    2600 Basic compilation failed!
    LINE -->Microsoft Windows [Version 6.1.7600]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    D:\bB Projects\Undecided2>preprocess <default.bas >e30c01cc-3480-4827-961e-79f295a3444f.tmp
    
    D:\bB Projects\Undecided2>2600basic -i <e30c01cc-3480-4827-961e-79f295a3444f.tmp %bB%
    game
    

    And then spits out the asm for my program.

     

    Meanwhile using Crimson Editor gives

    ---------- Capture Output ----------
    > "C:\Atari2600\bB\2600bas.bat" D:\bB Projects\Undecided2\default.bas
    The system cannot find the file specified.
    
    > Terminated with exit code 255.
    

     

    Yet building one of the sample programs worked just fine. Bizarre.


  15. Thanks, but you did that for me a few weeks ago. The preprocessor and postprocessor in your folder wouldn't run so I had to use my versions, and everything I have right now works for me.

     

    I'll try your files again and see what happens.


  16. Thank you theloon, although my code is fairly basic, but uses LOTS of code. Too much code in fact, and I completely forgot about the bB scroll commands.

     

    This weekend I'll work on re-doing the code to make it smoother.


  17. I've come upon a setback. I decided to skip Mario jumping and focus on "scrolling". I put the word in parentheses because what I came up with, well it is pretty much scrolling I guess. But it took a ton of code and came out too jerky. Plus some of the graphics get messed up.

    default.bas.bin

    (hit the fire button to get to the scrollable playfield)

    For instance, scrolling towards the right you'll see two pipes next to each other. There should be only one. And the lower blocks kind of get messed up while getting scrolled. I made the clouds move only half as often as everything else to give the game a more realistic look, but that didn't turn out well either.

     

    So unless anyone knows of a good way to horizontally scroll, I guess I'll have to have the game just switch screens every time Mario makes it to the far right side of the screen.


  18. I haven't done this, but it should work.

    var2=var1//4

    var1 is the variable you want to check. //4 means put the remainder of var1/4 in temp1.

    If temp1=0 then...

    If no remainder then 4 goes into var1 evenly.


  19. I'll go over what you wrote and see if I can incorporate it. Right now I have this:

    default.bas.bin

    It's harder to jump while walking to the left for some reason, I'll have to fix that. But at any rate, a quick press of the fire button has him go lower than long press. It's not that great though, so I'll see about your method.

     

    Anyway, while having Mario jump I also have to check to see if he hits any blocks above him, which would stop him from going up, or if he hits an enemy to kill him, so I can't make his jump routine too elaborate.

×
×
  • Create New...