+Random Terrain Posted June 29, 2011 Share Posted June 29, 2011 (edited) I think this form is more consistent with languages that let you define a variable as a BIT or BOOLEAN type, so it's probably the better (i.e., easier to use) method. Of course, with this method you don't need to dim Direction at all, unless you want to be able to refer to the Direction variable in addition to its defined bits. So just use def North=a{3} and so on if you don't plan to refer to Direction by itself. Lately, I've been doing stuff like the examples below so I won't forget that I'm using bits and so I'll know exactly what bits I'm using: rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' All-purpose bits for various jobs. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' dim BitOp_All_Purpose_01 = t dim BitOp0_Debounce_Reset = t dim BitOp1_Debounce_FireB = t dim BitOp2_Game_Over = t dim BitOp7_Missile1_Moving = t rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Player0/Missile1 direction bits. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' dim BitOp_P0_M1_Direction = u dim BitOp0_Player0_Direction_Up = u dim BitOp1_Player0_Direction_Down = u dim BitOp2_Player0_Direction_Left = u dim BitOp3_Player0_Direction_Right = u dim BitOp4_Missile1_Direction_Up = u dim BitOp5_Missile1_Direction_Down = u dim BitOp6_Missile1_Direction_Left = u dim BitOp7_Missile1_Direction_Right = u rem **************************************************************** rem * rem * Clears 7 of the 8 All_Purpose_01 bits. rem * rem * ---- The 2nd bit is not cleared because BitOp2_Game_Over{2} rem * ---- is used to control how the program is reset. rem * rem ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' BitOp_All_Purpose_01 = BitOp_All_Purpose_01 & %00000100 rem **************************************************************** rem * rem * Clears all 8 Player0/Missile1 direction bits. rem * rem ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' BitOp_P0_M1_Direction = 0 rem **************************************************************** rem **************************************************************** rem * rem * Fire Button rem * rem * ---- If fire button is pressed appropriately and Missile1 rem * ---- is not moving, turn on Missile1 movement. rem * rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' If the fire button is not pressed, skip this section. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' if !joy0fire then BitOp1_Debounce_FireB{1} = 0 : goto Skip_Fire rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' If the fire button has not been released since starting, rem ' skip this section. rem ' rem ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' if BitOp1_Debounce_FireB{1} then goto Skip_Fire rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' If Missile1 is moving, skip this section. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' if BitOp7_Missile1_Moving{7} then goto Skip_Fire rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Turn on Missile1 movement. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' BitOp7_Missile1_Moving{7} = 1 rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Set up starting position of Missile1. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' missile1y = player0y - 4 : missile1x = player0x + 4 rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Take a snapshot of Player0 direction so Missile1 will rem ' stay on track until it hits something. rem ' rem ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' BitOp4_Missile1_Direction_Up{4} = BitOp0_Player0_Direction_Up{0} BitOp5_Missile1_Direction_Down{5} = BitOp1_Player0_Direction_Down{1} BitOp6_Missile1_Direction_Left{6} = BitOp2_Player0_Direction_Left{2} BitOp7_Missile1_Direction_Right{7} = BitOp3_Player0_Direction_Right{3} Skip_Fire I went back to regular bitops when I had some weird, random problems with def in that crappy seaweed game I was trying to finish. I'm tempted to try some version of def again, but I'll probably end up getting lost in the code again, even if I don't get weird errors. Edited June 29, 2011 by Random Terrain Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted May 14, 2012 Share Posted May 14, 2012 (edited) whoops, wrong thread. never mind. Edited May 14, 2012 by atari2600land Quote Link to comment Share on other sites More sharing options...
esplonky Posted September 26, 2012 Share Posted September 26, 2012 How long until 1.1 is released? I'm overly anticipating its release. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted September 26, 2012 Share Posted September 26, 2012 (edited) How long until 1.1 is released? I'm overly anticipating its release. Batari usually keeps tight lipped about these kinds of things. I'd either: Go the Random Terrain route and wait for the final version or Go the Byte Knight route and plunge forward into the unknown. Either way is a smart move. Edited September 26, 2012 by theloon 1 Quote Link to comment Share on other sites More sharing options...
esplonky Posted September 27, 2012 Share Posted September 27, 2012 I heard rumors of Activision style Kernels and all. Is this true? Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted September 27, 2012 Share Posted September 27, 2012 I heard rumors of Activision style Kernels and all. Is this true? bB 1.1 uses a slightly modified feature set from a chip used in Pitfall II called DPC. It may also use some extra features in the Harmony/Melody boards from AtariAge. Not like you'd go anywhere else to have your games made, but, this also limits you to AtariAge for manufacturing your games. Quote Link to comment Share on other sites More sharing options...
esplonky Posted September 28, 2012 Share Posted September 28, 2012 ah, so if I made a new game in bB 1.1 , I couldn't make my own carts at all? or is the harmony/melody feature optional? Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted September 28, 2012 Share Posted September 28, 2012 ah, so if I made a new game in bB 1.1 , I couldn't make my own carts at all? or is the harmony/melody feature optional? The DPC+ kernel is optional in bB 1.1, just like the multisprite kernel and bankswitching are optional. As for whether or not you can make your own carts for a DPC+ game, I'd guess that you could-- but you'd have to buy enough Harmony/Melody carts to do your own production run, and any other materials or hardware that might be necessary. 1 Quote Link to comment 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.