Author Topic: SHMUPSpace!  (Read 2952 times)

0 Members and 1 Guest are viewing this topic.

Offline AndrewofDoom

  • In A.D. 2366 war was beginning
  • 29
  • Permanent yuri goggles.
    • Skype
    • Steam
    • Twitter
It has come to my attention that this place is a barren wasteland when it comes to shoot em ups. It. Is. Driving me NUTS. Therefore, I have arisen from my rage to this point to talk about this very concept.

While there is Spoon's Top Down Shooter (TDS), it is very incredibly rudimentary and barely like a real shmup (as much as I love it, Spoon, it's the painful truth :P). But as I thought over how I would make the amazing, grand, and eternally GLORIOUS SHMUPSpace, I ran into one, insanely huge show stopping issue. I have no clue how I would get the game to scroll like it were a shmup in the first place, because even if I were to make a static camera and have it scroll, the player ship would move out of view. Not only that, I have no clue how to keep the player on the screen. Any ideas to work around this somehow?
My Efforts:
SF Knight

20:08:19   AndrewofDoom: Though I find it mildly disturbing that a loli is giggling to mass destruction.
20:10:01   Spoon: I find it mildly arrousing
20:10:07   AndrewofDoom: Woah
20:10:15   Spoon: sound like my kind of loli
20:10:21   Spoon: and im not even a lolicon

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Shadows of Lylat has this kind of feature. But I didn't remember if it used lua or SEXP or both.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Are you talking about scrolling in one direction only like Raptor, Raiden, Tyrian, Touhou, and all that jazz? As is when activating 2D Mode in the Mission Specs is when it acts like Fraxy, Flatspace, or Starscape.

 

Offline AndrewofDoom

  • In A.D. 2366 war was beginning
  • 29
  • Permanent yuri goggles.
    • Skype
    • Steam
    • Twitter
Shadows of Lylat has this kind of feature. But I didn't remember if it used lua or SEXP or both.

Shadows of Lylat is a rail shooter, not what I'm looking for. I'm looking for along the lines of Gradius, R-Type, and Thunder Force, which are 2d side scrolling shooters. I do know, however, that they did lua scripting for that to work though.

Are you talking about scrolling in one direction only like Raptor, Raiden, Tyrian, Touhou, and all that jazz? As is when activating 2D Mode in the Mission Specs is when it acts like Fraxy, Flatspace, or Starscape.

Scrolling in one direction like Raptor, Raiden, yadda yadda. If I wanted an arena shooter like Fraxy, I wouldn't have come here to ask. :p
My Efforts:
SF Knight

20:08:19   AndrewofDoom: Though I find it mildly disturbing that a loli is giggling to mass destruction.
20:10:01   Spoon: I find it mildly arrousing
20:10:07   AndrewofDoom: Woah
20:10:15   Spoon: sound like my kind of loli
20:10:21   Spoon: and im not even a lolicon

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
has the AI been fixed for 2D, if i recall around the time spoon did his TDS the ai did strange things because it tried to use up and down causing spinning madness, waypoints could be used to some point but fighter vs player was impossible.
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline AndrewofDoom

  • In A.D. 2366 war was beginning
  • 29
  • Permanent yuri goggles.
    • Skype
    • Steam
    • Twitter
has the AI been fixed for 2D, if i recall around the time spoon did his TDS the ai did strange things because it tried to use up and down causing spinning madness, waypoints could be used to some point but fighter vs player was impossible.

Thing is that the 2d mission flag still doesn't necessarily constrain you to 2-dimensional space. AI most likely hasn't been changed to fit the 2d mission stuff yet, but it doesn't bother me, since I will be using sexp-based movements for enemies, since I'm hoping to has stages with obsticles and AIs on waypoints always pause slow down at nodes, but I desire smooth movements since most enemies won't be on screen for more than 2-3 seconds.
My Efforts:
SF Knight

20:08:19   AndrewofDoom: Though I find it mildly disturbing that a loli is giggling to mass destruction.
20:10:01   Spoon: I find it mildly arrousing
20:10:07   AndrewofDoom: Woah
20:10:15   Spoon: sound like my kind of loli
20:10:21   Spoon: and im not even a lolicon

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
has the AI been fixed for 2D, if i recall around the time spoon did his TDS the ai did strange things because it tried to use up and down causing spinning madness, waypoints could be used to some point but fighter vs player was impossible.
yes, and homing missiles of any kind also don't work because of this.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
...as I thought over how I would make the amazing, grand, and eternally GLORIOUS SHMUPSpace, I ran into one, insanely huge show stopping issue. I have no clue how I would get the game to scroll like it were a shmup in the first place, because even if I were to make a static camera and have it scroll, the player ship would move out of view. Not only that, I have no clue how to keep the player on the screen. Any ideas to work around this somehow?
You can do what you're talking about, but it takes a fair amount of patience with FRED's cut scene sexps. I never tried doing this in 2d so it might not work...

Step1: create a camera that is not the player's using set-camera

Step2: Use the set-position to position the camera directly on top of the player ship in FRED.

Step3: Use the set-facing to point the camera straight down

Step4: use a second set-position sexp which will run for the duration of the level. Set the movement time to the amount of time the level will be and set the acceleration to 0. If you play with it enough, it should give you a camera that moves along the level, showing the player's position.
 
Step4: Assign 2 variables, one called FrontBound and one called BackBound. These variables represent the position of the edge of the camera (which should be measured) as it moves. A counter sexp should increment these values to simulate movement.
 
Step 5: assign 2 hardcoded numbers to check if the player has gone too far up or down. A sample sexp
If (get-position-x > hardcoded value) , then do step 6

Step 6: If the player goes 'out of bounds' you can set the player into the middle of the screen, wrap the player to the opposite side of the screen or kill the player.
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
If you use set-object-position with every-time, NOTHING WILL COLLIDE D:
unless you mean setting the camera position.
(´・ω・`)
=============================================================

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
The set-camera-position (or whatever it's called) sexp, the one that moves the camera to a designated x,y,z space over an ammount of time. It should only be used once per level.
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline AndrewofDoom

  • In A.D. 2366 war was beginning
  • 29
  • Permanent yuri goggles.
    • Skype
    • Steam
    • Twitter
Good morning, everyone. If you have already noticed elsewhere, my dream is finally getting somewhere, but I have one big problem....I didn't want to show it, but there seems to be a bug where the player can manage to escape the left and right bounds (which is the z axis) of the screen...which is not good. I've had a few people take a look at it and they can't seem to figure out why it's doing it.

Here's the script I've made (It's really just a fairly heavily modified corridor mode script)

tube-sct.tbm
Code: [Select]
#Conditional Hooks

$State: GS_STATE_GAME_PLAY

$On Frame:

[
--if the initShmup() function hasn't been called, don't bother running any of this.
if booleanInitScroll == true then

   objectPlayer = hv.Player

   if objectPlayer:isValid() then --Player Validity Check

      --Make sure that we needed info
      if orientationLast == nil then
         orientationLast = objectPlayer.Orientation
      end

      --Get Position and Orientation and Speed
      orientationCurrent = objectPlayer.Orientation
      vectorCurrentPos = objectPlayer.Position
      floatPlayerSpeed = objectPlayer.Physics:getSpeed()
      vectorPlayerVelocity = objectPlayer.Physics.Velocity

      --Set the 3D aiming aid system

      ---Get Aiming Aids

      vectorPointer = orientationCurrent:unrotateVector(vectorFrontDirection)

      --Update chase camera position and orientation
      --objectCCamera:setPosition(vectorCCameraPos)
      --objectCCamera:setOrientation(orientationCCameraNew)

      --Get current rotational velocity data
      vectorRealRotVel = objectPlayer.Physics.RotationalVelocity

      --Set limit for turning for horizontal axis
      if math.pow(orientationCurrent["h"],2) > math.pow(orientationLast["h"],2) then
         vectorRealRotVel[2] = vectorRealRotVel[2] - 1*(orientationCurrent["h"])/3
      else
         vectorRealRotVel[2] = vectorRealRotVel[2] - 1*(orientationCurrent["h"])/5
      end

      --Set limit for turning for vertical axis
      if math.pow(orientationCurrent["p"],2) > math.pow(orientationLast["p"],2) then
         vectorRealRotVel[1] = vectorRealRotVel[1] - 1*(orientationCurrent["p"])/3
      else
         vectorRealRotVel[1] = vectorRealRotVel[1] - 1*(orientationCurrent["p"])/5
      end

      --Prevent rolling
      floatCurrentRoll = orientationCurrent["b"]
      if floatCurrentRoll ~= 0 then
         vectorRealRotVel[3] = -2*floatCurrentRoll/2
      end

      --Horizontal Position Limit
      if objectPlayer.Position["x"] > floatHLimit then
         vectorPlayerVelocity["x"] = 300
         vectorPointer["x"] = vectorPointer["x"] + (vectorCurrentPos["x"] - floatHLimit)
      elseif vectorCurrentPos["x"] < floatHRLimit then
          vectorPlayerVelocity["x"] = -300
          vectorPointer["x"] = vectorPointer["x"] + (vectorCurrentPos["x"] + floatHRLimit)
      end

      --Forward Position Limit
      if objectPlayer.Position["z"] > floatFLimit then
         vectorPlayerVelocity["z"] = -300
         vectorPointer["z"] = vectorPointer["z"] + (vectorCurrentPos["z"] - floatFLimit)
      elseif vectorCurrentPos["z"] < floatFRLimit then
         vectorPlayerVelocity["z"] = 300
         vectorPointer["z"] = vectorPointer["z"] + (vectorCurrentPos["z"] + floatFRLimit)
      end

      --Vertical Position Limit
      if objectPlayer.Position["y"] > floatVLimit then
vectorPlayerVelocity["y"] = -300
         --vectorPlayerVelocity["y"] = vectorPlayerVelocity["y"] - (vectorCurrentPos["y"] - floatVLimit)
         vectorPointer["y"] = vectorPointer["y"] + (vectorCurrentPos["y"] - floatVLimit)
      elseif vectorCurrentPos["y"] < floatVRLimit then
         vectorPlayerVelocity["y"] = 300
         --vectorPlayerVelocity["y"] = vectorPlayerVelocity["y"] - (vectorCurrentPos["y"] + floatVRLimit)
         vectorPointer["y"] = vectorPointer["y"] + (vectorCurrentPos["y"] + floatVRLimit)
      end

      ---Set 3D aiming aid positions
      vectorNewTargetPos = vectorCurrentPos + vectorPointer/(1/1.25)
      objectAimingAid1.Position = vectorNewTargetPos
      vectorNewTargetPos = vectorCurrentPos + vectorPointer/(1/2.5)
      objectAimingAid2.Position = vectorNewTargetPos
      vectorNewTargetPos = vectorCurrentPos + vectorPointer/(1/5)
      objectAimingAid3.Position = vectorNewTargetPos

      --Update Player Rotational Velocity, Position and Orientation
      objectPlayer.Physics.RotationalVelocity = vectorRealRotVel
      objectPlayer.Physics.Velocity = vectorPlayerVelocity

      --Reference Orientation for next frame
      orientationLast = objectPlayer.Orientation

      --AndrewofDoom's mod: addition of scrolling
intSavedCamPosX = intSavedCamPosX + floatScrollX
intSavedCamPosY = intSavedCamPosY + floatScrollY
intSavedCamPosZ = intSavedCamPosZ + floatScrollZ
vectorCCameraPos = ba.createVector(intSavedCamPosX,intSavedCamPosY,intSavedCamPosZ)
objectCCamera:setPosition(vectorCCameraPos)
gr.setCamera(objectCCamera)
floatHLimit = floatHLimit + floatScrollX
floatVLimit = floatVLimit + floatScrollY
floatFLimit = floatFLimit + floatScrollZ
      ---Set movement limits again for the rear. The original version makes the assumption that the player's postion will be along the origin and thus symmetrical, which will not be the case if the camera is scrolling.
floatHRLimit = floatHRLimit + floatScrollX
floatVRLimit = floatVRLimit + floatScrollY
floatFRLimit = floatFRLimit + floatScrollZ
      ---Keep player moving relative to camera
local movedVector = objectPlayer.Position
movedVector["x"] = movedVector["x"] + floatScrollX
movedVector["y"] = movedVector["y"] + floatScrollY
movedVector["z"] = movedVector["z"] + floatScrollZ
objectPlayer.Position = movedVector



      --new section to remove excess enemy fighters and bombers

      integerShips = #mn.Ships

      --Get rid off excess enemies
      for g=1,integerShips do
         objectDisposableShip = mn.Ships[g]

         --Check team and hitpoint status
         stringDisposableShipTeam = objectDisposableShip.Team.Name
         floatDisposableShipHitpoints = objectDisposableShip.HitpointsLeft
         if stringDisposableShipTeam ~= "Friendly" and floatDisposableShipHitpoints > 0 then

            --Only fighters & bombers
            stringDisposableShipType = objectDisposableShip.Class.Type.Name
            if stringDisposableShipType == "Fighter" or stringDisposableShipType == "Bomber" then

               --Move ship only if it has flown past the player
               vectorDisposableShipPosition = objectDisposableShip.Position
               floatFrontDistance = vectorDisposableShipPosition["z"] - vectorCurrentPos["z"]
               if floatFrontDistance < -100 then
                  vectorDispose = ba.createVector(0,0,-50000)

                  --Update the moved ships position and get rid off it
                  objectDisposableShip.Position = vectorDispose
                  objectDisposableShip.HitpointsLeft = 0
                  objectDisposableShip:kill(objectDisposableShip)
               end
            end
         end
      end

   end --Player Validity Check
end

function initShmup()

      ---Create 'blank' orientation
      ---these rotations are in RADIANS, not degrees.
      orientationBlank = mn.Ships[1].Orientation
      orientationBlank["p"] = 0
      orientationBlank["b"] = 0
      orientationBlank["h"] = -1.57
     
intSavedCamPosX = 250
intSavedCamPosY = 0
intSavedCamPosZ = 0
---Set movement box limits
floatHLimit = 30
floatVLimit = 80
floatFLimit = 20
--- Set movement limits again for the rear. The original version makes the assumption that the player's postion will be
--- along the origin and thus symmetrical, which will not be the case if the camera is scrolling.
floatHRLimit = -30
floatVRLimit = -80
floatFRLimit = -20
---Scroll rates for each axis
floatScrollX = 0
floatScrollY = 0
floatScrollZ = 0.5
      vectorCCameraPos = ba.createVector(intSavedCamPosX,intSavedCamPosY,intSavedCamPosZ)
      orientationCCamera = orientationBlank

      ---Create chase camera
      objectCCamera = gr.createCamera("Chase Camera",vectorCCameraPos,orientationCCamera)

      ---Use the new chase camera
      gr.setCamera(objectCCamera)

      ---Create front vector
      vectorFrontDirection = ba.createVector(0,0,100)
     
      objectAimingAid1 = mn.Ships["AimingAid I"]
      objectAimingAid2 = mn.Ships["AimingAid II"]
      objectAimingAid3 = mn.Ships["AimingAid III"]

booleanInitScroll = true

end



---Modifies the scroll speed of the camera on any axes a man desires.
---Each parameter is the scrolling speed for each axis specified in meters/frame
function setScrollSpeed(x,y,z)
floatScrollX = x
floatScrollY = y
floatScrollZ = z
end

]

#End

Be easy on the new guy. I just started scripting literally yesterday afternoon. :P
My Efforts:
SF Knight

20:08:19   AndrewofDoom: Though I find it mildly disturbing that a loli is giggling to mass destruction.
20:10:01   Spoon: I find it mildly arrousing
20:10:07   AndrewofDoom: Woah
20:10:15   Spoon: sound like my kind of loli
20:10:21   Spoon: and im not even a lolicon

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Well from the perspective of someone who does not know how to read that, It looks pretty impressive.

Is there some kind of way to say

float x_position;
const max;
const min;
IF x_position > max THEN x_position = max
IF x_position < min THEN x_position = min

In game that would look like the player is sliding against the wall, which is what most schmups do no?

Where does one go to learn scripts anyways?  :nervous:
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 
 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
here?
seriously?

go to hell..


as for your issues andrew of doom, you could always print out the var's to the hud, notably the ones concerning the movement limits. i'll give it a look tomorrow, but a hunch tells me you should be subtracting instead of adding to the rear Z limit. in short, have a printout of the vars and try to replicate the "ship goes out of bounds" thingy.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline AndrewofDoom

  • In A.D. 2366 war was beginning
  • 29
  • Permanent yuri goggles.
    • Skype
    • Steam
    • Twitter
My Efforts:
SF Knight

20:08:19   AndrewofDoom: Though I find it mildly disturbing that a loli is giggling to mass destruction.
20:10:01   Spoon: I find it mildly arrousing
20:10:07   AndrewofDoom: Woah
20:10:15   Spoon: sound like my kind of loli
20:10:21   Spoon: and im not even a lolicon

 
 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
You can always terminate the player if they go out of bounds. The unforgiving nature would be the fastest way to present the atmosphere of an old school game.
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline AndrewofDoom

  • In A.D. 2366 war was beginning
  • 29
  • Permanent yuri goggles.
    • Skype
    • Steam
    • Twitter
That solution works quite well...until you die and restart the mission anyway. Because I end up getting this :p

edit: nvm I got it to work. I just force the scrolling script off as soon as the player dies.
« Last Edit: June 20, 2012, 11:50:30 pm by AndrewofDoom »
My Efforts:
SF Knight

20:08:19   AndrewofDoom: Though I find it mildly disturbing that a loli is giggling to mass destruction.
20:10:01   Spoon: I find it mildly arrousing
20:10:07   AndrewofDoom: Woah
20:10:15   Spoon: sound like my kind of loli
20:10:21   Spoon: and im not even a lolicon