Falco&Victory
Smash Champion
recursion is weird.... it's like when you create a functions definition and then use that definition to create more definitions in the same function
i don't use it that much
i don't use it that much
Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!
You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!
Yeah, website programming is really boring, but really useful. I prefer to program systems rather than web sites.Velox: yes, website programming is boring. That's why I'm not a professional programmer despite the degree (I'm going to be a teacher). I only code stuff that interests me -- like running tournaments, for example, and getting the results online. Hence the site.
No way that seems extremely hard. If you have done one you can sell it at a company for a lot of bucks!lol I like creating programs that translate one language into another, though it's REALLY hard(unless i'm converting stuff to HTML or VB lol)
kind of like calling the same function while in that function.recursion is weird.... it's like when you create a functions definition and then use that definition to create more definitions in the same function
i don't use it that much
public int fun(int n){
if (n == 1)
return 1;
return n *[B] fun(n-1)[/B]; // <--- here's where it calls itself
}
thats good to know. i now have something to tell my professors, lolI'm a Computer Scientist. I can pretty much code in any language.
PS: Recursion is cool and all, but in industry it isn't often used. In fact, for both internship's I've had, the use of recursion was specifically forbidden (except is extreme circumstances). It's because it's inherently more confusing than iteration. And code readability and maintainability is more important than efficiency.
Usually recursion is best used for traversing things, such as a search engine bot recursively searching through web pages or a program that recursively searches through all directories and such. Some logic problems (like 8 queens, sudoku) are also often done recursively.PS: Recursion is cool and all, but in industry it isn't often used. In fact, for both internship's I've had, the use of recursion was specifically forbidden (except is extreme circumstances). It's because it's inherently more confusing than iteration. And code readability and maintainability is more important than efficiency.
There's no such thing as recursion at the machine level. Recursion is just an abstraction used by high level languages. Recursion is just an illusion.Yeah, we know. We weren't saying you were wrong, AltF4. We were just pointing out that recursion is mad useful for a lot of stuff.
And while you can turn any recursion into iteration, I would definitely say that doing so does not always make it easier to understand. It can, of course. But it's not like it's impossible to wrap your mind around recursion. I guess I think that rule at your workplace is kinda silly, AltF4.
For example, I can think of about 20 perfect uses for recursion in an FPS game, most dealing with the graphics and AI. I would be very surprised if they used iteration instead for some of these things because speed is so important for game engines.
But you know, compilers are getting to the point where they can see what you're doing and optimize it to the point that there is very little performance difference between iteration and recursion. Compiler design has got to be one of the coolest things ever, by the way.
C# is very very very similar to C++. you should have no problem with the switch, except for little quirks here and there.can anyone tell me how similar C# is to either C++ or java?
ok cool... thanks for the infoC# is very very very similar to C++. you should have no problem with the switch, except for little quirks here and there.
java is very similar in theory but objects are named differently, there are different guidelines, etc. not too far off though as well.
Ooooh.... Now I'm interested, Falco.Game engine is under way
I'm having a class about Data Base Management, I can assure you that Google does an extremely (i mean EXTREMELY) hard-to-implement-or-understand way of searching. My professor told us that any kind of search engine must implement recursion, and they do actually.It just depends on where you go and what you do. If you work for a place like Google, or some other company that does a lot of theoretical work, you likely will be using recursion. But it's safe to say the majority (dare I say vast majority) doesn't use it.
It's a way to have less lines on the code, but it makes an illusion of unlimited functions while you're stating only one.There's no such thing as recursion at the machine level. Recursion is just an abstraction used by high level languages. Recursion is just an illusion.
I'll try to make it clear: C# is a lot similar to C++, but the difference is obvious. C# give support to Objects? Yes, but C++ have more deep support. C++ is an updated version of C#, expanding the object capability.can anyone tell me how similar C# is to either C++ or java?
Long time ago I made the pong game introducing those lines. It was my first game... ah! memories.C# is amazingly beautiful.
...you can override Control.IsInputKey() to return true for Keys.Left or Keys.Right. Something like
protected override bool IsInputKey(Keys k) { return k == Keys.Left || k == Keys.Right || base.IsInputKey(k); }
This will forward messages for those keys to your KeyDown/Up event instead of being consumed by Windows Forms.
Yeah! That's what I'm trying to say... C++ is fully OO, but you can do things without using a single object, something that Java don't (it won't even let you start a main if it isn't inside an object). That's what I mean.Sure you can mess around with virtual function tables in C++ and other goofy stuff like that, but you never (?) *need* to.
well here's a sc, but in spirit of title I had to substitute in a fake char sprite and BGOoooh.... Now I'm interested, Falco.
Some kind of 2d game engine? Could you tell us a little bit more?
You're using C#? that's awesome. It's one of the most (if not the most) appropriated languages for gaming.i am using C#, starting from scratch.
lol, everyone learns languages attempting something new. I hope your game finish well.This is pretty much how I learn new programming languages, by attempting things i can't do lol