How to make a Sine wave?


#1

By the way, I’ll edit this when I have a new problem instead of multiple topics.


How do I use this
#2

I made a “Sine Wave Generator” a while ago, although I don’t think that it might work as you want to. If you still want to check it out, here is a link:


And if you want to give credit, do it, but it’s fine if you don’t (at least for this project).


#3

I want a regular sine wave.


#4

Okay. I’d suggest talking to someone who knows a lot about sine and cosine, including @ThinBuffalo and @KVJ.


#5

Heyyyyyy


#6

One example that I can think of

When game starts
    Set position to x(0) y(height) #not actually needed necessarily
    Repeat (1024 or whatever)
       Set position to x([object's x position value] + 1) y(sin(object's x position))

#7

thank im gonna plug in meh ipad and chekk


#8

that’s my name alright


#9

It workeD


#10

Good :slight_smile:


#11

Should I link it?


#12

Of course it did. You were using code from the CoSine master.


#13

If you want ¯\⌒(ツ)⌒/¯


#14

Omg where’s @dmf we haven’t spoken in agesssss


#15

I think he left :frowning: :cry::pensive::pensive:


#16

WHat?‽???


#17

THE COSINE MASTER?! DID I JUST DO COSINE WAVE?! Haha just kidding, it mentioned sine in the code LOL. I just mess with Sin/Cos and values. One thing I noticeably learned was to tilt one of my backgrounds (RGB and HSB I think) At the Brightness/Blue I had to use its y position or x position.