Squid Division Posted February 13, 2014 On 2/13/2014 at 2:01 AM, SpennyDubz said: Try using a mod ( % ) operator. That way -10%360 = 350 and 350%360 = 350; Wow I'll give that a try. That would make things significantly easier. Thanks! Share this post Link to post Share on other sites
Blambo Posted February 13, 2014 If anyone here's making a tile based or remotely top down 2d game with a fantasy setting, here's a free tileset to use (not mine): http://forums.tigsource.com/index.php?topic=38615.0 Share this post Link to post Share on other sites
Dualhammers Posted February 13, 2014 Is it worth using Khan Academy to pick up some more math while learning to code in Unity? Share this post Link to post Share on other sites
Spenny Posted February 13, 2014 On 2/13/2014 at 3:19 AM, Blambo said: If anyone here's making a tile based or remotely top down 2d game with a fantasy setting, here's a free tileset to use (not mine): http://forums.tigsource.com/index.php?topic=38615.0 To this end http://opengameart.org/ is pretty great. Share this post Link to post Share on other sites
Dewar Posted February 13, 2014 I think i just finally made the breakthrough that makes all the sharing values between different objects in unity make sense. I somehow missed that the scripts you attach to an object are considered to be components of that object. So where before I was trying to do Object.Variable to pull in a public value, I actually needed to take Object.GetComponent<Script>() first, and then do Script.Variable. I'm sure it's simple to a lot of folks, but it was an epiphany for me. Share this post Link to post Share on other sites
Squid Division Posted February 13, 2014 Yeah, that took a bit for me too. What took even longer was remembering that you don't put " " around the script name because components don't get them, but finding an object by name or tag do. Share this post Link to post Share on other sites
BigJKO Posted February 13, 2014 On 2/13/2014 at 1:43 AM, SpennyDubz said: I don't think this is correct. As long as you're accounting for the varying timestep in the Update method, i.e. use Time.deltaTime your camera movement should be smooth. I had Time.deltaTime so I don't know what went wrong. FixedUpdate was the only Update method that worked for me. I mean I'm probably doing something wrong, but this works! Could it have something to do with the fact that I'm moving the player using AddForce/AddTorque? So its movement is running in a FixedUpdate? Share this post Link to post Share on other sites
anthonyRichard Posted February 13, 2014 On 2/13/2014 at 6:34 AM, BigJKO said: I had Time.deltaTime so I don't know what went wrong. FixedUpdate was the only Update method that worked for me. I mean I'm probably doing something wrong, but this works! Could it have something to do with the fact that I'm moving the player using AddForce/AddTorque? So its movement is running in a FixedUpdate? As far as I can tell, camera movement logic needs to be in the same kind of Update method as the movement logic of the object you are following, whatever that happens to be. Jitter seems to occur when the movement between target & camera is happening out of sync/on different Update cycles. Rigidbody physics happens on FixedUpdate, whereas if you are manually moving some object manually in code, then it's probably in Update. The right answer will be specific to a particular game. Share this post Link to post Share on other sites
BigJKO Posted February 13, 2014 Right! So FixedUpdate it is, for my game. So, revised tip: IF you're having trouble with jittery camera follow motion, make sure it's in the same type of Update method as the movement code for the object you're following. Happy now, SpennyDubz?! Related question: If my camera following is happening inside FixedUpdate does that mean I can just drop the deltaTime variable? Not that it matters much, would just look cleaner.. Share this post Link to post Share on other sites
Gaius Julius Posted February 13, 2014 Hey, my learning is working, I actually sorta understand what you guys are talking about! Slightly peeved that IRC is blocked at work. Although that's probably a good thing for productivity... Share this post Link to post Share on other sites
clyde Posted February 13, 2014 On 2/13/2014 at 11:49 AM, Gaius Julius said: Hey, my learning is working, I actually sorta understand what you guys are talking about! I was thinking the same thing. If I had read this conversation on Monday, I would have skipped it and said "Unity sounds to complicated." Now I'm reading it and saying "Do I have to add the script as a component to every object that I want to pull a value for?" Which may not make any actual sense, but it's the difference between trying to read this gibberish and skipping it. Share this post Link to post Share on other sites
Spenny Posted February 13, 2014 On 2/13/2014 at 8:04 AM, BigJKO said: Right! So FixedUpdate it is, for my game. So, revised tip: IF you're having trouble with jittery camera follow motion, make sure it's in the same type of Update method as the movement code for the object you're following. Happy now, SpennyDubz?! I'm happy, I'm learning too! Share this post Link to post Share on other sites
BigJKO Posted February 13, 2014 Ok. A sketch has been drawn of a track for prototyping this Micro Machines-like. Now onto actually modelling it. Share this post Link to post Share on other sites
Gravedrinker Posted February 13, 2014 Is anyone here able to help out with music by any chance? Share this post Link to post Share on other sites
clyde Posted February 13, 2014 On 2/13/2014 at 3:20 PM, Gravedrinker said: Is anyone here able to help out with music by any chance? Can you be a bit more specific? Share this post Link to post Share on other sites
Gravedrinker Posted February 13, 2014 Well I've made a little game for the last Ludum Dare and I'd like to polish that up and add more content. You fly a spaceship through a factory, and having some music for that would be great. It adds a lot of atmosphere after all. It can be found here. Share this post Link to post Share on other sites
dibs Posted February 13, 2014 Record yourself humming/lalaing what you would like to have and post it here. Some inspiration like. Share this post Link to post Share on other sites
Gravedrinker Posted February 13, 2014 On 2/13/2014 at 4:05 PM, dibs said: Record yourself humming/lalaing what you would like to have and post it here. Some inspiration like. I have really no idea what would fit the best, that's why I posted the link to the game. Maybe that helps with the inspiration? The post-compo version already contains a track that a friend made really quick, but I am by no means bound to that style (The track is somewhat dubstep-y because that's what he knew the best) Share this post Link to post Share on other sites
Entriech Posted February 13, 2014 You might want to check http://opengameart.org/ . They don't only host graphics and models, but also music and sound as well. Share this post Link to post Share on other sites
anthonyRichard Posted February 13, 2014 On 2/13/2014 at 8:04 AM, BigJKO said: So, revised tip: IF you're having trouble with jittery camera follow motion, make sure it's in the same type of Update method as the movement code for the object you're following. Happy now, SpennyDubz?! As an addendum, if you have the movement code in Update, but the kind of movement you are doing is to AddForce to a rigidbody, the rigidbody is secretly actually doing its physics calculations/movements in its own FixedUpdate, so that's where you want your camera follow code. I don't know any of this for sure, but it's what I've discovered through extensive trial and error. I don't know if you could get rid of deltaTime, I would guess not, but try it and see. Share this post Link to post Share on other sites
BenLuke Posted February 13, 2014 I've started following that scrolling shooter Unity tutorial someone linked and it's been great actually getting a vague understanding of how Unity, hopefully I'll learn enough to actually start making something and not lose interest before even really starting like other times I've tried making a game. Share this post Link to post Share on other sites
BigJKO Posted February 13, 2014 The car is now not hopelessly uncontrollable, the prototype track is in and Sick Ramps are being jumped! https://vine.co/v/M7hDIrYjQmU Share this post Link to post Share on other sites
Lechimp Posted February 13, 2014 Those are indeed some pretty sick ramps. Nice work! Share this post Link to post Share on other sites
Gaius Julius Posted February 13, 2014 On 2/13/2014 at 9:44 PM, BenLuke said: I've started following that scrolling shooter Unity tutorial someone linked and it's been great actually getting a vague understanding of how Unity, hopefully I'll learn enough to actually start making something and not lose interest before even really starting like other times I've tried making a game. I'm doing the same thing. I started with the ball rolling one which is super simple but helpful. Definitely worth just supplementing with some wider reading so you understand more about how C# works! Share this post Link to post Share on other sites
clyde Posted February 14, 2014 On 2/13/2014 at 10:10 PM, BigJKO said: The car is now not hopelessly uncontrollable, the prototype track is in and Sick Ramps are being jumped! https://vine.co/v/M7hDIrYjQmU That is a sick jump. So it that track made of terrain? Or is it all created objects? Share this post Link to post Share on other sites