Data Realms Fan Forums
http://45.55.195.193/

Ship that flies like Pixel Junk Shooter
http://45.55.195.193/viewtopic.php?f=75&t=31687
Page 1 of 1

Author:  Djinn [ Wed Sep 12, 2012 3:28 pm ]
Post subject:  Ship that flies like Pixel Junk Shooter

I don't want someone to make this so much as point out if someone's made one already. Pretty much, I'm looking for something that accelerates up and down with the direction keys and rotates with left and right keys, and stays still when nothing is being pressed. I've been fiddling around with it, but while I can do the rotation easily, the up and down keys make it move globally up and down where I'm looking for local movement relative to the direction the craft is pointing. Any leads?

Author:  Benpasko [ Thu Sep 13, 2012 3:32 am ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

It can't be done, as far as I know. I'm pretty sure crafts gib if you flip them upside down for too long.

Author:  Coops [ Thu Sep 13, 2012 3:37 am ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Who said anything about needing to use a craft?

This is very possible, just grab something like an ACrab and give it some funky movement properties with lua.

Author:  Bad Boy [ Thu Sep 13, 2012 3:40 am ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Yep, an actor works well too. I'm taking a break from other stuff and writing it up, though I don't have the time to finish it tonight. If no one else gets to it first I should have it done tomorrow.

Would you rather velocity changes or forces added? As far as I can tell it doesn't really make a difference, just one's more realistic than the other.

Author:  Djinn [ Thu Sep 13, 2012 4:45 am ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Bad Boy wrote:
Yep, an actor works well too. I'm taking a break from other stuff and writing it up, though I don't have the time to finish it tonight. If no one else gets to it first I should have it done tomorrow.

Would you rather velocity changes or forces added? As far as I can tell it doesn't really make a difference, just one's more realistic than the other.


Well, what I want it for really is burrowing through the earth, so whichever works better for that, I guess! I'm working on it myself too, so if you get something made for it I'll probably take a look and mash them both together.

Author:  Bad Boy [ Thu Sep 13, 2012 11:53 am ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

The word burying triggered my memory, I think zalo (though it might not have been zalo, I'm sure someone else can confirm) made a death worm style thing a while back for a mod contest, it might be useful to you. I'd suggest searching for mod releases with his name since I have no idea if it was named death worm, or of course you can just ask him.

Author:  Djinn [ Thu Sep 13, 2012 12:08 pm ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Bad Boy wrote:
The word burying triggered my memory, I think zalo (though it might not have been zalo, I'm sure someone else can confirm) made a death worm style thing a while back for a mod contest, it might be useful to you. I'd suggest searching for mod releases with his name since I have no idea if it was named death worm, or of course you can just ask him.


I did, though sadly it does not work at all in b27, and it's not a matter of conversion, the mechanic it's based on simply does not work anymore in this version. Alas.

Author:  Bad Boy [ Thu Sep 13, 2012 5:17 pm ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

And done, with a lot of extra stuff thrown in for my amusement. The formation flying is pretty fun :)
I'll probably dump it in minor mods later but I figure I shouldn't keep you waiting for the script since I'm going out.
The part you need is the movement stuff, particularly the Vector(,):RadRotate;
Attachment:
File comment: Pie icon sprites from Unitec, everything else is clearly base game content
Brainfighter.rte.rar [4.95 KiB]
Downloaded 419 times

Author:  Shook [ Thu Sep 13, 2012 5:39 pm ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Technically, it might be possible to use a craft as long as you use some HFlipped shenanigans once it reaches the upside-down mark. More specifically:
Code:
   if self.RotAngle > math.pi/2 and self.RotAngle < 3*(math.pi/2) then
      if self.HFlipped == false then
         self.HFlipped = true;
      else
         self.HFlipped = false;
      end
      self.RotAngle = self.RotAngle + math.pi;
   end

That's probably only necessary for craft though (it'll also flip the sprite, which may/may not be a good thing). And maybe ACrabs, but they're odd. This would also require you to adjust the acceleration vector accordingly though, by means of...
Code:
   self.Vel = self.Vel + (Vector(<acceleration>,0):GetXFlipped(self.HFlipped)):RadRotate(self.RotAngle);

GetXFlipped(self.HFlipped), which is an awesome thing. Using an Actor is likely to be WAY easier though, and unless you really need to order it like a craft and/or carry cargo, then that's probably what you oughta go for.

just noting some options you know

Author:  Djinn [ Thu Sep 13, 2012 10:20 pm ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Bad Boy wrote:
And done, with a lot of extra stuff thrown in for my amusement. The formation flying is pretty fun :)
I'll probably dump it in minor mods later but I figure I shouldn't keep you waiting for the script since I'm going out.
The part you need is the movement stuff, particularly the Vector(,):RadRotate;
Attachment:
Brainfighter.rte.rar


These are faarrrr beyond what I was looking for but they're fun to play with in their own right! Also the fact that they collide with eachother makes formation flying pretty hilarious. But yep, this contains exactly what I'm looking for, so rad.

Author:  Hellevator [ Thu Sep 13, 2012 11:26 pm ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

While we're speaking of Zalo, can someone actually fix that Death Worm thing?

Author:  Bad Boy [ Fri Sep 14, 2012 5:02 am ]
Post subject:  Re: Ship that flies like Pixel Junk Shooter

Djinn wrote:
These are faarrrr beyond what I was looking for but they're fun to play with in their own right! Also the fact that they collide with eachother makes formation flying pretty hilarious. But yep, this contains exactly what I'm looking for, so rad.
Yep, to be honest I actually had it mostly finished a half hour to an hour before posting it up, but I was too busy flying delta formations of dummy controllers and trying to shoot through the gaps to finish things up.
If you do want to use the formation stuff as well let me know, it's kind of lazily done at the moment in that you can actually control them with any actor. So if you want it I'll fix it up and add stuff so it's a little simpler to control (e.g. have all of them take the strafe mode of the controlled brain, match its rotation and stuff like that). I plan to put some of this to use at some point so this isn't actually a completely pointless project for me :D

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/