SmasherImp Posted December 3, 2012 Share Posted December 3, 2012 (edited) Hey all!I've been a LONG time lurker of the forums here, and have finally decided to give 2600 homebrew a serious go. Not being an experienced programmer led me to pick up bB which I've been working on the past day or two. Seeing as this is my first real post, I decided I'll make it a part introduction, part showcase, part questions sort of thing. Basically it's my aim to make a game people can enjoy, and it would be a dream to get a limited cart release if it were good enough and demand was there. I realise I have to start small though, so that's a distant future goal for me to aim for. As part of my introduction, I also live in New Zealand. It's great, we made Lord of the Rings. Back to the 2600! So what would all these high aspirations be without at least a little something to show for it? WELL! I've attached my first demo below, and looking to expand GREATLY on it. I've tried to include lots of cool stuff in it, like multi-coloured playfields, flashing sprites, title and gameover screens, and even a secret screen!! (hit the bw switch while on the game over screen). Reset jumps you back to the title screen from the game over screen too. I've also included a no_blank_lines version of this (with a missile workaround! MAGIC ). As if this introductory post wasn't long enough, I also had a few questions to help expand upon this game. 1. How do I have multiple enemy sprites on the same line? And how do I trigger them all to respawn when I destroy, say, 3 of them side by side? 2. How do I slow the enemy's movement speed. The movement system I'm using moves it by 1, and I tried changing it to both 0.5 AND 1/2, but neither work. 3. How do I speed up the enemy's movement each time 3 on the line are destroyed. I plan on having one enemy come out of each door thing, and when they're all destroyed they respawn and come out slightly faster. I guess this partially ties into question 2. 4. I've also had insane problems trying to implement sound, specifically playing a sound when a shot is fired.That's all I can think of for now. If you have anything you want me to add, PLEASE let me know! Hope you enjoyed my post, I look forward to getting to know you all better. And seriously, hit the BW switch on the game over screen. I put alot of work into that haha! InsaneInvaders.bas InsaneInvaders.bin Edited December 5, 2012 by SmasherImp Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 3, 2012 Share Posted December 3, 2012 Welcome! 1. How do I have multiple enemy sprites on the same line? And how do I trigger them all to respawn when I destroy, say, 3 of them side by side? You can duplicate a sprite up to 3 times with equal spacing (like some of the planes in combat) by setting the NUSIZ# register. But it's up to you to track which of the copies got hit, and set NUSIZ# appropriately to make it "disappear". 2. How do I slow the enemy's movement speed. The movement system I'm using moves it by 1, and I tried changing it to both 0.5 AND 1/2, but neither work. 3. How do I speed up the enemy's movement each time 3 on the line are destroyed. I plan on having one enemy come out of each door thing, and when they're all destroyed they respawn and come out slightly faster. I guess this partially ties into question 2. It ties together very much. bB can use fixed point numbers if you really need to work with decimals, but most of the time it's enough to only update your moves by 1 every other frame, every 4th frame, or every Nth frame. The latter is what you're asking about, since you want variable speed. Here's one example... dim enemyframe=y dim enemyspeed=z enemyspeed=5 : rem the initial enemy speed mainloop enemyframe=enemyframe+1 if enemyframe<enemyspeed then skipenemymove : rem skip enemy movement if enough frames haven't passed enemyframe=0 : rem ** reset the counter for next time rem *** enemy move logic goes here skipenemymove rem do something like this in the logic that handles enemies being shot... if enemyspeed>0 then enemyspeed=enemyspeed-1 4. I've also had insane problems trying to implement sound, specifically playing a sound when a shot is fired. Not sure where the problem is. When the fire button is pressed and you setup your missile, set AUDC0, AUDV0, and AUCF0 as desired. Create a timer variable so the sound plays for a few frames before it's silenced. Or change the AUDF0 as the missile travels up the screen and silence AUDV0 when it reaches the top. 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 4, 2012 Share Posted December 4, 2012 Check out the list of example programs on the right side of this page: www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#example_programs Just click on a link and it will hop to the example program. There are three sound programs in the list. I'm working on a couple of new example programs, so be sure to check that list once in a while (and remember to refresh/reload the page to make sure you're seeing the latest version). 1 Quote Link to comment Share on other sites More sharing options...
SmasherImp Posted December 5, 2012 Author Share Posted December 5, 2012 Minor update: -Spawned and despawned the sprites at the correct time so they aren't present on the title and game over screen. -Made the enemy spawn out of a random door when killed instead of the same one. You can duplicate a sprite up to 3 times with equal spacing (like some of the planes in combat) by setting the NUSIZ# register. But it's up to you to track which of the copies got hit, and set NUSIZ# appropriately to make it "disappear". Thanks for the tip. Decided I'm going to can the 3 enemies on one line idea. Ill just use the multisprite kernel if I need more Not sure where the problem is. When the fire button is pressed and you setup your missile, set AUDC0, AUDV0, and AUCF0 as desired. Create a timer variable so the sound plays for a few frames before it's silenced. Or change the AUDF0 as the missile travels up the screen and silence AUDV0 when it reaches the top. Even with this advice I still couldn't implement it as desired It would usually completely crash on startup. Check out the list of example programs on the right side of this page: www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#example_programs Just click on a link and it will hop to the example program. There are three sound programs in the list. I'm working on a couple of new example programs, so be sure to check that list once in a while (and remember to refresh/reload the page to make sure you're seeing the latest version). Thanks for your reply. Despite having this sample program, I couldn't replicate what it was doing with your provided sound, or my own. Also, I've removed the no_blank_lines files as they're kind of useless and not really the point. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 5, 2012 Share Posted December 5, 2012 Added one sound effect, made the enemy slower, and made the player faster: insaneinvaders_2012y_12m_05d_0429t.bin insaneinvaders_2012y_12m_05d_0429t.bas More needs to be done, but that should be of some help. 1 Quote Link to comment Share on other sites More sharing options...
SmasherImp Posted December 5, 2012 Author Share Posted December 5, 2012 Added one sound effect, made the enemy slower, and made the player faster: insaneinvaders_2012y_12m_05d_0429t.bin insaneinvaders_2012y_12m_05d_0429t.bas More needs to be done, but that should be of some help. Wow, I can't thank you enough! You've taken my all-over-the-place code and structured it really nicely and added really great stuff. I think I'm just going to read over exactly what you've done so that I fully understand it, then work on adding more to it. It plays so much better now. I especially like the movement stuff changes, they really make a difference. I'll read what you've done and try make it so that each time an enemy is killed, it speeds up slightly. Thanks again Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 5, 2012 Share Posted December 5, 2012 Wow, I can't thank you enough! Be sure to download the latest. I made one tiny mistake and had to reupload. 1 Quote Link to comment Share on other sites More sharing options...
SmasherImp Posted December 5, 2012 Author Share Posted December 5, 2012 (edited) Be sure to download the latest. I made one tiny mistake and had to reupload. Sure, I'll redownload when I get back on my computer. And then it's reading time !! EDIT: Also, if anyone else is wanting to try this out, just download Random Terrain's files, I'll reupdate my post when I've added something of note. Edited December 5, 2012 by SmasherImp 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.