untune's Forum Posts

  • That's a really nice effect, great work! I bet it'd look good combined with a slight pan out when moving and a pan inwards when motionless.

    Really cool, thanks for sharing

  • Also found this which outlines the necessary formula from the looks of it - however it might also use parts of Box2d that aren't implemented in the Construct physics behaviour... unless there's a workaround?

    http://www.box2d.org/forum/viewtopic.php?f=3&t=3071

  • That's a really cool example, the maths are getting more and more complex eh It's a shame about the jitter, I've been pondering how exactly to remove that. I'm still not sure about the whole radians/angles thing... since all of Box2d's calculations are implemented using radians (which is the proper way to go in a mathematical sense) yet everything in the physics behaviour and construct in general uses degrees...

    I'll just have to keep trying stuff and see what comes of it Maybe there's a way of implementing it by setting the angular velocity as opposed to using torque

  • Very cool lucid, it seems to work pretty well if the changes in angle are small, but if you make anything bigger, lets say a 90 degree swing, you still get a pretty big overshoot of the intended target - maybe some of the physics settings need to be different in order to have a more responsive torque behaviour? Or is it just unavoidable when using the physics behaviour to have objects swing all over the place when torque is applied?

  • One more little addition here... I've been trying to figure out a method of having a mouselook/turret type of behaviour using physics, where the 'ship' rotates to look at the mouse pointer. I've managed to implement this, using the Angle command to find the correct angle to turn towards, by applying torque... however, the torque overshoots and then constantly 'bobs' the ship back and forth in a swinging motion, never settling on the point it should be aiming at. This obviously makes the control a bit unpredictable.

    What I need is a way to slow the rotation down as it approaches the correct angle, so that it stabilises on the angle that points to the mouse pointer. I've looked everywhere all night and everything I have tried to implement has failed... there are some helpful things on the net but they all revolve around normalizing angles using pi - I'm not sure if Construct has defined constants, or the ability to define them? Or if a global float would have sufficient accuracy, etc etc...

    This was the most useful reference I found http://stackoverflow.com/questions/2617476/physics-game-programming-box2d-orientating-a-turret-like-object-using-torques

    I'm off to London til Thursday so I can't carry on working on this, but any ideas would be appreciated so I can get cracking when I return

  • Ah I wasn't aware of that, that's made things a lot easier

    It looks much more readable now, cheers again for the help

  • I managed to piece something together using some things I learned browsing the forum, seems the physics behaviour route might be more ideal anyways since the collisions are already handled much better that I could probably implement them

    http://www.mediafire.com/file/o1zvm0muyjb/Ast_Physics_1.cap

    Any ways to improve this? The torque/rotation doesn't use DeltaTime, I'm not sure about that :S

    I don't know, something feels a tad bit jagged and unnatural about the thrust, what do people think?

  • Actually the 200 and 100 are linear and angular acceleration, not speeds.

    Yup haha I figured it out after I'd made the post, sorry for that

    Thanks for the additional help, it works quite nicely

  • I was looking for a way to implement this explanation but I never could get my head round C++ code examples having really understood OO programming :S

    http://www.gamedev.net/community/forums/topic.asp?topic_id=183827

  • Absolute genius, thanks mr. hound

    I love it, it's got a great feel to it, I've just added some additional private variables 'ThrustSpeed' and 'RotationSpeed' and adjusted the events so that the numbers 100 and 200 should be easier to play around with. Any idea how I could get the rotation to decelerate when the left/right arrow isn't being pressed? It'd be good to be able to prevent the ship spinning out of control so easily

  • Hey everyone. I've been looking everywhere for tutorials and they seem rare, even for code, never mind construct!

    I'm looking to prototype a simple space shooter type movement, something like Asteroids, Thrust etc. I've gotten a basic setup done with custom movement, and I think I understand how that particular object works... but I'm trying to implement the correct physics, using events and avoiding using many of the built in behaviours. This is only because I prefer to know what's going on and don't like the idea of something changing in another version and breaking everything

    So I suppose what I'm stuck on is how to implement the movement of a single sprite... I want to use vectors maths but I'm unsure what the correct way to implement them would be. I assume you should set up separate private variables like XPostion, YPosition, Angle... is there any advantage to making a few vector functions (dot product, cross product etc) or can Construct do all this anyway? (I've not been through every single event yet so I might be mistaken)...

    Also I'm a bit confused about the way angles are implemented, with 0 being right rather than up like I was used to. Will this cause problems when calculating rotations and inertia and all that? Furthermore it all has to work with delta time, have acceleration/deceleration for rotation as well as the same for movement itself.

    Any ideas would be helpful, it's been a while since I've looked at any maths in detail

    Cheers

  • Thanks for the help Minor, glad to know it's possible

    I think I've found the tutorial, I'll put the link here for anyone who might want the same info

    http://www.scirra.com/forum/viewtopic.php?f=8&t=4328

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I was wondering just how moddable you could make a Construct game. Couldn't find much info on this topic - I was curious how much work it'd take to do do the following:

    1. Store levels as external data files and load them at runtime - more than likely just simple tile based maps, setting all the relevant Construct properties that way. Is it even possible?

    2. More importantly, would it be possible to do something like in a space shooter, store different ships as data/graphics files (let's say you could have speed, acceleration, armour etc etc) then load different ones at runtime, add new ones when required rather than 'hard-coding' (for lack of a better term) directly in Construct?

    Cheers

  • Good evening, esteemed members of the board!

    I've been lurking around here for the last few days reading up on allsorts and thought it'd be a good idea to join and become absorbed in the warm, glowing light of the Construct community

    So where to start... well I'm 23, a student (but I did have a full time job for two and a half years before going to uni, so that should count for something!) and I suppose I've always been a bit of a game lover, as well as a creative type. So naturally, upon reading a little programming article in a 1995 issue of PC format, I became consumed by the idea that I could make games myself. This was taking into account the fact that I was about 9, and I'd previously found some kindof BASIC for the Atari ST a few years earlier and thought that by typing a detailed description of a game idea in English, it would magically make a game for me.

    Anyways, this article compared the usuals - C++, VB, Delphi etc etc... and Klik n Play got a mention at the end. There was a full page ad for it in there too, and the words 'NO PROGRAMMING KNOWLEDGE REQUIRED!' really stand out to a child... it wasn't until a few years later ('98, '99) that I actually got KnP and started knocking together little games to try and outdo one of my friends. A year or two later, I got onto DarkBASIC... and later DarkBASIC Pro, eventually moving onto PureBASIC and iBASIC, in which I started to make an OpenGL based hardware-accelerated 2d engine... I think it got to the point of having a TGA loader and a revolving MegaMan flying across the screen before that project got buried. A couple of years back I had a go at using Haaf's Game Engine with PureBASIC to make something but again lost interest...

    For a while after, I didn't touch programming and it seems that all the ideas I've had swimming round in my head would never come to fruition. After playing little games like Knytt, I've liked the idea of using something simple to create a simple little game, or maybe a few, that I wouldn't lose interest in so much. I've had a go at Game Maker, but got annoyed at the apparent complexity of some things and even more by the fact that I'd have to pay a second time to get access to the newest version. I looked into MMF2 this week and it seems great, it's just a long time since I've used the KnP style events system and still find myself thinking about variables and code when I'm trying to figure things out Plus it's also missing that hardware accelerated edge that makes 2d games really shine these days!

    I heard Construct mentioned in a discussion on the Nifflas forum (the guy who made Knytt) who was thinking of moving to something else from MMF2. Drawn in by the cool DX effects and open sourceyness, here I am, pondering what I might start making

    So yeah, that's pretty much it... I wouldn't call myself a coder, I can do basic stuff but never really got to any decent level with it, I can draw/get arty quite well, and because I'm a sound & video technology student I do an awful lot of professional-level video/sound/music work as part of my course. So any questions about any of that jazz, drop me a PM or something, but I'm looking forward to getting stuck into Construct, sorry for the near-life story, and hello everyone