|
theagentd
|
 |
«
Reply #1 - Posted
2012-12-14 23:32:58 » |
|
sin(x)?
|
Myomyomyo.
|
|
|
ra4king
|
 |
«
Reply #2 - Posted
2012-12-14 23:37:36 » |
|
Also they seem to move left and right randomly.....so.....just play around with the Random object? 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
wreed12345
|
 |
«
Reply #3 - Posted
2012-12-14 23:46:06 » |
|
What does sin(x) do, do you have any examples? and i dont need them do be random i just want them to go in curved lines
|
|
|
|
ra4king
|
 |
«
Reply #4 - Posted
2012-12-14 23:46:41 » |
|
Ah you don't know trigonometry? Well that's gonna be a slight problem. :S
|
|
|
|
wreed12345
|
 |
«
Reply #5 - Posted
2012-12-14 23:52:37 » |
|
nope sorry
|
|
|
|
wreed12345
|
 |
«
Reply #6 - Posted
2012-12-15 00:36:31 » |
|
ok so i figured out what sin(x) does but that makes the waves go horizontal, but i need them to be vertical.. any ideas how???
|
|
|
|
theagentd
|
 |
«
Reply #7 - Posted
2012-12-15 00:39:08 » |
|
ok so i figured out what sin(x) does but that makes the waves go horizontal, but i need them to be vertical.. any ideas how???
I think you might have some slight problems creating a game if you can't figure that out yourself... No offence. 
|
Myomyomyo.
|
|
|
|
wreed12345
|
 |
«
Reply #9 - Posted
2012-12-15 04:14:18 » |
|
I know im a real newb with this stuff but could someone make an example? or some pseudo code?
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Jimmt
|
 |
«
Reply #10 - Posted
2012-12-15 04:17:25 » |
|
Dude it's like 2 lines of code, literally If you can't solve small problems like this without giant amounts of help from others then you shouldn't be making games.
|
|
|
|
ra4king
|
 |
«
Reply #11 - Posted
2012-12-15 04:19:00 » |
|
Dude it's like 2 lines of code, literally If you can't solve small problems like this without giant amounts of help from others then you shouldn't be making games.
Not "shouldn't make games" but should learn more before starting to make games.
|
|
|
|
Agro
|
 |
«
Reply #12 - Posted
2012-12-15 04:19:10 » |
|
Something as simple as a wavy line? o.O Its not even as complicated as sin(x). You can just generate a random number from -1 to 1 and add that to the position, or something like that. But that wouldn't be that smooth, so you could use a variation of the "wandering" method. But I think that's too much for you. o.O
|
|
|
|
Joshua Waring
|
 |
«
Reply #13 - Posted
2012-12-15 04:19:56 » |
|
Dude it's like 2 lines of code, literally If you can't solve small problems like this without giant amounts of help from others then you shouldn't be making games.
Not "shouldn't make games" but should learn more before starting to make games. What's what I was going to say, no-one is incapable of making a game, you just have to learn.
|
The world is big, so learn it in small bytes.
|
|
|
wreed12345
|
 |
«
Reply #14 - Posted
2012-12-15 04:21:07 » |
|
guys im sorry for being a newb but im only in middle school lmao
|
|
|
|
Agro
|
 |
«
Reply #15 - Posted
2012-12-15 04:22:13 » |
|
So am I 
|
|
|
|
wreed12345
|
 |
«
Reply #16 - Posted
2012-12-15 04:23:34 » |
|
well i really could use some help... so instead of making fun of my lack of these skills could someone help me out?
|
|
|
|
ra4king
|
 |
«
Reply #17 - Posted
2012-12-15 04:23:41 » |
|
guys im sorry for being a newb but im only in middle school lmao
Then I suggest you not to jump into game making so quickly. Fully learn Java and code design before jumping into this area. Especially if you don't know trig :S However, I shall help this one time: 1
| int value = Math.sin(theta); |
The value returned is between -1 and 1. Just add this to the center of the wave path.
|
|
|
|
Agro
|
 |
«
Reply #18 - Posted
2012-12-15 04:24:55 » |
|
Yeah, trig is going to help you with euclidean distance, 3d cameras, direction vectors, noise functions, and practically anything,
|
|
|
|
Sammidysam
|
 |
«
Reply #19 - Posted
2012-12-15 04:25:23 » |
|
So am I  Me too  I don't know trigonometry either. If I need it somewhere I have friends who could help.
|
|
|
|
wreed12345
|
 |
«
Reply #20 - Posted
2012-12-15 04:26:49 » |
|
But im only trying to make a simple 2d effect here lol nothing 3d yet! im not nearly ready for that
|
|
|
|
Sammidysam
|
 |
«
Reply #21 - Posted
2012-12-15 04:28:09 » |
|
But im only trying to make a simple 2d effect here lol nothing 3d yet! im not nearly ready for that
Where did he say his code related to 3d?
|
|
|
|
ra4king
|
 |
«
Reply #22 - Posted
2012-12-15 04:28:32 » |
|
But im only trying to make a simple 2d effect here lol nothing 3d yet! im not nearly ready for that
Where did he say his code related to 3d? He mentioned 3D cameras 
|
|
|
|
Jimmt
|
 |
«
Reply #23 - Posted
2012-12-15 04:28:55 » |
|
well i really could use some help... so instead of making fun of my lack of these skills could someone help me out?
We are not making fun of your lack of skill...simply advising that you try to solve problems before asking us to solve them for you. Being in middle school is not an excuse, rather it is a privilege to start game programming so young.
|
|
|
|
wreed12345
|
 |
«
Reply #24 - Posted
2012-12-15 04:30:07 » |
|
I did try and solve this problem...but with my research and no knowledge of trig I had no clue you could do this
|
|
|
|
wreed12345
|
 |
«
Reply #25 - Posted
2012-12-15 04:31:14 » |
|
Thank you very much! i truly appreciate the help.. I must soon learn all the trig in the world!
|
|
|
|
Joshua Waring
|
 |
«
Reply #26 - Posted
2012-12-15 04:33:44 » |
|
Personally I believe it's best to start young, it allows the brain to adapt and grow in a way, specialise at a deeper level. It's also nice for trying to get a job "programming since 12"  you can also use graph.tk to see how your equations will look.
|
The world is big, so learn it in small bytes.
|
|
|
ra4king
|
 |
«
Reply #27 - Posted
2012-12-15 04:49:25 » |
|
Thank you very much! i truly appreciate the help.. I must soon learn all the trig in the world!
I'm assuming you saw my edit with the code and explanation? In anyway, I understand your frustration. You just want to get things done without painstakingly reading through lots of explanations. You want to get things done[tm]. However, that's not the right way to learn things and use them properly in the future. Hopefully you get a small glimpse of what you can do with sin(theta) and hopefully you keep learning more maths because math is just awesome 
|
|
|
|
Best Username Ever
|
 |
«
Reply #28 - Posted
2012-12-15 05:03:02 » |
|
Kids these days. Back when I learned to program we didn't have internets.
Dude it's like 2 lines of code, literally If you can't solve small problems like this without giant amounts of help from others then you shouldn't be making games.
Not "shouldn't make games" but should learn more before starting to make games. Or, failing that, join StackOverflow. 
hopefully you keep learning more maths because math is just awesome  Yes
|
|
|
|
ra4king
|
 |
«
Reply #29 - Posted
2012-12-15 05:58:37 » |
|
Ok masteryoom. It's time to talk. With all due respect, please refrain from using all these oversized texts and obnoxious colors.
Let's act like adults here, please. We can get silly sometimes, but properly and at the right time.
Note: this is not meant to be offensive. I am simply tired of seeing you post with HUGE font random comments that add nothing to the conversation. Let's maintain a high signal to noise ratio on these boards.
|
|
|
|
|