Author Topic: General Programming Megathread - New OP  (Read 29625 times)


Does anyone have any idea what was going on with that spiral program? I feel like the center of the spiral keeps on moving, but that doesn't make sense.

It depends on what you're doing to generate the spiral. I'd do something like this:

double x, y, scale;
for(double ang = 0; ang < 3.14159 * 15; ang+= (3.14159/50)+0.002) //0.002 is offset so it's not just circles
{
   x = sin(ang);
   y = cos(ang);
   scale = ang * (10/3.14159);
   plot(x*scale, y*scale);
}
« Last Edit: November 21, 2012, 01:54:42 PM by Trinick »

Oh. I haven't learned sine and cosine yet, so I was trying to make do without it.
I had one line that was basically using a^2 + b^2 = c^2 simplified for b, but multiplying by a variable called amount that was either +1 or -1 for calculating one via the other, then using increments based off of some weird ratio with y. That looks a lot more logical than what I ended up doing.

it's sort of hard to do anything involving circles without sine and cosine

it's sort of hard to do anything involving circles without sine and cosine
Yeah I got that

why can't i find any coding tutorials targeted at coders

i mean, i don't want to learn what a goddamned for loop is
i want to learn the differences between programming language x and language y
i feel as if i could fast-track learning new languages if i had that

if anyone knows of ones like that for java or c, c++, c#

preferably java


and if anyone could tell me what i would query google for to get those kinds of tutorials, that'd be great too
« Last Edit: November 22, 2012, 04:47:13 PM by Lugnut »

why can't i find any coding tutorials targeted at coders

i mean, i don't want to learn what a goddamned for loop is
i want to learn the differences between programming language x and language y
i feel as if i could fast-track learning new languages if i had that

if anyone knows of ones like that for java or c, c++, c#

preferably java


and if anyone could tell me what i would query google for to get those kinds of tutorials, that'd be great too
I'm not aware of any other languages that has something like this, but I know that Scala has a couple of "Scala from X" tutorials (although they've done a very good job at making it virtually impossible to find).

lugnut, for loops are easy as stuff and really helpful. I can show you if you'd like.
lolwhoops

does anyone know how the forget people code their own game engines?
I want to make an actual professional game like super meat boy
right now I'm bogged down with the horrendous confines of GML (gamemaker language)
anyone have tips?
also, I'm decent at C++, I'm not new or anything
« Last Edit: November 22, 2012, 05:38:26 PM by Daedalus »

lugnut, for loops are easy as stuff and really helpful. I can show you if you'd like.
LOL. I know you misunderstood his post, but that was loving hilarious. Reread his post, he was saying he doesn't need to know what they are and getting mad at tutorials for explaining them.

does anyone know how the forget people code their own game engines?
..
anyone have tips?
My tip is don't make a game engine. They take a RIDICULOUS amount of work, and unless you know matrix math like the back of your loving hand you are gonna be forgeted.

LOL. I know you misunderstood his post, but that was loving hilarious. Reread his post, he was saying he doesn't need to know what they are and getting mad at tutorials for explaining them.
oh god
oh god
well, I forgeted up
but my question still stands

see my above post. was a quality ninja.

a+ ninja 10/10 would read again
so don't, then? hm.
then I have two questions.
1. what should I know proficiently before I code an engine later on?
2. what are good 2d engines to use until then?

why can't i find any coding tutorials targeted at coders

Coding tutorials for coders are existing pieces of code. Don't go into a new language wanting to just "learn the language," go into it with a project in mind that you've made in another language. Want to make an IRC bot in Java if you've already made one in Torque (for example)? You know the required elements (receive loop, callbacks, etc) and IRC protocol already from your work in Torque, so if you search for existing IRC bot code in Java, you'll be able to make the connections between the languages yourself. Plus, connections you are making yourself are much more meaningful to you as a learner, since they stem from your own understanding, rather than someone else's.

1. what should I know proficiently before I code an engine later on?
Math. Lots, and lots of math. I'll have Trigun come spit a list at you, he's made a game engine before.

2. what are good 2d engines to use until then?
Tons. JavaScript + Canvas is my favorite. It's web based, so it'll work on virtually every operating system flawlessly, JavaScript is an insanely powerful (scripting) language, and it's a really good web development opportunity. You'll probably want an engine to help you out, though, because JS+Canvas is just a rendering engine. It's still really easy to code your own logic though, assuming you use things like box collision.