crashdemons Posted May 11, 2008 Share Posted May 11, 2008 (edited) A little something I just whipped up.+ What is a 2D Launcher?It's a program I made that calculates and visually launches an image into the 'air' , accounting for the object's initial force, initial altitude, mass, and the initial force's angle - and, of course, gravity.+ If you're not into math, then you can enjoy this a little by just punching in values to see the object arc or free-fall within the window. (note: the object is not FORCED to stay inside the window - that is up to the user's values; However, if it goes outside the window, the window will be moved to show the continuation of the object.)+ How does it do it?I use some general functions used in calculating falling objects and object launching in the included Phys.au3 to calculate all of the needed values.+ Why bother?The 2D launcher just makes an example of the functions used in Phys.au3, which might be useful to new (or old?) programmers looking towards using these types of equations.NOTES:-Also, the object isn't supposed to continually accelerate just because the image of a rocket is used - the initial velocity is determined by the "Force" value entered.UPDATES:Example.au3 now uses GDIPlus to draw the rocket image.ZIP Attached - Contents:example.au3 - the 2D Launcher example script.Phys.au3 - the required physics function libraryr_90.jpg - small rocket image for pointing straight upPhysExample.zip5-5-13 Edit: Fixed posted images Edited May 6, 2013 by crashdemons My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
dixo Posted May 11, 2008 Share Posted May 11, 2008 nice work mate ;D ---------------------------------------------------------------------------------------------------------------->>>>>>| |My scripts: |Warcraft lll auto login -- an auto login to warcraft lll ;) |Wow auto login -- an auto login to wow ;) | |---------------------------------------------------------------------------------------------------------------->>>>>>| Link to comment Share on other sites More sharing options...
crashdemons Posted May 11, 2008 Author Share Posted May 11, 2008 A little something I just whipped up.Updated the ZIP with newer versions of Phys.au3 and example.au3Changes in Phys.au3:I found some faster ways to rewrite parts of Phys.au3 and fixed some bugs concerning large Force values paired with angles over 180 that resulted in the wrong "X max" values - this issue has been resolved.Changes in the example script:"X Max" is now, more correctly, labeled "X End" now (as it's the X-Intercept that the program stops on.)I have also add a "G-Force" input which allows you to multiply a number against the acceleration from gravity. My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
ACS Posted May 11, 2008 Share Posted May 11, 2008 Pretty cool! Although I found a minor bug: if you abort the launch, the rocket ship ends up in the final position. If you abort the launch, the ship should go back to the start, or better yet, drop straight down from wherever it is in the air. Link to comment Share on other sites More sharing options...
crashdemons Posted May 11, 2008 Author Share Posted May 11, 2008 (edited) Pretty cool!Although I found a minor bugnot really a bug - I chose to display the last position because it was more efficient to script and was possibly the most important point along the arc. (with exception to highest point (X End/2, Y Max) and the starting point (0,0))However, since I added the "X End" and "Y Max" outputs (you can deduce the landing point from (X End,0)), I probably could update to just make the rocket explode in mid-air.EDIT:Updated the script - The rocket now explodes in mid-air when aborted.- Added two checkboxes to toggle if X or Y movement is shown visually(Note: if you uncheck both X and Y, you'll basically be camera-locked to the rocket - you'll see it turn, but not move) Edited May 11, 2008 by crashdemons My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
XxXFaNtA Posted May 11, 2008 Share Posted May 11, 2008 And in the next update use GDI+ to rotate the Rocket correctly looks better then /[center][/center] Link to comment Share on other sites More sharing options...
crashdemons Posted August 3, 2008 Author Share Posted August 3, 2008 And in the next update use GDI+ to rotate the Rocket correctly looks better then You just got your wish, the example now uses GDIPlus.It flashes a sometimes but not alot here, I tried to cut down on some of it.if there are any issues with this new edit, let me know. My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
BillLuvsU Posted August 3, 2008 Share Posted August 3, 2008 This is cool. =] [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
baghenamoth Posted August 3, 2008 Share Posted August 3, 2008 yea very good job ! try launching the chip with this : Mass = 10 Force = 200 Angle = 90 Altitude = 10 G-Force = -3 it seems like and old B&W movie.... Link to comment Share on other sites More sharing options...
Belfigor Posted August 4, 2008 Share Posted August 4, 2008 Interesting thing XD [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] Link to comment Share on other sites More sharing options...
A. Percy Posted August 4, 2008 Share Posted August 4, 2008 nice! Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now