Jump to content
IGNORED

Vector Hyperdrive (A new Space Shooter)


Opry99er

Recommended Posts

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.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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

 

:|

Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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,8):"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
  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...