-
Content Count
246 -
Joined
-
Last visited
Posts posted by abaudrand
-
-
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.
-
okay, I'll try tommorow. I hoped it could save a line of code... Thanks RT.
I don't try to do math in an if-then. I use a temporary variable like in your second example.
-
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?
-
Is "redshirts" title came from the characters who have redshirts in Star Trek classic and always died while on duty?

-
I'm impressed by the quality of your work... Great gameplay and great graphics!
-
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.
-
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

-
okay I will try to reduce the palette to only 3 colors and only do flickering on one part. I've also noted that to reduce flickering, you need to select colors within the same row on the TIA palette
Regards... -
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

-
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?
-
Bourguignons présents aussi!
-
Salut, on est de Bourgogne (avec mon frangin).

-
I've been using the harmony cartridge for the past month and it's a real pleasure for homebrowing game.
BIG THANKS FOR THIS WONDERFUL TOOL, can't wait newt upgrades.
-
I like the idea of the game, I think it will be a very funny game to play with such a good idea.
Why not adding a second player? Let's say a blue player?

-
Finally succeed to use your code. Despite errors message after compiling, it works perfectly!!! Big thumbs up for the work!
:thumbsup:
-
I'll try to understand how I can apply it to my game...

-
thanks Michael... It's a difficult solution for me to do at the moment. :/ I don't have the knowledge to handle this nor code space for setting the SC option...
-
thanks Random Terrain. So does it also means that you can't change the colors of the background and they will be set forever for all the differents playfields of the game?
-
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?
-
thanks SpiceWare. I forgot to activate that.

-
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.
-
thanks, I'm looking at it. I need a long time to understand how to assign functions for each buttons.

-
Hi, I'm looking to use as an option the star raider pad or the kid control or the keyboard. Is it possible to read it with Bb?
-
I thought the TSkernel include a drawscreen function. I'm stuck for the moment but I will do another attempt tommorow. (when I'm stuck on a problem, I let my brain compute it while sleeping).

little problems with if-then and maths
in batari Basic
Posted
:/ 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...
(mumbling)