RE: Simple VB.Net 2D Game Engine 12-24-2012, 02:41 PM
#11
I created this project the easiest way possible. So yea its pretty buggy.
[username], need some help?, PM me.
![[Image: kjKks6Y.png]](http://i.imgur.com/kjKks6Y.png)
![[Image: kjKks6Y.png]](http://i.imgur.com/kjKks6Y.png)
Simple VB.Net 2D Game Engine filter_list | |
(12-24-2012, 01:02 AM)DaPaus Wrote: I will chek that out! But the problem is, next year I am probably changing schools and I will go study something computer related. But in every school they teach VB.net as Programming languages. So I'm a bit scared to start with C++ because if I learn 2 languages at the same time I'm probably going to mix them up.
(04-29-2013, 05:10 AM)Falgantil Wrote:(12-24-2012, 01:02 AM)DaPaus Wrote: I will chek that out! But the problem is, next year I am probably changing schools and I will go study something computer related. But in every school they teach VB.net as Programming languages. So I'm a bit scared to start with C++ because if I learn 2 languages at the same time I'm probably going to mix them up.
If you ask me, I deffinetly recommend C++ for game development. C# is more for business, seeing that it runs better than C++ when used for server applications (or any type of program that runs for a VERY long time). I don't understand why anyone would program in Visual Basic, other than the fact that it is a different language, so some might like the API. But suit yourself.
Like I said, C++ for games, C# for long-running programs, Visual Basic for developers who simply wants Visual Basic for whatever reason ^^
~ Falgantil ~
Quote:other than the fact that it is a different language, so some might like the API
Quote:Like I said, C++ for games, C# for long-running programs, Visual Basic for developers who simply wants Visual Basic for whatever reason ^^
(04-29-2013, 05:10 AM)Falgantil Wrote:(12-24-2012, 01:02 AM)DaPaus Wrote: I will chek that out! But the problem is, next year I am probably changing schools and I will go study something computer related. But in every school they teach VB.net as Programming languages. So I'm a bit scared to start with C++ because if I learn 2 languages at the same time I'm probably going to mix them up.
If you ask me, I deffinetly recommend C++ for game development. C# is more for business, seeing that it runs better than C++ when used for server applications (or any type of program that runs for a VERY long time). I don't understand why anyone would program in Visual Basic, other than the fact that it is a different language, so some might like the API. But suit yourself.
Like I said, C++ for games, C# for long-running programs, Visual Basic for developers who simply wants Visual Basic for whatever reason ^^
~ Falgantil ~
(04-29-2013, 08:48 AM)ArkPhaze Wrote:Quote:other than the fact that it is a different language, so some might like the API
Hmm..? You can call API functions in many other languages too, but what API are you talking about here? .NET is a framework.
(04-29-2013, 08:48 AM)ArkPhaze Wrote:Quote:Like I said, C++ for games, C# for long-running programs, Visual Basic for developers who simply wants Visual Basic for whatever reason ^^
VB.net is virtually the same as C#. C++ for games though and C# for "long-running programs"?? :S Why is that?
(04-29-2013, 12:32 PM)Deque Wrote:(04-29-2013, 08:48 AM)ArkPhaze Wrote:Quote:Like I said, C++ for games, C# for long-running programs, Visual Basic for developers who simply wants Visual Basic for whatever reason ^^
VB.net is virtually the same as C#. C++ for games though and C# for "long-running programs"?? :S Why is that?
I second that question.
Quote:A very simple test is, try making a loop, writing "Hello there HackCommunity", say 1.000.000 times or so, in both languages. Start them at the same time and see what finishes first.
Unless something has changes drastically since last time I checked, it should be the C# code that finishes first.
(05-01-2013, 05:15 AM)ArkPhaze Wrote:Quote:A very simple test is, try making a loop, writing "Hello there HackCommunity", say 1.000.000 times or so, in both languages. Start them at the same time and see what finishes first.
Unless something has changes drastically since last time I checked, it should be the C# code that finishes first.
That is so far off from being true... I love C#, but C/C++ is definitely faster, and I will never admit that that C# is better than any other language either; being a fanboy of a programming language gets you into trouble. I would rather keep an open mind.
if you recall what I said before C# and VB.NET go through something called JIT compilation at runtime. the CLR manually babysits the program at runtime, and is responsible for exception handling, memory management, and many other things. C/C++ is much faster for this reason, unless you're doing something really wrong, or your benchmark tests are really really screwed up. For that reason, C/C++ programs use less memory than .NET programs (unless you are a bad programmer and you do not properly manage memory in your C/C++ applications. That's called memory leaks though).
I really don't understand your server, vs games reference though...
(05-01-2013, 09:20 AM)Falgantil Wrote:(05-01-2013, 05:15 AM)ArkPhaze Wrote:Quote:A very simple test is, try making a loop, writing "Hello there HackCommunity", say 1.000.000 times or so, in both languages. Start them at the same time and see what finishes first.
Unless something has changes drastically since last time I checked, it should be the C# code that finishes first.
That is so far off from being true... I love C#, but C/C++ is definitely faster, and I will never admit that that C# is better than any other language either; being a fanboy of a programming language gets you into trouble. I would rather keep an open mind.
if you recall what I said before C# and VB.NET go through something called JIT compilation at runtime. the CLR manually babysits the program at runtime, and is responsible for exception handling, memory management, and many other things. C/C++ is much faster for this reason, unless you're doing something really wrong, or your benchmark tests are really really screwed up. For that reason, C/C++ programs use less memory than .NET programs (unless you are a bad programmer and you do not properly manage memory in your C/C++ applications. That's called memory leaks though).
I really don't understand your server, vs games reference though...
If what you're saying is really true, then explain to me how a C++ program writing Hello World 100000 times, and a C# doing the same, that C# finished after about 4 seconds, and the C++ finished after 17 seconds.
Might differ on computers of course. But the statement remains true, that C# is faster than C++ at executing the same code over and over. Which in most cases are just servers doing that
~ Falgantil ~
Quote:There is no strict reason why a bytecode based language like C# or Java that has a JIT cannot be as fast as C++ code. However C++ code used to be significantly faster for a long time, and also today still is in many cases. This is mainly due to the more advanced JIT optimizations being complicated to implement, and the really cool ones are only arriving just now.
So C++ is faster, in many cases. But this is only part of the answer. The cases where C++ is actually faster, are highly optimized programs, where expert programmers thoroughly optimized the hell out of the code. This is not only very time consuming (and thus expensive), but also commonly leads to errors due to over-optimizations.
On the other hand, code in interpreted languages gets faster in later versions of the runtime (.NET CLR or Java VM), without you doing anything. And there are a lot of useful optimizations JIT compilers can do that are simply impossible in languages with pointers. Also, some argue that garbage collection should generally be as fast or faster as manual memory management, and in many cases it is. You can generally implement and achieve all of this in C++ or C, but it's going to be much more complicated and error prone.
As Donald Knuth said, "premature optimization is the root of all evil". If you really know for sure that your application will mostly consist of very performance critical arithmetic, and that it will be the bottleneck, and it's certainly going to be faster in C++, and you're sure that C++ won't conflict with your other requirements, go for C++. In any other case, concentrate on first implementing your application correctly in whatever language suits you best, then find performance bottlenecks if it runs too slow, and then think about how to optimize the code. In the worst case, you might need to call out to C code through a foreign function interface, so you'll still have the ability to write critical parts in lower level language.
Keep in mind that it's relatively easy to optimize a correct program, but much harder to correct an optimized program.
Giving actual percentages of speed advantages is impossible, it largely depends on your code. In many cases, the programming language implementation isn't even the bottleneck. Take the benchmarks at http://shootout.alioth.debian.org/ with a great deal of scepticism, as these largely test arithmetic code, which is most likely not similar to your code at all.