The Maxx Posted December 17, 2016 Author Share Posted December 17, 2016 (edited) I thought I might try the titlescreen kernel. I made a crappy little titlescreen and then started through the .pdf guide, but my Visual bB doesn't seem to have the options listed in the manual : "Title Kernal 96x1", "Title Kernal 48x1", "Title Kernel 48x2", etc. Here is my version of visual bB compared to the one in the TSKernel manual. Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
CaptainBreakout Posted December 18, 2016 Share Posted December 18, 2016 I love this game! It's like Minesweeper and Boulderdash had a baby. I especially like how you got the multi-colored characters. They look particularly good and the game layout is really clean too. The one thing I'd say it needs is sound. Some sort of sound. 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 19, 2016 Author Share Posted December 19, 2016 (edited) Thanks! Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
CaptainBreakout Posted December 19, 2016 Share Posted December 19, 2016 Nice! Definitely an improvement. The sounds make the game much more of an Atari experience. 1 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted December 19, 2016 Share Posted December 19, 2016 Nice job. The game does remind me of minesweeper. I like the colors and the sound. There have been a couple of times where a bomb was right below the ladder. On the first level this would ok but higher levels this would be frustrating since you only have one life. On a technical note your fps seem to be all over the place. At least they are under 60 most of the time. It looks like they jump past 60 when you collect a diamond. The game will probably have some jitter on real hardware. 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 19, 2016 Author Share Posted December 19, 2016 (edited) The top row should be free of any mines, so if there is a mine below the ladder, just move to the left or right. I should have mentioned this before. Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 21, 2016 Author Share Posted December 21, 2016 (edited) <edit> In an effort to keep this thread about programming in batari Basic, I have moved all Mine Dig stuff here: http://atariage.com/forums/topic/260288-mine-dig/ Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 22, 2016 Author Share Posted December 22, 2016 (edited) <edit> Screen rolling due to unstable fps... Simplified some code and, although it ate up more ROM, the problem is alleviated. Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 22, 2016 Author Share Posted December 22, 2016 (edited) Is there a good example of a simple function? I'm sure that the one on RT's page is good, but I can't figure out how to add arguments or make it useful... Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
bogax Posted December 23, 2016 Share Posted December 23, 2016 (edited) functions are pretty much useless (or worse) in bB about the only thing you can do is assign it to a variable use a subroutine you don't need (or want) an end statement, just return whatever is in the accumulator is what the functiion returns a function always passes two values and puts them in temp1 and temp2 whether you supply parameters or not function dummy b = 3 return c = dummy() c contains 3 function void return l = 5 d = void() temp1 and d contain 5 Edited December 23, 2016 by bogax 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 23, 2016 Author Share Posted December 23, 2016 (edited) Thanks! I ended up solving the problem with a subroutine. Edited December 24, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 23, 2016 Author Share Posted December 23, 2016 (edited) The colors look a little funny on my Atari, but that might be because I'm playing on a squished tiny little 8 inch screen. <edit> I tore open my Atari and adjusted the potentiometers. The picture is better, but not exactly as nice as I'd hoped. What can I expect though, this machine is as old as I am... my colors aren't so pretty either. Edited December 24, 2016 by The Maxx 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 25, 2016 Author Share Posted December 25, 2016 (edited) Can you toggle a bit on and off by adding to it? For example... toenail= toenail+1 if toenail= 25 then toejam{0} = toejam{0}+1 : toenail=0 Edited December 25, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 25, 2016 Share Posted December 25, 2016 Can you toggle a bit on and off by adding to it? For example... toenail= toenail+1 if toenail= 25 then toejam{0} = toejam{0}+1 : toenail=0 Related link: randomterrain.com/atari-2600-memories-batari-basic-commands.html#flip_a_bit 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 26, 2016 Author Share Posted December 26, 2016 Thanks, RT! You're a swell guy, you know? I'm really digging the quick and friendly support! k, so (queso?)... I have a new question: I have a small program that cycles through colors: dim changeColor = a.b ; cycling color variables start player0x = 16 : player0y = 20 ; set player position player0: %01111110 %11100111 %11000011 %10000001 %11111111 %11011011 %11011011 %01111110 end main changeColor = changeColor + 0.66 ; cycle through COLUP0 = changeColor ; change player color drawscreen ; drawscreen goto main ^ That works with the default bB kernel, but if I try to use similar code to change the colors of a sprite in the DPC+ kernel, it changes it to a pale yellow color and doesn't cycle: dim changeColor = a.b ; cycling color variables start player0x = 16 : player0y = 20 ; set player position player0color: changeColor changeColor changeColor changeColor changeColor changeColor changeColor changeColor end player0: %01111110 %11100111 %11000011 %10000001 %11111111 %11011011 %11011011 %01111110 end main changeColor = changeColor + 0.66 ; cycle through drawscreen goto main I'm probably trying to do something majorly dumb. Hah! Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 26, 2016 Share Posted December 26, 2016 Can we put variables where color data is supposed to be? As far as I know, we have to use numbers, but I could be wrong: randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_sprite_colors 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 26, 2016 Author Share Posted December 26, 2016 There must be a way to do it without entering a data set for each color change. I think I'm going to continue on with my game in monochrome and hope that an answer comes. If not, I may just end up hardcoding the colors for each change, but that seems like a waste of space and I can't imagine the transition would look nearly as cool. Whoah, your avatar just changed color and I thought I was hallucinating. Hahah! Quote Link to comment Share on other sites More sharing options...
bogax Posted December 26, 2016 Share Posted December 26, 2016 I'm not all that familiar with the DPC+ kernel It looks to me like it just passes a pointer to the color table to the ARM code. so short of modifying the kernel you could have a routine that passed a pointer from a variable, but the colors themselves would have to be in a ROM table and they'd have to be in the graphics bank and I think the only way to get them there is with a player color statement it might be possible to have all the colors in one big playercolor statement though 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted December 26, 2016 Author Share Posted December 26, 2016 (edited) Wow, that's way over my head. It's good information to have for later when I understand this stuff more. Thanks! Is there a simple example of a routine that passed a pointer from a variable? I have looked around on the interwebz, but I don't really get the pointer stuff yet. Edited December 26, 2016 by The Maxx Quote Link to comment Share on other sites More sharing options...
bogax Posted December 29, 2016 Share Posted December 29, 2016 Wow, that's way over my head. It's good information to have for later when I understand this stuff more. Thanks! Is there a simple example of a routine that passed a pointer from a variable? I have looked around on the interwebz, but I don't really get the pointer stuff yet. a pointer is a location in memory that contains the location (memory address) of something else I suppose by that definition a pointer could be a constant but they're always variables technically I misspoke I should have said that it passes a reference since I was talking about the value the pointer would contain (which in this case would be the address of the playercolor table) Quote Link to comment Share on other sites More sharing options...
The Maxx Posted January 4, 2017 Author Share Posted January 4, 2017 (edited) Okay, so... sometimes I do things the long and tedious way. Then I go back and tidy things up when I can see a broader picture of where the patterns are. However... I started putting together a 32 direction subpixel movement and found that, even though the pattern is obvious, I am unable to multiply the floats the way that seems most obvious in order to shrink the code down to something less ridiculous (bB hangs). This is what I got... it works fine, but it's BLOOAATED. Ha! Thanks in advance if there is anyone who could give me some advice: my variables are set like: dim xVel = a.b dim yVel = c.d I have tried creating my own "temp variables" to do the multiplication ahead, but that failed as well dim temp2 = e.f ; etc if direction=0 && joy0up then xVel=xVel+0.032 if direction=1 && joy0up then xVel=xVel+0.028 : yVel=yVel-0.004 if direction=2 && joy0up then xVel=xVel+0.024 : yVel=yVel-0.008 if direction=3 && joy0up then xVel=xVel+0.020 : yVel=yVel-0.012 if direction=4 && joy0up then xVel=xVel+0.016 : yVel=yVel-0.016 if direction=5 && joy0up then xVel=xVel+0.012 : yVel=yVel-0.020 if direction=6 && joy0up then xVel=xVel+0.008 : yVel=yVel-0.024 if direction=7 && joy0up then xVel=xVel+0.004 : yVel=yVel-0.028 if direction=8 && joy0up then yVel=yVel-0.032 if direction=9 && joy0up then xVel=xVel-0.004 : yVel=yVel-0.028 if direction=10 && joy0up then xVel=xVel-0.008 : yVel=yVel-0.024 if direction=11 && joy0up then xVel=xVel-0.012 : yVel=yVel-0.020 if direction=12 && joy0up then xVel=xVel-0.016 : yVel-yVel-0.016 if direction=13 && joy0up then xVel=xVel-0.020 : yVel=yVel-0.012 if direction=14 && joy0up then xVel=xVel-0.024 : yVel=yVel-0.008 if direction=15 && joy0up then xVel=xVel-0.028 : yVel=yVel-0.004 if direction=16 && joy0up then xVel=xVel-0.032 if direction=17 && joy0up then xVel=xVel-0.028 : yVel=yVel+0.004 if direction=18 && joy0up then xVel=xVel-0.024 : yVel=yVel+0.008 if direction=19 && joy0up then xVel=xVel-0.020 : yVel=yVel+0.012 if direction=20 && joy0up then xVel=xVel-0.016 : yVel=yVel+0.016 if direction=21 && joy0up then xVel=xVel-0.012 : yVel=yVel+0.020 if direction=22 && joy0up then xVel=xVel-0.008 : yVel=yVel+0.024 if direction=23 && joy0up then xVel=xVel-0.004 : yVel=yVel+0.028 if direction=24 && joy0up then yVel=yVel+0.032 if direction=25 && joy0up then xVel=xVel+0.004 : yVel=yVel+0.028 if direction=26 && joy0up then xVel=xVel+0.008 : yVel=yVel+0.024 if direction=27 && joy0up then xVel=xVel+0.012 : yVel=yVel+0.020 if direction=28 && joy0up then xVel=xVel+0.016 : yVel=yVel+0.016 if direction=29 && joy0up then xVel=xVel+0.020 : yVel=yVel+0.012 if direction=30 && joy0up then xVel=xVel+0.024 : yVel=yVel+0.008 if direction=31 && joy0up then xVel=xVel+0.028 : yVel=yVel+0.004 Edited January 4, 2017 by The Maxx Quote Link to comment Share on other sites More sharing options...
bogax Posted January 4, 2017 Share Posted January 4, 2017 first you consolidate the redundant predicates then use a lookup table here's a macro to lookup 8.8 values you'll have to figure out the table(s) yourself untested but it should give you the idea dim tmp88 = temp4.temp3 ; lookup an 8.8 constant from a table ; the table is in two data statements one for hi bytes and one for lo bytes ; takes three parameters ; a variable to take the looked up value it must be in consecutive locations ; eg variable a for the lo byte and b for the hi byte b.a or temp4.temp3 etc ; an 8 bit index ; the name of the table if the name supplied is "table" then the data statements ; must be named tablelo, tablehi macro lu88 asm ldx {2} lda {3}lo,x sta {1}-1 lda {3}hi,x sta {1} end end if joy0up then callmacro lu88 tmp88 direction Vx_table : xVel = xVel + tmp88 : callmacro lu88 tmp88 direction Vy_table : yVel = yVel + tmp88 1 Quote Link to comment Share on other sites More sharing options...
The Maxx Posted January 5, 2017 Author Share Posted January 5, 2017 Thank you! I almost understand this. It will be good to have here when things start coming together in my feeble brain. Quote Link to comment Share on other sites More sharing options...
bogax Posted January 6, 2017 Share Posted January 6, 2017 (edited) Here is something similar in bB with the tables the tables have redundancies and symmetries that could be exploited to make them smaller but it would be slower I should have mentioned that this assumes that directions is limited to 0..31 dim tmp88 = temp4.temp3 if !joy0up then skip temp3 = Vx_lo[direction] : temp4 = Vx_hi[direction] : xVel = xVel + tmp88 temp3 = Vy_lo[direction] : temp4 = Vy_hi[direction] : yVel = yVel + tmp88 skip data Vx_lo 8, 7, 6, 5, 4, 3, 2, 1 248, 255, 254, 253, 252, 251, 250, 249 248, 249, 250, 251, 252, 253, 254, 255 8, 1, 2, 3, 4, 5, 6, 7 end data Vx_hi 0, 0, 0, 0, 0, 0, 0, 0 255, 255, 255, 255, 255, 255, 255, 255 255, 255, 255, 255, 255, 255, 255, 255 0, 0, 0, 0, 0, 0, 0, 0 end data Vy_lo 0, 255, 254, 253, 252, 251, 250, 249 0, 249, 250, 251, 252, 253, 254, 255 0, 1, 2, 3, 4, 5, 6, 7 0, 7, 6, 5, 4, 3, 2, 1 end data Vy_hi 0, 255, 255, 255, 255, 255, 255, 255 0, 255, 255, 255, 255, 255, 255, 255 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0 end I may have gotten the tables right edit: oops nope (fixed now) (I hope ) Edited January 7, 2017 by bogax Quote Link to comment Share on other sites More sharing options...
The Maxx Posted January 7, 2017 Author Share Posted January 7, 2017 (edited) Aha! Now, this is something that I'm pretty sure I understand. I've been wondering how to use tables and it appears that it is easier than I thought... kind of like a 1d (read only?) array... that can be used with multiple objects. Thanks!!! Now, I just need to put it to use. Edited January 7, 2017 by The Maxx 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.