generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Points between 2 frames

Previous Thread :: Next Thread 
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
03 Jan 2017 04:47 PM
https://www.roblox.com/games/599805651/DrawTest

I'm just messing with guis again and I was wondering how to get the positions between 2 frames.

If you play the game and move your mouse really quick, it will "skip" a pixels.

My solution was to compare the old points vs the new point and see if they are "x" distance away, thus creating frames in between.

How exactly do I achieve this?


Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
03 Jan 2017 04:48 PM
Please don't mind the grammatical errors. I haven't slept in days.


Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
03 Jan 2017 04:54 PM
You are looking for Bresenham's line algorithm or Xiaolin Wu's line algorithm depending on how in depth you want to make your DrawingTest.

Never be afraid to rip other people's work and not re-invent in the wheel. I would search for lua interpretations of these respected algorithms and figure out how to apply it to the creation of frames.
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
03 Jan 2017 05:41 PM
Thanks kools (:


Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
03 Jan 2017 06:54 PM
I suppose it's something like magnitude.
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
03 Jan 2017 07:02 PM
HalfPinky

I just did an easy solution using recursive functions.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image