Jump to content

abaudrand

Members
  • Content Count

    246
  • Joined

  • Last visited

Posts posted by abaudrand


  1. :/ I don't know if I should use this build of bB as long as it's not an official upgrade... Since I've switched to SC, I got more free variables available and I could burn one or two for storing figures for mathematical operations. I must agree this new build could spare them and I also guess it could spare cycles... icon_question.gif(mumbling)


  2. When I try to do the maths inside the if-then statement, the compilation stops at this line:

     

    .L0784 ; if player1y - player0y < 30 then var6{1} = 0 else var6{1} = 1

     

    LDA player1y

    CMP player0y

    .skipL0784

    .condpart344

     

    But when I broke into two part the code, it works fine:

     

    .L0784 ; temp2 = player1y - player0y

     

    LDA player1y

    SEC

    SBC player0y

    STA temp2

    .L0785 ; if temp2 < 30 then var6{1} = 0 else var6{1} = 1

     

    LDA temp2

    CMP #30

    BCS .skipL0785

    .condpart344

    LDA var6

    AND #253

    STA var6

    jmp .skipelse10

    .skipL0785

    LDA var6

    ORA #2

    STA var6

    .skipelse10

     

    For the moment, I will keep it broken in two parts even I don't understand why it doesn't work :)

    Regards.


  3. Hi, I'm trying to do a checktest to determine the movement of the missile of one player depending the position of the other player.

    I wrote that:

     

    if player1y-player0y<30 then var6{1}=0 else var6{1}=1

     

    but it will not compile. I guess I got a kind of 'syntax error'.

    Do I need to broke the operation like:

     

    temp2=player1y-player0y

    if temp2<30 then var6{1}=0 else var6{1}=1

     

    What do you think?


  4. Just so I understand what you're trying to do, will it be an asymmetrical playfield, and what are the color changes supposed to look like? For example, are you trying to get three columns of colors (color changes in the same positions on each row)? For example, if you're using a reduced-width playfield-- say, 30 pixels-- that could be divided up as (1) leftmost 10 pixels = color A, (2) central 10 pixels = color B, and (3) rightmost 10 pixels = color C.

     

    Michael

     

    Edit: Or are you trying to get a choice of 3 colors at any pixel position? If that's the case, you could use flickering without having to use assembly or make a custom kernel, but the choice of colors would be limited, determined by which colors you flicker together. I can do a flicker demo to show you what I mean.

     

    okay I guess I need to clarify what I'm trying to do. I've done a map where the player can choose where he(or she) want to go. Both players are used (0 and 1). I don't use missiles or ball (for now). I've drawn a map and I want to use at least 3 colors (forest, river and mountains) plus the background color. for the moment, I'm switching each frame between 2 playfield but the result is dreadful on real hardware (even pacman looks better).

    I'm using the background kernel option for others levels of game so I could not have the green color for the forest part.

    I guess it could work if I change the palette and use the method RevEng describes in his multicolour titlekernel exemple.


  5. Is it possible to use ASM within VisualBb to have a more accurate playfield? I've set a default resolution in the standard kernel with the default pfheight but I need to display three differents colors on the same row.

    If it's possible, how should I proceed?

    It isn't possible using the standard kernel. You'll need to either modify the standard kernel-- which most likely means giving up something, or possibly multiple somethings, since there's really no free time available for adding color changes-- or you'll need to just write your own kernel.

     

    Michael

     

    Okay, I'll wait a while before trying this... sounds scary for the moment :)


  6. Thanks for the reply... Yes I have an horrible flickering which is okay on stella but dreadful on real hardware...

    I want to make a background with 2 players sprites and no missiles nor ball. I'm flickering between two playfields but the result is not convincing... As the background is drawn, I can't use the ball or missiles shapes to fit the current design... damned :)


  7. I'm trying to change the value of color between level with the background colors option. I don't understand why it won't compile.

     rem Generated 12/09/2010 14:06:40 by Visual bB Version 1.0.0.554
    rem **********************************
    rem *<filename> 	*
    rem *<description> 	*
    rem *<author> 	*
    rem *<contact info> 	*
    rem *<license> 	*
    rem **********************************
    	set tv pal
    	set kernel_options pfcolors pfheights background
    
    Start 
    	COLUBK=$0E
    	pfheights:
    8
    8
    8
    8
    8
    8
    8
    8
    8
    8
    8
    end
    pfcolors:
    $06
    $0D
    $0C
    $0E
    $0E
    $0C
    $0E
    $0C
    $0A
    $0A
    $40
    end
    	playfield:
    ................................
    ................................
    ................................
    ................................
    ................................
    .......X.X......................
    .......XXXX........XX...........
    XX.....XXXX.......XXX.......XX.X
    XX.....X.XXX......XXXX...XXXXXXX
    XX.XX..X.XXX......XXXX...XXXXXXX
    ................................
    end
    
    drawscreen
    if joy0fire then goto Start2
    
    
    goto Start
    Start2
    	COLUBK=$0E
    	pfheights:
    8
    8
    8
    8
    8
    8
    8
    8
    8
    8
    8
    end
    pfcolors:
    $46
    $4D
    $4C
    $4E
    $0E
    $0C
    $0E
    $0C
    $0A
    $0A
    $40
    end
    	playfield:
    ................................ 
    ................................
    ................................
    ................................
    ................................
    .......X.X......................
    .......XXXX........XX...........
    XX.....XXXX.......XXX.......XX.X
    XX.....X.XXX......XXXX...XXXXXXX
    XX.XX..X.XXX......XXXX...XXXXXXX
    ................................
    end
    
    drawscreen
    goto Start2
    
    

     

     

    I've read that the pfheights need to be set once (maybe with a const, but I've forgot where I've read it) but if I skip the pfheights for the second playfield, it will not compile either...

    Did I missed something?


  8. Thanks to Michael Rideout, it looks like it is.

    Have a look at this thread for details.

    Actually, I never completely finished my code for it. But someone else took it, cleaned it up, and got it working! :) Unfortunately, I'm going blank right now on who it was, but he posted it in another thread.

     

    Michael

     

    thanks Michael. I'm stuck on Stella with it (the keys seems not working despite I've check their assigment in options) I will try it on harmony with real touchpad.

    My current worry is that it takes 3 variables for working plus some code in the Vblank. I will try to call batman to nibble some variables and see what's left once the whole game is finished. If I got three, I will try to include it as option.

    regards.

×
×
  • Create New...