-
Content Count
1,152 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by mksmith
-
@Lillapojkenpåön, It's a good fun game - the original designer did any awesome job of the graphics and they do suit the Atari very well. I was thinking about other modes of play also - collecting coins (or diamonds?) might offer another way of play. Will it be worth getting the coin? Yeah I've noticed those 2 lines on the crumbling beam also - wasn't sure how to deal with those but I think you've hit it on the head! Still working through whether I have a 2 player option (which I think would be fun!) - but flickering would be an issue. The secondary beam is the crumbling beam - I think I'll rename that above in the description. There is a horizontal beam which slices though the tiles and drops them down a layer (a bit like how Tetris does it when you fill a row). There are also 2 others which drop tiles in different ways to the main one. Working out whether I can fit (or need) those still as the size of the playfield is quite a bit smaller than the original game.
-
The fix provided to @cimmerian worked well but we still have a slight frame overrun when the crumbling beam is finishing. I've got some ideas about fixing that but will check that out once my harmony cart arrives next week. In the mean time I've spent the past couple of days building a Visual Studio Code extension for batari Basic. Got the syntax highlighting done (for the most part) and just got the compile process working (not fun but actually easy enough in the end). As my code is now quite large Visual bB is becoming a real pain to edit as it constantly jumps around when pasting. I've included bB and Stella along with it (with options to provide you own paths) - will have a play and see how that works. Will release it once I've spent some time with it.
-
rem batari Basic Program rem created 22/12/2018 12:49:19 PM by Visual bB Version 1.0.0.568 rem ***************************************************** bank 1 rem ***************************************************** temp1 = temp1 set tv ntsc set kernel DPC+ set smartbranching on set optimization inlinerand set kernel_options collision(playfield,player1) rem DEFINE VARS HERE goto START_RESTART bank2 rem ***************************************************** bank 2 rem ***************************************************** temp1 = temp1 START_RESTART rem gray sunset bkcolors: $02 $02 $02 $04 $06 $08 $0E $00 end rem colored sunset rem $88 bkcolors: $78 $68 $58 $48 $38 $28 $18 end playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ .......X................X....... ......XXX..............XXX...... .....XXXXX............XXXXX..... ....XXXXXXX..........XXXXXXX.... ..XXXXXXXXXXX......XXXXXXXXXXX.. XXXXXXXXXXXXXXX..XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end pfcolors: $00 $00 $00 $00 $00 $00 $00 end scorecolors: $1E $1C $1A $1A $18 $18 $16 $16 end MAIN_LOOP rem playfield configuration DF6FRACINC = 255 ; Background colors. DF4FRACINC = 255 ; Playfield colors. DF0FRACINC = 255 ; Column 0. DF1FRACINC = 255 ; Column 1. DF2FRACINC = 255 ; Column 2. DF3FRACINC = 255 ; Column 3. rem draw drawscreen rem INSERT GAMEPLAY LOGIC goto MAIN_LOOP rem ***************************************************** bank 3 rem ***************************************************** temp1 = temp1 rem ***************************************************** bank 4 rem ***************************************************** temp1 = temp1 rem ***************************************************** bank 5 rem ***************************************************** temp1 = temp1 rem ***************************************************** bank 6 rem ***************************************************** temp1 = temp1 rem You may be able to place your TitleScreen here with no consequences I believe the playfield area is narrower but the spriate can go fullscreen. This works for me:
-
Did you set the colors using pfcolors: feature? You need to set each individual line
-
Batari Basic and the Standard Kernel Sprite Bank
mksmith replied to EvoMikeUK's topic in batari Basic
Hi EvoMikeUk, This might be of assistance to you: http://atariage.com/forums/topic/229564-demonstration-of-reusing-sprite-data-inside-larger-sprite I've used a similar process for my Tower of Rubble conversion (though for DPC+ which is slightly different in how you access the player pointers) - I've got 60 frames for the player. -
Looks great metalbabble - will have a game of this soon!
-
Thanks to @cimmerian showing me the debugger I've investigated the cause of not working on release hardware (massive frame overrun when starting). I've provided him with a new build to test and will release it once he gives me the go ahead. So initialising DPC+ ram, tiles, player and beams all at once appeared to be the issue. So what I've done is add an initialisation routine with runs for 100 frames (leaves a bit of room if required). During this I set everything up a frame at a time (the DPC+ ram clear takes about 16 frames to process for example - each row of tiles on the map). I've done a similar thing when destroying tiles after the secondary beam finishes. Anyway during this period the player now flashes identifying the game is about to start so it all fits together nicely.
-
Hey guys - all controls are with the joystick only - so no fire button (I've actually yet to play with a joystick myself - just the keys). Jumping is essentially automatic: you jump off the edge and depending on whats in front of you, you will jump across and hang or drop and hang you can climb down backwards into a hanging position then move left/right to jump across (again depending on whats in front of you). there is a short jump (between 1 tile gap) and a longer jump (between 2 tile gap). Hopefully that helps. I'll add this to the top.
-
A new release is now available in the first post. Spent the whole day cleaning up, reviewing and optimising code which has reduced frame overruns to none (hopefully!!).
-
@metalbabble - thanks getting there hopefully soon!
-
@NostAlgae37 - thanks! Would love a bit of variation if I can just not sure how that could work. @cimmerian - wow that would be great! I'll PM you.
-
I've posted a first WIP release of my take on Tower of Rubble for the Atari 2600 using batari Basic and DPC+. Been really enjoying programming a game again after not doing so for quite a period of time. Still have a few things to knock off (especially sound which I'm dreading). Probably another few weeks to finish.
-
[ON HOLD] So DionoiD has now released his WIP of Tower of Rubble and his take is amazing to say the least! Great visuals, music and game play really makes it a fantastic Atari 2600 conversion. So for now I'm going to leave this to one side - I might pick up the game to maybe do something different down the track. I'm also making the source code available if anyone wants to make use of anything. Tower of Rubble How long can you survive on the lethal TOWER OF RUBBLE as it crumbles and rebuilds itself around you? This is my first Atari 2600 game written batari Basic and DPC+ as a way of learning to code the Atari which I have recently returned to after a very long hiatus. I started coding just before Christmas so about 4 weeks worth of work so far. How to play Control the player with the joystick only (no fire button) moving left and right to run across the tiles and pushing up and down to climb. Learning to jump is key to surviving the tower and is essentially automatic: you jump off the edge and depending on whats in front of you, you will jump across and hang or drop and hang you can climb down backwards into a hanging position then move left/right to jump across (again depending on whats in front of you). there is a short jump (between 1 tile gap) and a long jump (between 2 tile gap). State of the game Currently a basic mechanics of the game is complete and the following is essentially complete: the player can run, jump, climb and hang around the main beam drops tiles randomly another beam destroys tiles and sends them crumbling into the water (moving from the outside-in) some basic sounds (walk, jump, death) pause game with Color/B&W button (press fire to continue) game currently ends and pauses for a period of time before returning to title screen (you can restart directly after a short pause here by pressing fire) I've had to work around a few things to keep the frames from jumping (hopefully!) There is still a number of things to finalise: test on real hardware (Harmony cart on it's way) balancing - game runs quite quickly ATM add some variation to the tiles (currently causing a few frame issues so not sure I will be able to do it) sound and music - always an issue for me but we'll see how I go! horizontal beam - will need to look at drawing this with the background (I believe?) - have about 900 bytes available in the bank I'm using for the beams. other beams - there are a couple of other beams which I need to investigate which drop and clear tiles slightly differently game over notification - still deciding on whether to add this as it will explain your death (would love to overlay but doesn't appear possible) any remaining bugs would love a 2 player version - I've partially coded it so this may be possible - not sure how may frames might be left though Feedback Any feedback would be very much appreciated. Real Hardware 17/01 - Currently it appears the game doesn't work on real hardware when launching off the title-screen (frame overrun) - will investigate. 18/01 - A build has been tested by @cimmerian which has fixed the launching issue but I still have a minor overrun with the crumbling beam to sort through 21/01 - This build should now run on hardware without any frame overruns [TBC] Downloads 20190121 - all frame overruns should now be removed (Stella is showing no overruns) as I've fully split the game initialisation (start) and beam completion (ie. main beam - adding tile, crumbling beam - removing columns) over multiple frames. This should set me up for adding the next horizontal beam (fingers crossed). towerofrubble.20190121.bin Older builds 20190117 - this release includes some sounds (Walk, Jump and Death), a number of optimisations to provide better/faster access to the ram bank, reduced cross-bank access (found 1 or 2 not required) and cleaned up a lot of no longer used code. The game runs a lot smoother and seems to have removed most/all frame overuns (finger crossed). towerofrubble.20190117.bin 20190115 - Initial WIP release towerofrubble.20190115.bin
- 28 replies
-
I would love some sort of ability to write to the screen. Change of level, game over messages etc would be awesome!
-
Thanks guys - yeah using VbB so will check out bookmarks. Would be great to have that ability though. @Lillapojkenpåön - I've got a bit of a process built now (see here) but would love to see any other examples of the sprite/color stuff. bB has some interesting things you can do but also what you have to work around. The biggie for me now is the 256b limit for data tables and whether there is a way to work around that - otherwise there is a bit of if then checking to work out the data pointers. I did find a macro can give a bit of flexibility around setting stuff from pointers: macro SetPlayer0Frame rem {1}=datapointer {2}=frame rem set data pointer asm LDX #<{1} STX temp5 end rem set frame player0pointerlo = temp5+({2}*Height) asm LDA #((>{1}) & $0f) | (((>{1}) / 2) & $70) STA player0pointerhi end end macro SetPlayer1To9Frame rem {1}=datapointer {2}=spritenumber {3}=frame rem set datapointer asm LDX #<{1} STX temp5 end rem load sprite pointer asm LDA #<(playerpointers+({2}*2)) STA DF0LOW LDA #(>(playerpointers+({2}*2))) & $0F STA DF0HI end rem set frame DF0WRITE = temp5+({3}*Height) asm LDA #((>{1}) & $0f) | (((>{1}) / 2) & $70) STA DF0WRITE end end
-
Hi, I'm working on my DPC+ game and it's all starting to get a bit large to easily edit. Can you separate each bank's code into it's own files and merge it back together on compile? I've looked at include, includesfile and inline and these don't appear to work in this situation. Any suggestions? Thanks!
-
Thanks guys - yeah looking to overlay the game over messages on the existing screen as it seemed to be an easier way to do what I wanted. Guess i'll try using sprites to do what I need. Thanks again!
-
So after a few more days of work i've now got a new titlescreen with some scrolling text and flashing colors (bank6 now full!), a more varied and colored tileset (still not sure of the colors yet) and the first beam/lazer?? dropping blocks. I've had to re-arrange stuff and play around to try and get access to certain things across a couple of banks. The main loop is in bank2 and I now have the player code in bank3 and the enemy stuff in bank4. Hoping this will work ok on a real machine but until I get a Harmony cart (or release a build soon) for some testing I can only keep my fingers crossed. I've converted some tile and data bank code into Macros which work quite well across various banks - except when you need to draw tiles!! I've setup a data bank to store some variables to check back in bank2 whether I need to drop a block. I have the requirement to draw the initial map and drop tiles but these are in different banks currently - hopefully I can fit it all into one eventually. I have a couple of way of dying now but need to get the game over process sorted next and tidy up a little bug in the player jumping. Once this is done I might release a build - hopefully some time in the next week or two. Reasonably happy with progress though.
-
Nice! Has a really good feel to it and the graphics are really well done! Will look forward to how this progresses!
-
Hi, Not sure if this is possible but can you use this to overlay an existing screen? For example show a game over message? Update: after adding in a titlescreen for my game it was a really easy process - had to shrink down some stuff in size to fit in most of what I wanted. After looking over the code I believe I might be able to grab parts of it to help add a game over message - will check that out tomorrow.
-
As discussed in the previous blog post, i am interested in a reasonably reusable animation engine which allows me to call a SetAnimation function to initialise a new animation then use generic UpdateAnimation and DrawAnimation functions to process it regardless of what i need animating. I need to set the total frames, the speed of the animation (by screen update generally), the frame to display and any positional (x and y) change. When starting this game I followed a few example games across the forum for inspiration which generally make use of the gosub ... to set the specific frame to the sprite required with a number of lookup data tables. The one benefit of this game is the animation will process and finish before the next check is required which does simplify everything just a bit - I don't need (thankfully) to make changes during the animation (might make a nice engine for something like Lode Runner maybe). As I want to eventually make this a 2 player game I want to reuse the animation frames when required but I didn't want to just duplicate it all. As noted in the previous blog I found this forum post discussing how to make this a little more dynamic (but due to pointers it still carries a bit of duplication per sprite). So armed with this I setup the following: dim player0AnimationId = k dim player0AnimationFrame = m dim player0AnimationSpeed = n dim player0IsAnimating = o const ANIMATION_STATIONARY = 0 const ANIMATION_FALL = 1 const ANIMATION_HANG = 2 const ANIMATION_MOVE = 3 const ANIMATION_CHANGE_DIRECTION = 4 const ANIMATION_JUMP_UP = 5 const ANIMATION_CLIMB_UP = 6 const ANIMATION_CLIMB_DOWN = 7 const ANIMATION_JUMP_SMALL = 8 const ANIMATION_JUMP_LARGE = 9 function SetPlayer0Animation rem temp1=AnimationId player0AnimationId = temp1 player0IsAnimating = 1 player0AnimationFrame = 0 player0AnimationSpeed = 0 return function UpdatePlayer0Animation rem validate if !player0IsAnimating then return rem prepare (got offset) ftemp1 = PL_ANIMATION_OFFSET[player0AnimationId] rem update position? (only on 0) if player0AnimationSpeed > 0 then goto _SKIP_UPDATEPLAYER0ANIMATION_MOVE rem read x and y to offset rem data is TotalFrames,TotalSpeed(+2),Frame(+0),X(+1),Y(+2) rem update x fresult = ftemp1 + 2 + (player0AnimationFrame * 3) + 1 ftemp2 = PL_ANIMATION[fresult] if _Bit2_Player0_Dir_Left{2} then player0x = player0x - ftemp2 else player0x = player0x + ftemp2 rem update y fresult = fresult + 1 ftemp2 = PL_ANIMATION[fresult] player0y = player0y + ftemp2 _SKIP_UPDATEPLAYER0ANIMATION_MOVE rem increment speed player0AnimationSpeed = player0AnimationSpeed + 1 ;fresult = ftemp1 + 1 : if player0AnimationSpeed < 50 then goto _SKIP_UPDATEPLAYER0ANIMATION_FRAME fresult = ftemp1 + 1 : if player0AnimationSpeed < PL_ANIMATION[fresult] then goto _SKIP_UPDATEPLAYER0ANIMATION_FRAME player0AnimationSpeed = 0 rem increment frames player0AnimationFrame = player0AnimationFrame + 1 fresult = ftemp1 : if player0AnimationFrame < PL_ANIMATION[fresult] then goto _SKIP_UPDATEPLAYER0ANIMATION_FRAME rem complete player0IsAnimating = 0 : player0AnimationFrame = 0 : player0AnimationSpeed = 0 ... _SKIP_UPDATEPLAYER0ANIMATION_FRAME return function DrawPlayer0Animation rem prepare ftemp1 = PL_ANIMATION_OFFSET[player0AnimationId] fresult = ftemp1 + 2 + (player0AnimationFrame*3) + 0 : ftemp2 = PL_ANIMATION[fresult] rem get frame pointer asm LDX #<PL_ANIMATION_FRAMES STX ftemp5 end rem get frame player0pointerlo = ftemp5+(ftemp2*8 ) asm LDA #((>PL_ANIMATION_FRAMES) & $0f) | (((>PL_ANIMATION_FRAMES) / 2) & $70) STA player0pointerhi end return I then configured the data as below. The offset gives me the location in the PL_ANIMATION table for the active animation. From there I can look up the Total Frames and Speed, then for the current animation frame I can grab the frame to display and the x and y offset for the frame. rem ANIMATION rem 0-0 Stationary rem 1-5 Fall rem 2-31 Hang rem 3-36 Move rem 4-62 Change Direction rem 5-79 Jump (up) rem 6-87 Climb (up) rem 7-113 Climb (down) rem 8-139 Jump (small) rem 9-153 Jump (large) data PL_ANIMATION_OFFSET 0, 5, 31, 36, 62, 79, 87, 113, 139, 153 end data PL_ANIMATION 1,1, 0,0,0, 8,2, 1,0,1, 1,0,1, 1,0,1, 1,0,1, 1,0,1, 1,0,1, 1,0,1, 1,0,1, 1,2, 2,0,0, 8,1, 0,1,0, 3,1,0, 4,1,-1, 5,1,0, 6,1,0, 7,1,0, 8,1,1, 9,1,0, 5,2, 10,0,0, 11,0,0, 12,0,0, 13,0,0, 14,0,0, 2,3, 15,0,0, 16,0,0, 8,3, 17,1,0, 18,0,-1, 19,1,-1, 20,2,0, 21,1,-2, 22,1,-2, 22,1,-1, 22,1,-1, 8,3, 22,-1,1, 22,-1,1, 22,-1,2, 21,-1,2, 20,-2,0, 19,-1,1, 18,0,1, 17,-1,0, 4,2, 23,0,0, 24,0,0, 25,0,0, 26,0,0, 8,2, 23,1,-1, 23,1,0, 24,1,0, 24,1,0, 25,1,0, 25,1,1, 26,1,0, 2,1,0 end data PL_ANIMATION_FRAMES %00011000 %00000100 %00011000 %00111100 %01011010 %00011000 %00101000 %00100100 %01000010 %01011010 %00100100 %00011000 %00011000 %00111000 %00101110 %00100000 %10000000 %10110000 %01000000 %01110000 %01101000 %01101000 %10100000 %10100000 ... end So i've got some further ideas about how this could work for a 2 player game (or multiple sprites such as enemies) using the same code by storing/restoring the state of the active object via some additional vars or DPC+ ram. If anyone has any suggestions to tiding up this further I'd be grateful - it has saved me about 700 bytes so far. I do find I'm needing to use a lot of temp variable declarations particularly around calculations. I guess I can't be too hard - being able to do this quickly in basic is pretty cool!
-
So over the past week or so I've started a new game in batariBasic based on Tower of Rubble! Actually not too long after starting I saw that another user had also started their own version - looking forward to seeing what can be done in 4k with someone who appears to know what they are doing! I've been putting this together in DPC+ and its been a learning experience getting to understand some of the modest limitations of programming for the Atari 2600. One of the more interesting issues has been getting a little framework for animation. I've got a process I'd developed over time for Blitz/Monkey which worked pretty well but this is probably going to be too hard to bring over - essentially you provide all the key stuff such as frames (images), speed to animate, x & y adjustments etc and it went off and did it's thing. Referencing pointers to gfx seems to be a biggy in bateriBasic as I like to separate out each movement (ie. moving, jumping, falling etc) into it's own set but this is where it comes unstuck. I'd like a process I can re-use around frame-strips which I found a general solution to here but unless I put everything into the data section (haven't tested the 256 byte alignments here - there are about 26 frames from memory) you have to essentially hard-code your pointer due to how it compiles thus would need to duplicate a lot of code. I want to do a 2 player survival winner take all mode eventually and wish to reuse the player movement code for both players. Anyway after testing 8x8 tiles with a 8x8 sprite (using pfread) I wasn't happy how it all fitted on-screen, so I re-started this time creating a ram array (via DPC+) and storing the tile map here so I now have a 16x8 tiles which does fit better with the sprite size (though at the reduction of whats on-screen). I have also completed the full player movement though the animation side is very much still a WIP and is reasonably messy. I'd also started to get things ready for 2 player requirements but I've now stripped that all out so I can get back to concentrating on actually finishing the core game up first. I have also done a brief test of dropping a block onto the map with the little lazer? guide thingy but have yet to implement this back into the new game code. I've also run out of room in Bank2 where i've currently got the main loop and player code so will need to move this (thinking of just having the main loop and branching off to the player and falling stuff in other banks). I've also got a pause mode setup but the colors are not right currently. Anyway I've attached the current build below if anyone wants to have a go...
-
HI, I'm currently working on a platform game for DPC+ and have a lot of animation for the player - this is exactly what i'm looking for to create a animation engine to go with it. One question - how can I change the pointer to another set of animations ie. moving, jumping, falling etc. I've played around with diming a variable and referencing a starting animation and then changing that variable to another animation in data but it doesn't change - i'm assuming the compiler maybe hard-coding this into the asm which would in some ways make an animation engine reasonably difficult. Anyone who better understands pointers have any ideas? In the end I could load up all animation into one only data reference I guess... Update: Maybe some further info here as well - maybe not possible to have separate animations http://atariage.com/forums/topic/256849-re-use-player-sprites-without-duplication-dpc Thanks!
-
I've created a template for batariBasic containing a basic game structure with the following features: DPC+ kernal Utilising multiple banks Title screen (bank6), play screen (bank 2), game over screen (bank 3) Pause mode (bank 3) - using B&W switch This is an adaption of the ex_title_screen_and_game_over.bas generously created by the following people (thank you!): ; Example program by Duane Alan Hahn (Random Terrain) using ; hints, tips, code snippets, and more from AtariAge members ; such as batari, SeaGtGruff, RevEng, Robert M, Nukey Shay, ; Atarius Maximus, jrok, supercat, GroovyBee, and bogax. Original available here: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_missile_bankswitching_example Note: I've put this here (mainly) for my own uses going forward and will update it as needed. Free to anyone who wishes to use. Last updated: 12 Dec 2018, v1.1
