Opry99er Posted September 4, 2015 Author Share Posted September 4, 2015 Tonight I hope to add the second wave of aliens... I have a pattern for movement in mind, but have not worked out the math yet. Second wave will not fire torpedoes, but will (instead) move downscreen, 2 or 3 at a time, in a diagonal pattern left to right and then right to left. I have simulated this in XB with MOTION coupled with some delay loops. Need to add a counter and do it manually inside the motion subroutine so that all the other 'stuff' can happen. I'll post what I can tonight, if I can get it going properly. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted September 4, 2015 Share Posted September 4, 2015 Very nice work indeed Owen Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 4, 2015 Author Share Posted September 4, 2015 Thank you! I found the long-standing speed bug that was killing my execution time... I had a subroutine that was executing 3 times right in the middle of my game loop instead of once... I had mis-typed a flag name and it was incrementing thr incorrect counter. Now, it is lightning fast and room to grow. Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted September 4, 2015 Share Posted September 4, 2015 Nice work, Owen! With all of the neat games in development right now, we are definitely in the middle of one of the best periods ever for great TI software! It is nice to see that the compiler is getting some great use too! 1 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 4, 2015 Author Share Posted September 4, 2015 Thanks. We are far far away from a truly complete and playable game, but getting closer every day. Will be invoking XB256 in the next day or two. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 5, 2015 Author Share Posted September 5, 2015 I spent my free time last night playing around with Air-Sea Battle with the boy... Tonight I hope to return to Vector and make a little progress. The challenges for Wave 2: -Create random alien starting locations that are not actually random. -Update the positions manually rather than using MOTION. -Create unique movement patterns for each enemy SPRITE -Maintain full speed with increased collision checks Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 7, 2015 Author Share Posted September 7, 2015 Here's the Wave 2 pattern (rough outline) You will need to hit each ship twice to destroy it. I ran the demo several times to show the randomness of starting ship locations, speeds, and colors. Enjoy http://www.youtube.com/watch?v=DXcNFl5cWmc 50 CALL CLEAR :: CALL SCREEN(2) 60 RANDOMIZE 70 CALL MAGNIFY(3) 100 CALL CHAR(104,"01018386FCC062301C060101010000008080C1613F03460C3860808080000000") 110 FOR SP=1 TO 5 120 ENCOL=INT(RND*13)+3 130 ALX=INT(RND*200)+1 140 ALY=INT(RND*80)+1 150 ALMX=INT(RND*20)-10 160 ALMY=INT(RND*25)+10 170 CALL SPRITE(#SP,104,ENCOL,ALY,ALX,ALMY,ALMX) 180 NEXT SP 190 GOTO 190 1 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 14, 2015 Author Share Posted September 14, 2015 Having some difficulty getting the second wave of ships to go. I have noticed that I am using more variables than I need to... Different variable names for each wave, etc... I need to consolidate and regroup. With a game like this, I find it easy to jump ahead of myself because the concepts are so simple. Give me a few days and I should have a playable demo for everyone. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted September 14, 2015 Share Posted September 14, 2015 Try and read the first part about Finite State Machines (until Enums and Switches). I hope it might help you. http://gameprogrammingpatterns.com/state.html Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 14, 2015 Author Share Posted September 14, 2015 Thank you. I read through it this morning. I will re-read and apply what's there to my thinking when I sit back down at the computer. Primarily, the issue is the flag for initializing the wave 2 pattern... I am trying to re-use collision and motion code from the wave 1 sets, but it is acting funny. Ill update soon. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted September 14, 2015 Share Posted September 14, 2015 Something is clearly wrong with our approach. Every time we touch this handful of code, we break something. We need to add a bunch more moves - we havent even added walking yet - but at this rate, it will collapse into a heap of bugs before we're done with it. Those coders you idolize who always seem to create flawless code aren't simply superhuman programmers. Instead, they have an intuition about which kinds of code are error-prone, and they steer away from them. Complex branching and mutable state - fields that change over time - are two of those error-prone kinds of code, and the examples above have both. Finite State Machines to the Rescue In a fit of frustration, you sweep everything off your desk except a pen and paper and start drawing a flowchart. You draw a box for each thing the heroine can be doing: standing, jumping, ducking, and diving. When she can respond to a button press in one of those states, you draw an arrow from that box, label it with that button, and connect it to the state she changes to. A flowchart containing boxes for Standing, Jumping, Diving, and Ducking. Arrows for button presses and releases connect some of the boxes. Congratulations, you've just created a finite state machine. So in XB one could have a Finite State Machine (FSM) for the example heroine be something like: REM HEROSTATE: 1=STANDING, 2=DUCKING, 3=JUMPING, 4=DIVING 100 HEROSTATE=1 110 ON HEROSTATE GOTO 1000,2000,3000,4000 In your case, you could have more than one FSM. One could be named levelState or gameState, and states could be level one, level two, game over, and maybe even attract mode. The same (FSMs) could apply for the aliens, they could each have they own attack mode, changing attack modes etc. Maybe one can initialize 5 aliens like this REM ALIENSTATE: 1=INITIALIZE, 2=ATTACKHOMEIN, 3=ATTACKSTRAIGHT, 4=RUNAWAY, 5=DYING, 6=GONE 100 FOR I=1 TO 5::ALIENSTATE(I)=1::NEXT I Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 19, 2015 Author Share Posted September 19, 2015 Got a little progress made here. End-Game state added, also have a finite number of lives. The "ships-remaining" tracker is in the bottom right of the screen. I plan on doing quite a bit more this weekend, so I'll likely add another video on Sunday or so, if all goes well. In the meantime, see how you like the gameplay (in this choppy video) http://www.youtube.com/watch?v=HE7gcNoMDkY&feature=youtu.be 2 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 19, 2015 Author Share Posted September 19, 2015 It once again added a bunch of extra crap at the end of my video..... Don't know exactly why it is doing that. I think it is because I am not re-naming the previous video from the default name, then when the new video saves as the default name, it is just tacking on stuff at the end that was in the previous video. Quote Link to comment Share on other sites More sharing options...
Iwantgames:) Posted September 19, 2015 Share Posted September 19, 2015 Looks awesome Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 19, 2015 Author Share Posted September 19, 2015 Thanks. Long way to go, but you can now score and die, which (I guess) technically mskes it a game. Quote Link to comment Share on other sites More sharing options...
Tursi Posted September 19, 2015 Share Posted September 19, 2015 The added on crap was once reported as a Classic99 bug - are you using the Classic99 video record function? These days I recommend the external record tools, they do a much better job. Open Broadcaster Software is my current fav: https://obsproject.com/ Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 19, 2015 Author Share Posted September 19, 2015 Yes, I am using the video capture in Classic99. I will look at the one you suggested. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted September 20, 2015 Share Posted September 20, 2015 Very nice Owen! Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 20, 2015 Author Share Posted September 20, 2015 Today I was able to implement a difficulty ramp for the first wave enemy... Speed of enemy ship movement and of enemy torpedoes increases as you beat up on your foe. The first wave is considered the baseline starting point... Each subsequent iteration of that first stage will start at a higher spee than the previous one. Also within each wave, the enemy must be hit 13 times to destroy it. Each hit on the enemy will trigger an increase in speed as well. Video coming sometime early in the week. Quote Link to comment Share on other sites More sharing options...
unhuman Posted September 22, 2015 Share Posted September 22, 2015 One thing I'd love if you could implement... When you shoot dual bullets, it'd be great if one hits, the other continues on its merry way. 1 Quote Link to comment Share on other sites More sharing options...
Willsy Posted September 22, 2015 Share Posted September 22, 2015 I love the space-age font! Quote Link to comment Share on other sites More sharing options...
Opry99er Posted September 23, 2015 Author Share Posted September 23, 2015 Interesting thought there, unHUman. Right now they are both part of the same SPRITE, so that would take some doing... An extra set of collision checks, but I believe it is possible. If I am allowing 3 torpedo sets to be in motion at once (which is the current setup) then that would take my detection checks from 3 to 6 just on player torpedoes. I will have to test the cycles and rearrange some stuff, but it would be a nice 'realistic' effect. And Willsy, that font was my favorite out of the 200+ I looked at. sometimes99er hooked me up with the font. Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted September 23, 2015 Share Posted September 23, 2015 I love the space-age font! I worked up the font below back in the 80's for a filing system program. It could be included into many different XB programs. Cut & paste it into Classic 99 to test, then if you like it, just save it in merge format for future use. 10 CALL CLEAR :: CALL CHAR(65,"003E22227E626262") :: CALL CHAR(66,"007C44447E42427E") :: CALL CHAR(67,"007E46404040427E") 20 DISPLAY AT(10,:"initializing" :: CALL CHAR(68,"007C62626262627E") :: CALL CHAR(69,"007E40407E60607E") :: CALL CHAR(70,"007E60607E202020") 30 CALL CHAR(71,"001E20404642427E") :: CALL CHAR(72,"004444447E666666") :: CALL CHAR(73,"007E18181818187E") 40 CALL CHAR(74,"000404060666667E") :: CALL CHAR(75,"0062644870484442") 50 CALL CHAR(76,"002020206060607E") :: CALL CHAR(77,"00466E5646465656") :: CALL CHAR(78,"004262524A465252") 60 CALL CHAR(79,"007E42424242427E") :: CALL CHAR(80,"007E42427E606060") :: CALL CHAR(81,"007E424242484E7E") 70 CALL CHAR(82,"007C44447E666666") :: CALL CHAR(83,"007E42407E02627E") :: CALL CHAR(84,"007E181818181818") 80 CALL CHAR(85,"004646464646467E") :: CALL CHAR(86,"0046464646462C18") :: CALL CHAR(87,"004242425A5A5A7E") 90 CALL CHAR(89,"0042427E18181818") :: CALL CHAR(90,"007E62040810267E") 100 CALL CHAR(44,"0000000000701010") 110 CALL CHAR(48,"007C44444C4C4C7C") :: CALL CHAR(49,"007010101014147C") 120 CALL CHAR(50,"007C04047C404C7C") :: CALL CHAR(51,"007808087C0C0C7C") 130 CALL CHAR(52,"004048487C080808") :: CALL CHAR(53,"007C40407C04647C") 140 CALL CHAR(54,"00404040407C447C") :: CALL CHAR(55,"007C440408101010") 150 CALL CHAR(56,"003828287C44447C") :: CALL CHAR(57,"007C447C04040404") 160 CALL CHAR(95,"00FF") 170 CALL CHAR(94,"00000000000000FF") 180 CALL CLEAR 190 PRINT "1234567890 ABCDEFGHIJKLMNOP" 200 PRINT "QRSTUVWXYZ" 210 GOTO 210 2 Quote Link to comment Share on other sites More sharing options...
RXB Posted September 23, 2015 Share Posted September 23, 2015 (edited) I really really hate these stupid EMOTES! NIce font! Edited September 23, 2015 by RXB Quote Link to comment Share on other sites More sharing options...
Opry99er Posted October 1, 2015 Author Share Posted October 1, 2015 That really is a nice font, Kevan. No new progress on this game. Have been so busy lately, just no time to play in space. Soon, I'll get it rolling again. Once I have some time, it SHOULD come along rather quickly, as the primary routines are all in place. 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.