Jump to content

Oddly

Ascending Contributor
  • Posts

    484
  • Joined

  • Last visited

  • Days Won

    36

Oddly last won the day on February 11 2022

Oddly had the most liked content!

7 Followers

About Oddly

  • Birthday 01/02/1995

Contact Methods

  • Website URL
    https://www.github.com/DylanDodds

Profile Information

  • Gender
    Male
  • Location
    Orange Park, Florida
  • Interests
    Shoving kittens in a blender and listening to the scream for sweet mercy.

Profile Fields

  • My Project
    Machine Learning

Recent Profile Visitors

252,213 profile views
  1. EkLeps Erangez,
    Mayking ur ambishins pawsibul

  2. JOOSE! TODAY YOU WILL DRINK JOOSE! ORANGE JOOSE APLE JOOSE PINAPLE! NO MORE WATER ONLY JOOSE!

    1. Show previous comments  1 more
    2. Oddly

      Oddly

      The one and only, dear friend.

    3. General Awesome

      General Awesome

      @Oddly damn man it's been forever. you got discord?

    4. Oddly

      Oddly

      OddlyDoddly#2354 wassup pony

  3. Drink water you dehydrated bean.

    1. gooby

      gooby

      ok ill drink bean water

    2. Oddly

      Oddly

      chickpea water is my favorite. boil chickpeas.drink the forbidden bean juice.

    3. gooby

      gooby

      f o r b i d d e n   b e a n

       

  4. SOME BAWDY ONCE TOLD ME...

    1. Show previous comments  3 more
    2. Oddly

      Oddly

      WITH ER FINGER AN ER THUMB

    3. Arufonsu

      Arufonsu

      IN THA SHAIP OF AN "L"

    4. Oddly

      Oddly

      ON ER 4 HED

  5. I actually think this is a cool idea. I always felt like in a way intersect could benefit from using a "public server list" type of model, where a game's contents could be downloaded simply by selecting a game.
  6. I gotta learn it anyway, so ill make a tutorial when I wrap my head around that. Typically you learn linear algebra before non-linear because straight lines are easier to visual.
  7. A curved line is not going to use a linear function. I believe what you're looking for for curves is Hyperbolic Interpolation. Curved lines are non-linear, which will have a much different function. Probably something that involves log or exponential functions. I'd have to sit down and try to figure out how to interpolate on a curved line to answer this. I might give it a shot this weekend. If I have the time.
  8. Making this guide for @Damian666 but, honestly, it's a pretty important thing to know in game dev, so today I'll be explaining Linear Interpolation. So first off, What is Linear Interpolation? Linear Interpolation (Lerp for short in game dev lingo) is the process of finding any point on a given line, given any value of X. A question that may be in the form of solving for Linear Interpolation may look something like. "Given the line (A, B), what is the value of Y at X on that line?" It's important to remember, when we say "LINEAR" interpolation, or "LINEAR" algebra, we're talking about working on straight lines. So that's just a tip for anything dealing with linear mathematics, is they all deal with straight lines. (finding Y at X on a straight line is linear interpolation). Linear means "Straight Line" and "Interpolation" means "the insertion of something of a different nature into something else." So when you are doing "Linear Interpolation" You are Linearly inserting a new point between 2 points. Linear Interpolation is inserting a new point between 2 points on a straight line. Solving for Y at X is doing Linear Interpolation. Basically I have a set of X and Y values. They are dependent variables. The value of Y is dependent on the value of X. So, If I have a table as so: __X_____Y__ __1__ | __4__ < ---- Point A __2__ | __?__ __3__ | __?__ __4__ | __16__ < ----- Point B When X is 1, Y will be 4 When X is 4, Y will be 16. Linear interpolation is solving for Y at X. If X is 3 in this table, Y is 12. I graphed this table in a graphing calculator. Unfortunately values only went from -10 to 10, so I set Point A=(1, 4) and Point B = (2, 8), but it's the same graph, I just used different points on the same line to draw the graph. Basically when doing linear interpolation, you can solve for any Y value on this line given any X and 2 other points on the same line. That is what Linear Interpolation is for. To find other points on the same line. We need to solve for Y at X=2, and solve for Y when X=3. Which we use the equation of Linear Interpolation to do. The Equation for Linear Interpolation is Where X1, Y1 is the start_point (Point A); X2, Y2 is the end_point (Point B); X is an independent variable; (an argument or parameter) you feed into the function The function solves for Y at X. If you solve for... (X1,Y1) = (1, 4), (X2, Y2) = (4, 16), X =2 Y will equal 8. if you say X is 3, (X1,Y1) = (1, 4), (X2, Y2) = (4, 16), Y will equal 12 To break down the function further... You can imagine the function is sort of generating a ratio. "For each X so amount of Y will be given". That is this part of the function: (y2-y1)/(x2-x1) This ratio is also known as the "Slope" of the line. This part might be more familiar to you from high school math as: (fun fact; In this image the Triangle symbol is called "Delta" and whenever you see it, it usually means "the difference between", you'll see it in programming too. "DeltaTime" means "The difference between 2 times" In this image, Delta X and Delta Y mean "The difference between 2 X's and Y's) We use the start and end point to calculate the slope. The rest of the equation y1+(x-x1) is applying an offset to our new value X. (since our line isn't always at point 0, 0 in our equation, when calculating y we need to account that we're applying an offset. The Function for Linear Interpolation in Python code would look like the following: # Solve for Y at point X given line (x1, y1), (x2, y2) def get_interpolate(start_point, end_point, x): x1, y1 = start_point x2, y2 = end_point y = y1+(x-x1)*((y2-y1)/(x2-x1)) return y In the GIF below, The Red Dots are the start and end points. The red line shows the linear sequence of all values of Y at any Given X between the Start and End Points. And the Blue Dot is the linear interpolate at any specific given X along the red line. (red line = every possible linear interpolate, blue dot = 1 linear interpolate at a time) In this GIF, Each frame I am increasing or decreasing the value of X by 1, and solving for Y using the python function I posted above to get the Y of the blue dot at X. When the blue dot hits the start or end point, I'm multiplying the incrementor by -1 to switch the blue dot's direction. This way you can see how the value of Y changes as X changes. Note: Because I am using pygame, the grid position (0, 0) starts in the upper left hand corner. Values: (X1, Y1) = (2, 3), (X2, Y2) = (15, 15) Alright, and finally, in order to make that gif, I actually used Python and PyGame to program some code that does Linear Interpolation to help you understand it better. Here is the snippet for that code: https://gitlab.com/-/snippets/2252356 Enjoy! P.S. I punched the equation into a graphing calculator for you too... The line you see is not the same thing as I coded, the line is Y at any given X. If you change the x1, y1, x2, y2 variables, the line will move because you're moving your start point and end point. https://www.desmos.com/calculator/jg3pfrrkqa "Lerping" in game design makes use of linear interpolation by calculating how much of a jump a game object needs to be transformed each frame to insure a smooth sliding transition from Point A to Point B in a given frame of time. I.E. How big of steps do I need to take If I want to take 1 evenly spaced step each second, in order to move 30 feet forward in straight line in exactly 30 seconds? That's what Lerping is solving for. You can avoid calculating that average "step size" between point A and B to add each frame to your current position using Linear Interpolation, You can set a game object's position at any point of time by simply calculating where Y should be given X and 2 other points.
  9. Don't, whatever you do.

  10. Whatever, don't you do.

  11. Anyone else carve any sick pumpkins for haloween this year?
  12. Whatever you do,

    don't.

  13. To be fair, database migrations are always difficult. I work similar database implementations at work in C# as they use in intersect, we tried migrations out for a while, I guess the developers before me decided to stop keeping up with it in our api, because we dropped support for automatic migrations. And as far as making copies and backups of databases, Its pretty standard in the industry to have a seperate development database that is a clone of your original. I've worked on projects with 3 different environments, dev, staging, and production. Production is of course the client use, staging is when we need to show of code to the client that is ready to be deployed to production, you can imagine it like a beta, and then dev is to development on.... Oh and I guess we had a QA too which was for our QA department to test our code.
  14. Most linux systems (not all) use systemd to manage services. This can ensure persistence of your server so if it crashes, it will automatically be restarted, you can also use systemd to ensure the service runs under a certain user so the app is limited to certain permissions, and restricted to their own environments within linux. Systemd allows us to manage services as well with console commands like `sudo systemctl stop <service>` `sudo systemctl start <service>` `sudo systemctl restart <service>` `sudo systemctl enable <service>` - ensures if the system restarts, the service is started back up automatically on boot. `sudo systemctl disable <service>` `sudo systemctl status <service>` - check whether a service is successfully started and running Assuming you are using a debian based distribution such as ubuntu, I garuntee your system is likely using systemctl. I use Manjaro linux which is arch based and it uses systemctl too. Here is a link for setting up services using systemd to sort of point you in the right direction. I'm sure you can find a tutorial that suits your distribution best. https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6 Systemd also uses journald for logging, so any errors your service throws will be output into your system's journal. I recommend reading a bit up on how that works and what other capabilities systemd holds
  15. I have found personally reverting database migrations can be a bit of a nasty process. Always back up your DB and have something separate to work on in your development environment. If something happens to your db in your dev environment, you can manually delete the migration file (if I remember right its a generated .cs file. The name is auto generated I believe). If you mess up a database during a migration, just delete it and revert back to your backup copy, fix the mistakes you made, and rerun the migrations in your backed up database. The databases are the .db files in your resource directory on your server. Never use your production databases in your dev environment. Deleting or damaging your DB files will delete game and player data. If you need game data that is in your production environment, copy your db files over to dev environment. I think intersect supports mysql too, i dunno if you're using it, but if you are setup a development mysql server to work on. The process for backups and recovery with mysql is a bit more of a hassel, and I don't know all the steps to explain it off the top of my head, but there are guides online for it. On actually fixing your issue, you are going to need to go in with an sql browser and edit your database files manually and undo whatever the transactions did manually, and then manually delete your migration. I don't know what you did in your migration so i can't tell you exactly what you need to do to fix it. DON'T FORGET: Make a backup of the already damaged db files in case you damage them some more trying to manually fix it
×
×
  • Create New...