Ask Slashdot: Best Way to Learn C# For Game Programming?
An anonymous reader writes So I, like many people, want to make my own game. Outside of MATLAB, Visual Basic, and LabVIEW I have no real programming experience. I initially started with Ruby, but after doing my homework decided that if I ever wanted to progress to a game that required some power, I would basically need to learn some form of C anyway. Further digging has led me to C#. The other parts of game design and theory I have covered: I have ~8 years of CAD modeling experience including Maya and Blender; I have a semiprofessional sound studio, an idie album on iTunes, and am adept at creating sound effects/music in a wide variety of programs; I'm familiar with the setbacks and frustration involved with game development — I beta tested DotA for 9ish years; I already have my game idea down on paper (RTS), including growth tables, unit types, unit states, story-lines, etc. I've been planning this out for a year or two; I will be doing this on my own time, by myself, and am prepared for it to take a couple years to finish. The reason for listing that stuff out, is that I want people to understand that I know what I'm getting myself in to, and I'm not trying to put out a not-so-subtle "help me make a game for free lol" type of post. With all of that said, where is a good place to start (i.e., recommended books) for learning C# for game programming? I am familiar with object oriented programming, so that's a little bit of help. I'm not necessarily looking for the syntax (that part is just memorization), but more for the methodology involved. If anyone also has any suggestions for other books or information that deal with game development, I would love to hear that too. I know enough to understand that I really don't know anything, but have a good foundation to build on.
You should just start. I'm an "expert" on game programming in C#, and the hardest thing about it is not reading slashdot.
So just do it. Use free tools so you don't spend coin on something until you are sure it's something you'll stick with.
Udemy has 12 courses(https://www.udemy.com/courses/search/?ref=home&q=c%23) up there and they have big sales all the time. If you can get some for $10, it might be worth it.
"I say we take off, nuke the site from orbit. It's the only way to be sure."
I'm not going to argue that C# is faster than C++, but 1000x seems a bit surprising. I'm also not sure why you say that C# requires a desktop OS?
Evolution: love it or leave it
Once you don't hear the noise, you can think. With no internet, you won't be able to cry for help and then have to work through your own problem. Don't worry about reinventing the wheel.
do the unity3d tutorials and mess around with C# in there. you get to use your 3d skills and actually make something whilst you learn
I would say that this AC was either trolling or clueless about software optimization.
Everyone I know that tried it, gave-up on it.
Except for those people who had to target a platform that requires verifiably type-safe CIL that targets the .NET Compact Framework. Xbox Live Indie Games was this way, as was Windows Phone 7. Practically the only language that produces such bytecode is C#, as standard C++ as compiled by C++/CLI is not verifiably type-safe and IronPython requires Emit which isn't part of the Compact Framework.
the C++ code ran on a server instead of a desktop OS like C# requires.
Windows Server is a server operating system whose NT kernel is inspired by the architecture of Digital's VMS. It runs C# in the .NET Framework. FreeBSD is a server operating system. It has a port of Mono, a .NET Framework workalike, called BSD#.
Sounds like you're a shit programmer. You should stick to COBOL.
Warning: this is blatantly self-promotional. It's also a pretty good answer to the question, I think, so hopefully I won't get violently modded down.
It sounds like you're exactly who Jenny Greene and I wrote Head First C# for. I played around with a lot of different ways to teach both C# language and core object oriented programming and computer science concepts, and I found that building games was easily the most satisfying way to do it.
The only way to really learn a language is writing a lot of code, and one of the biggest challenges I had putting the book together was coming up with many different projects. The answer was games: a card games, a turn-based game, arcade games -- it turns out that building a game is a great way to keep readers motivated, especially when they're learning new concepts. I've had a lot of really positive feedback from first-time programmers who found it really satisfying to get through the book, and especially building the final project (a retro Space Invaders game).
You can download a free PDF of the first three chapters of Head First C# from the O'Reilly page and see if you like it.
Building Better Software
Why C#? Develop your game in C++ using OpenGL ES for rendering. Your code will compile as-is for iOS, Android, Windows, OSX, and others. You will only need a couple hundred lines of native code (java for Android, Objective C for iOS, etc) to handle events and pass execution into your C++ code. My game engine runs on all the above platforms and 99.9% of my code is shared across all of them.
Also, these days many, many developers simply use an existing game engine and only bother with the high level code specific to their game. Mundane stuff like the low level rendering, Audio APIs (which unlike OpenGL ES, differ quite a bit from one platform to another), physics, etc, is ground that's been treaded several thousand times nowadays, and most game developers leave that stuff to the experts in the various fields to handle the nitty gritty. Optimization of those routines is usually where the "expert" part comes into play.
I work with a game designer / artist who implements all the high level game stuff in Lua, and my engine takes care of all the aforementioned "boring" stuff, freeing him up to actually develop games, and not worry about crap like polygon tessellation algorithms and tons of other very boring stuff that would just be a waste of his time.
Better known as 318230.
You start out saying that you have no real programming experience, but at the end say that you feel like you have a good foundation to build on. I think that is a contradiction. Serious game development benefits tremendously from a deep knowledge of computer science, and you are likely to struggle to accomplish much without a solid foundation in programming.
With that said, I suggest you download Unity3D and play around with it. You can do a lot purely visually, and knock yourself out with as much C# scripting as you feel like doing. In my opinion, it's both a low barrier to entry and a great option for you to quickly put together something much more than the OpenGL/DirectX equivalent of Hello World.
Disclosure: I am currently developing a cross platform MonoGame based game written in C#.
I'm pretty sure the reason your payroll calculator written in C# was that slow had nothing to do with the .net framework and everything to do with something you failed to optimize in that version, but did optimize in the original Cobol version. Either that or you were running it on a way slower computer - a "desktop OS" rather than a "server", even though those terms are pretty meaningless and there should not be any reason you would have to run it on a desktop machine? Unless, of course, you're defining "server" as "machine that doesn't run Windows", in which case, that's pretty no-true-scotsman-like. You can make a plenty fast Windows server machine, then run headless, server-like C# programs on it.
Yes, obviously C# programs aren't going to be quite as fast as equivalent c++ programs - you *are* compiling C# code to bytecode and then running it through a virtual machine, so of course it'll be a little slower. But only a little. I doubt you could write a balls-to-the-wall Crysis-like shooter in C#, but I don't imagine there'd be any performance-related reason you couldn't write an RTS in C# and have it run just fine on any machine not so old that its OS wouldn't support the .net framework anyway.
Forget C#. Start with Haskell and get a PHD in category theory and applied mathematics. Then study GHC internals for several years in order to figure out how to make Haskell fast enough for anything non trivial. Only approach game development once you have a solid understanding of GHC internals, endofunctors, lenses, monoids, monads, comonads, cofree, cofree comands, synergistic cold fusion, rankntypes, multi parameter typeclasses, string theory, functional dependencies, synthesized kinetic energy, generalized new type deriving, existential quantification, existential crisis, scoped type variables, GADTs, the space time continuum and have solved the halting problem. Also reimplement the entire standard library because the current one is terrible and horribly inefficient.
Either that or pick up any of the few dozen C++, C# or Python game development books and start reading.
I was in a similar position to you a few years ago. Wanted to code up my dream game and C# was the obvious answer. I knew C and Java at that point, so I ended up learning C# and using XNA. I'd say that it's not a bad choice these days, but Unity3d is easier. MonoGame is a good library that is the spiritual successor of XNA.
The issues of performance are an easy point to gripe about, but honestly I wouldn't worry about it too much. The advantages of a higher-level language offset the performance losses compared to C/C++. If you're going into this as a one man team, you should really focus on optimizing for development time instead of performance. You can optimize your code when you start to need it. Check out /r/gamedev there are a lot of really good people there that can help you with planning this out.
If you want to check out my project, it's at http://spacerambles.com/
you have your game...what's the first thing you're gonna need to program? (I needed a GUI for a project of mine...teaching myself python...started there) Ask google how to accomplish this. You may end up spending time in and around the stack exchange sites...and as each 'challenge' arises, you dig around and find out how to write it yourself, and in the process, slowly teach yourself c# (or any other language for that matter)...the important thing you already have, is familiarity with object oriented programming...the rest is just syntax. You're likely to get better results that way. Also as you spend your time sifting through answers on google, you'll likely come across peoples suggestions for reading or teaching etc...good school sites, sites bent on game creation and language of your choice...
There are three kinds of people in the world. Those that can count, and those that can't.
I just want to make sure you're trolling. You are, right?
C# is typically slightly slower than Java so....
Citation please? In my experience C# is somewhat slower than native code but much faster than Java.
Any insufficiently advanced magic is indistinguishable from technology.
I love C#. I program in it every day. It's plenty fast, and it's a great language.
However, there are two reasons I would suggest looking to another language.
First, the hottest market for gaming right now is mobile. While it's possible to compile C# for iPhone or Android using Xamarin (along with Windows and OS X), it's not exactly a native experience.
Second, C# (like O-C, C++, etc.) is a general programming language -- it's not in any way specific to the domain of game programming. So, while it's *possible* to design complex games in any modern language, you're probably going to spend *way* too much time dealing with silly stuff like tracking graphics resources and animation loops and simulated physics. You'll have a higher chance of success if you use a language and platform that is more game-specific out of the box.
I would suggest looking into Swift -- it'll give you access to the lucrative iOS market, it's C-like, and it has features that are game-specific. Sure, it's a new language it doesn't compile to Android, but by all accounts it looks like a great language with first-class support for gaming, so you can focus less on infrastructure code and more on the game.
Another option would be HTML5. Depending what sort of game you're looking to build, Javascript and HTML5 may be just the ticket, and there are a number of libraries that can abstract away browser differences and assist with the plumbing needed to make a game run.
Might be depreciated but it's tailor made for C#. Go look it up.
For those who seek perfection there can be no rest on this side of the grave.
Considering that he's a beginner: Badly optimized C++ code is slower than well optimized C# code. Or, in another way, if you're new to programming and optimization is the least of your problem (because getting that damn thing to compile and do what it is supposed to do is a much bigger one), it doesn't really matter that much...
One thing has to be said for C#, as much as I am a subscriber to the "If C is Play-Doh, and C++ is Lego - C# is Duplo" philosophy, it does allow to get results fast without having to use a ton of libraries that in the end weigh you down more than C# would.
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
Pick an engine you want to use first, then pick a language to learn that is used by that engine. Very few games now are written purely in a native language with no supporting engine, so pick a modern game engine that will do a lot of the hard, low level work for you. Then, learn the language that is used for interacting with the desired engine. For example, if you wanted to use the Unity engine, then you would basic learn C#. If you wanted to use CryENGINE, then you would learn C++ and Lua scripting. If you wanted to use the Unreal4 engine, then you would learn blueprint visual scripting and C++.
Once you know the engine and language you need to use, then pick up a book, take a course, etc... There are lots of ways to learn a language, but the most important thing is to practice, especially in the environment and engine that you plan to use. Each of the engines have extensive documentation on how to program for their engine and interact with the game assets.
http://gameprogrammingpatterns...
This site takes a subset of the "Gang of Four" patterns and explains how and why to use them in your games.
You'll especially enjoy the command pattern which will be heavily used in an RPGSgame.
Cwm, fjord-bank glyphs vext quiz
The best way is to make games first, then see what language do you need later. Most games do not even need something such as C# and what might seem as " more powerful" can also be seem as "more wasted time doing something more complex than needed".
[Citation needed]
If anything, they should be comparable.
Ok. I'm going to make wild ass guesses here.
1. Your company was using COBOL-based payroll system. FROM WHICH:
a. Your company is not in the business of writing software for sale to others. They're not software engineering experts.
b. Your company's business process changes very slowly. It is not a dynamic working environment. Slow growth, if any, OR
c. Your company's business is highly regulated.
2. Your management is fairly conservative.
3. Management does not know, value or do a particularly good job of using technology to increase productivity and automation.
This kind of environment isn't a preferred opportunity for highly skilled, creative software engineers. Your engineers were likely average or low-average talent. Probability. Not fact. That's OK. Not everyone is a superstar. It doesn't take superstars to get the job done. It just takes work.
People who really understand how to work in COBOL have a set of patterns and ideas about software engineering that is a lot different from .NET were designed to perform well.
the usage patterns in which Java and
I'm not saying that there aren't plenty of engineers who "get" COBOL who also "get" .NET. It's just that gaining expertise in those to skill sets come from divergent experiences.
Finally, it's just not that hard to do things with .NET and Java that make it be slow. They're garbage collected and safety checked. Sometimes that hurts.
So, bottom line, your software engineers probably used C++ to construct a system that was likely structured a lot like the COBOL system was structured. It's safer to do it that way. .NET. .NET and Java are awesome platforms. They have limitations. It's not always clear what they are at first glance.
And likely, some of that structure and a few of the idioms they used within it were killing performance on
The good news is that most of the time, you can get a lot of performance gains for not much work if you just sit down and do it methodically.
Finally:
There's a lot of games out there with core logic and game engine type stuff written in C#. The graphics, IO, Sound systems are the ones that have to perform fast.
When you want to push a lot of bits, code closer to the hardware. When you want to do a lot of complex logic, give yourself some help with higher abstraction.
Good luck.
I'm currently using C++ for developing an RPG, and I would recommend it over C#. I don't know much about C#, butI have coded in it a few small programs. C++ is very well known in game development. I would recommend it and a framework such as SFML or SDL. Once you get more familiar with these, you can move onto learning Directx3D and OpenGL. Learn about Game States (I just learned this the other day and it drastically makes management of game code so much easier), game timing, game loops, Isometric games, sprite-sheets and tiling. The latter two are important for 2D games and since you are building a RTS, It may be essential for you. I know you are not doing a RPG game, but a lot of the material can be used for an RTS. I'm following a book called Programming Role Playing Games in Direct x, it's not for beginners, but it has valuable information on gaming algorithms for Enemy AI, Game States, Game loops, etc. I would recommend checking out Coke and Code ( type that into Google ). I think the same person also released a Youtube RPG tutorial series. 3DBuzz has some tutorials, but some are paid. There C++ one also does a RPG game. SFML Made Easy is another series on Youtube that is really good. It wont be an easy task, just start small, take your time, and don't do too much at once. Start with just getting a character walking around on a screen ( this will require animation frames, so look that up ). Understand the update() and render(), calls in a game loop.
My advice, as a professional game developer, is "don't write code unless you need to."
If you must write C# you should take a look at Unity, but honestly you would be remiss if you overlooked Unreal 4. It is the newest version of the Unreal Engine, and it includes most of the most important features of a game; behavior trees, navigation, user interface, physically-based rendering, animation state machines, multiplayer replication, etc. You can do most of what you want to in Blueprint (a visual scripting language), and if you really need to, you can edit the source code (the license is a full-source license) and make what enhancements you need in C++.
Writing most of this shit from scratch will take you years, just get down to the actual MAKING of the game, and use someone else's engine. The terms are fair ($20/mo, 5% gross revenue for PC platforms and mobile), and the engine is extremely well curated.
C# is typically slightly slower than Java so....
Which means, just as GP AC said, it's completely unsuitable for a "serious" game.
What OP needs to learn is C, or at a minimum C++. Nothing else will fly for this application. Rudimentary games can be done in other languages, but anything that really needs fancy graphics or fast processing will need C++ or C.
C#'s speed depends on the coding style than on the language. If you know what you're doing, Microsoft .NET gets within 2x of C++ speed most of the time. Mono is substantially worse (have a look at these benchmarks, which focus on simple programs that are written in a "C with classes" style.) If you are using features like LINQ (considered a "must-have" C# feature) you'll take a performance hit, but when you write C# code as if it were C code then its performance isn't far from C. Luckily you don't have to write the whole program so carefully, just the parts that have to be fast.
.NET CLR (but performance may be sensitive to native interop costs, which are not insignificant. Interop benchmarks are included in the link above.)
Games aren't just concerned with what is traditionally thought of as "speed", namely throughput; games are also concerned with latency. C# is based on Garbage Collection, and GC tends to add more latency than deterministic memory management (C/C++). Since writing games largely in GC languages is now a very common thing (e.g. Java on Android), I'm sure articles have been written about how to avoid getting bitten by the GC, but I don't have an article handy to show you.
I doubt the OP wants to write a graphics engine in C#. I'm no game dev so I won't suggest an engine, but the point is, the most sensitive part of game performance tends to be in the area of graphics, and you probably can use a C# wrapper of a C++-based graphics engine, so that the overall performance of the game doesn't depend that much on the performance of the
everything is faster than java
Then what are they built in? I've been wondering this because of a lot of stories and anecdotes about quickly built games, hackathons, etc. Is there some sort of "game builder" software that everyone uses, an update of RPGmaker that's actually useful, or...? Having been programming for 30+ years, I haven't seen any programming that is as easy as these hackathons or makerfaires seem to imply it is.
I think it's interesting that you know Visual Basic, but want to get into C#. My first question would be "Why?". Both run on the same framework and both are equally capable. All you're doing is learning new syntax to do things you already know how to do. After that question is the comment "You pretty much already know C#". Sure, it's a different language from VB, but that's the easy part. It uses the same tools and libraries, so you know 95% of it already.
Once the app is up, if done right, performance can be decent for most things, pretty comparable to C++. The big thing is once it's up. The REAL killer of any c#/.net app (or any env that requires a VM like Java) is the load times. Even tiny c# apps take forever to load. So I would really recommend c++. I know if you really wanted you can do cross platform with mono but it's a lot easier with c++, especially if you use a framework like SDL.
Surprisingly enough, there is. A lot of game developers use GameMaker to prototype games. But some of them are good enough to be published on Steam straight out of Gamemaker. And it's simple enough that my 11-yr old has been using it for his own game.
Disclaimer: my former prof built it.
There's also Unity3D.
These tools take away a lot of details that used to be 80% of the work, and leave you to work on the *game*, as opposed to rendering the screen without tearing or trying to get the audiobuffer to play without clipping, or... etc.
Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
Unless you want to be locked in to MS? Learn, any of the things that also work on iOS and Android and you may actually end up with an useful skill.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
The maker of Flappy Bird would like to disagree. So would Vlambeer Studio. And a whole host of small indy gamestudios.
Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
I use unity. Like you say, if you make more than $100K per year, then you need to buy pro.
But really, who cares? $1500 - $4500 (depending on what you need) is a very reasonable price for the tool, and an insignificant cost at that point. The cost of writing games is orders of magnitude higher than that, and Unity will end up saving you more in time than $4500 worth of programmer's time. They don't even charge royalty.
Also, why a trap? The terms are clear and you know them up front. Nobody is deceiving you into paying for something you did not want. From my point of view, the terms are quite generous and reasonable, and if you don't think so, then you simply use other tool and this does not affect you
If you have to pay $4500 because you are making $100K/year , it is a very nice problem to have :).
The fact that you're not already coding and Ruby couldn't hold your interest makes me wonder exactly what you want to do and why.
If you plan to learn to code mainly as a necessary step towards creating your dream RTS then I hate to piss on your fireworks, but you're wasting your time. It's just way too much dang work and frustration for something you don't find interesting and exciting in and of itself.
If I got the wrong idea and you do find coding interesting, forget about the RTS for a while and just worry about getting good at the basics.
C# doesn't 'run through a virtual machine' - CIL bytecode is 'always' JIT compiled to native machine code in both Microsoft's .net platform and in Mono.
The only overhead/problem here is quality of the JIT (you need only look as far as ECMA 262 to see how much difference that can make, eg: JaegerMonkey vs. V8), CIL JIT has type checking requirements - so there's once-off validation overhead for each JIT, and lastly unlike C/C++ your JIT compiler rarely has (or wants to have, due to memory and performance considerations) a complete view of the entire program - so you don't get anything remotely similar to link-time optimisations.
That said - for relatively flat code structures - well written C# will JIT into, in many cases, identical instructions to what GCC/Clang/MSVC will do for equivalent C/C++ code.
The primary differences are around exception handling and boxed types. Neither of which you're going to be using heavily in performance critical code segments in C# anyway - because all of them can be avoided with well written C# or some unsafe magic.
The reason for listing that stuff out, is that I want people to understand that I know what I'm getting myself in to, and I'm not trying to put out a not-so-subtle "help me make a game for free lol" type of post
I'm sorry, but your long list of "I did this and that" means only that you are a gamer with a few artistic skills, it has absolutely no value for game programming !
During my 18 years of game programming, I met a lot of people that had "wonderful" ideas (it's funny how everybody has a dream game), but no skill to realize them.
They always boasted about the fact that their idea was great, but their project never got released.
Writing a game requires the following skills:
1) technical skill: coding
2) art skill: graphics/animation and sound/music
3) gameplay skill: making the game enjoyable
4) story telling: making a coherent game's universe
In my life, I never met a single person with all of these skills, at a decent level.
The most talented ones had only 2 skills.
Firstly, before coding your dream game, try to write a very simple game. It will show you where you'll need help.
If you are a beginner, you won't be able to code Starcraft.
Try something related to your project, so you can increase your knowledge.
Secondly, since most of the CPU power is spent on display and AI, you'll need to learn:
1) how to optimize the display.
Since the whole screen needs to be redrawn very frequently, you have to learn techniques to render fast.
There are tons of techniques in 2D and 3D.
2) AI algorithms, most notably path-finding algorithms if you want to program a RTS.
Thirdly, try to build a prototype in one month.
If you are able to build it in one month, you'll probably be able to work on your project during several months.
It will also show that you don't lose yourself on details (non-professionals tend to waste their time on small details, thus the final goal disappears).
If you are unable to build it in one month, it means that your project is not well defined, probably too ambitious or completely unrealizable.
Fourthly, I would recommend to build a motivated team around your game.
This is a virtuous circle: when your motivation will decrease, they'll encourage you and when they'll get demotivated, you'll encourage them.
Nowadays, I believe that it's impossible to write a game alone, unless your game is very simple.
Find people who believe in your project and who may help you.
The performance reasoning may go away sometime soon. Microsoft has been working on a native compiler and has a preview for Windows Store apps. They've said they're bringing it to the full .NET platform. At which point you get all the performance of C++ with the benefits of a robust framework and a good language.
Don't learn C# for game programming. None of the major engines use it. Learn C++
That's directly from one of the game designers of Ghosts.
I once spent ~6 months making an RTS in C# and it was quite hard, but I had the basics - shooting tanks, pathfinding, economy, 3d maps. I did it in XNA with the help of Riemers tutorials.
These days, monogame is now 'the C# way' of writing games. As a bonus you get multiple device support, but the the thing that is good for you is it's very like XNA, which until recently was the best choice, so all of the XNA tutorials still have relevance for you.
Unless you are making a simple game, C# is not going to cut it. If you are making C&C1, then it will be ok, but if you plan to make Supreme Commander then you will need C++ for performance reasons. Still, you could get it up to a certain level with C#.
I am a (perhaps obsessively) massive fan of the RTS Supreme Commander Forged Alliance and play daily on FaForever.com. In my mind the game is a technical marvel and recently I have come to understand how it is built, which may interest you. All of the hardcore processing is done in C++ (physics, pathfinding, 3D) and all of the game logic (eco, unit definitions, is a building finished, what can a unit do, ui) is done in LUA, which is like javascript. All of the LUA files are included in the game so you can see how they do things, but you can also edit it and change it. In fact you can rip all of the content out of the game and replace it with your own models, sounds, bitmaps, units, logic and behaviors. I think this could be interesting for you because you could actually implement your entire game now using their engine (it's called the moho engine) which would get your game up and running instantly (without having to spend 1 month just to get pathfinding working). You could never sell it this way, but in terms or rapid prototyping it's a great idea.
I'm not sure if you've thought about it but you will be a) building a game engine and b) building a game that uses it. The first step involves crazy headaches and frankly, a level of programming that most developers never achieve. Why not skip it?
Three of us took that "Beginning Game Programming with C#" Coursera course. Two of us were professional programmers (myself a professional game developer) so we blew through the course; our third was a gaming buddy who wanted to try out programming -- he was an excellent gamer but had never done any programming. (Back in the day he had done a little shell scripting on Windows.)
The coursera is NOT a beginner friendly course -- it had two major problems:
* it teaches concepts in the wrong order, and
* doesn't explain key critical concepts at all, or extremely poorly.
My buddy dropped out after a few weeks because he just felt completely lost. We would spend hours going over concepts with him and he would get most of it. But when it came to the assignments he didn't have enough of the big picture and low level details to reason things out. IMHO there are better lessons out there, such as:
* http://www.codecademy.com/
* http://learn.code.org/hoc/1
Which is a shame too, because the professor is actually friendly, and has good intentions.
MOOCs are "famous" for having a 98% drop-rate. Seriously, like 20,000 students signed up. Very few made it to week 5.
I started by working with the Quake 3 engine and seeing what I could do to it. I wound up modifying the guns by adding new firing modes, modifying how the camera a little and learned how to add effects to the game.
Then I messed around with the trigger editor in Starcraft.
Then I messed around with the trigger editor in Warcraft 3 and made a lot more complex things, including implementing the character progression system from a single game from a popular Japanese RPG series -- which shall remain nameless -- in a tower defense map. (It was an awesome-bad project.)
What did I find? This taught me the basics of game programming as well as a lot of about algorithms. It made me a better programmer. Then I made some Starcraft 2 maps, one of which was a port of a Warcraft 3 map. Then I said fuck this, and took the RPG I started in Warcraft 3, moved to Starcraft 2, and I now have a 2D RPG game engine written from scratch for PC that is well beyond the progress of either of the maps it came from. I would argue you don't learn to program games in a language. You just learn the paradigms used to make a game work, and then apply that to a language. You want to learn? Do it. Books may help if you get stuck along the way, but do yourself a favor and stick to libraries if they exist. No one wants to draw their own fonts or write a PNG loader.
Although yes, you may learn some more about the language you're using along the way. I learned a lot about C++. Try to stick with learning to do things The Right Way (tm) and you will surprise yourself with what you learn. For the record, I wrote my own game engine because I wanted to learn how to do that. I sometimes wonder if I should have used a ready-made engine but the learning experience is massive, although I don't recommend it for everyone. I am quite insane.
Other people have suggested how to learn the basics of a language, so I'll ignore that problem.
Designing and writing good code is an art form. There are many anti-patterns you may fall into that could doom your project that a more experienced developer can help you avoid.
A couple hours a week spent explaining your design before you start writing code, or helping to track down why your code doesn't work as expected, or reviewing the code you believe is finished, will save you days of wasted effort.
Structure your code so that you can write automated tests to cover *everything*. It will seem like a pain to start with. But once your project picks up speed, it will be invaluable to ensure you never break something that you know already works. Tracking down bugs in old code is painful.
If you do this right, you will get into the habit of writing the tests first, or along side the code you are writing. You will find that you rarely run the code as a user would, because that just wastes time. And when you do finally run the code as a user, it just works.
09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
As someone who has been coding non-professionally for 20+ years as mostly a hobby (though I have developed a few apps to make my life easier at work) here is my advice:
I started coding as a kid with QuickBasic, them moved on to VisualBasic (pre .NET), did some x86 assembly too. Back then I tried and tried to learn C/C++ over the years but never really liked it for some reason. I finally started with VB.Net 10 years ago. Initially I found it hard to make the move to .NET, but grew to really like it's power, bells and whistles. I didn't code for a few years, but did tinker around with PHP/Javascript which is a C-like syntax. This forced me into getting used to such simple things like brace brackets, semi-colons, etc, and I began to really like finding that switching back to the VB syntax was a bit of a pain (I kept adding those damn semi-colons at the end of each line!!!)
About 5-6 years ago I finally started to make the switch to C#. I started with re-writing an app entirely in C# (previous version was in VB.NET). This allowed me to translate/transfer my knowledge to a new syntax as they are both very similar thanks to the CLI. Eventually I had completely moved over to C# and was loving it. Over the last few years I have been into programming in C/C++ for the Arduino/Atmega, which has taught me a huge amount about embedded programming and mostly how C/C++ manages memory (gotta love pointers). Nothing (except maybe assembly) forces you to understand memory management like coding in C/C++. I am by no means an advanced C/C++ coder, but I am getting stronger every day and love just how much control I have with it!
Now my actual advice:
Start with C/C++ because in my opinion it's the hardest to master and teaches you the 'nitty gritty' of coding without all the crutches of the other language like garbage collectors, type safety, exception handling, and fancy libraries. If you can learn to code in C, or more specifically C++ you will be able to learn anything easy. But do it the other way and you may struggle due to bad habits and crutches the other languages teach you! I wished I had started out with C/C++ way back when, however hindsight is always 20/20!
C# is a multi-paradigm object-oriented programming language designed to totally lock you into Microsoft dot.NET ..
H1B and the will to work 60-80 hours a week with no OT pay.
And you just need to be a sub par coder as well.
Google.
I'm 100% serious. I learned C# that way and wound up writing the application code for a product that sells for about 5 million a year.
Here is your task, since you're interested in making games. Make a game of pong in C#. Use Google to look up how to do it. Start with a hello world program. Then make a program with a form. Then figure out how to paint to it. Keep going.
At the end of the pong game you'll know enough to be dangerous. Good luck!
Weaselmancer
rediculous.
No, it's not.
"No man's life, liberty, or property are safe while the legislature is in session." -- Judge Gideon J. Tucker
It would be hard to make a programming language slower than Java, even if you tried.
1996 called and wants its Java insult book back.
One thing has to be said for C#, as much as I am a subscriber to the "If C is Play-Doh, and C++ is Lego - C# is Duplo" philosophy, it does allow to get results fast without having to use a ton of libraries that in the end weigh you down more than C# would.
So in other words, C# gets results fast without having to weigh you down more than itself would?
Try Beginning Game Programming with C#
About the Course
The Beginning Game Programming with C# course is all about learning how to develop video games using the C# programming language. Why use C# instead of C++, Java, ActionScript, or some other programming language you may have heard of? First, using C# lets us use the Microsoft XNA and open-source MonoGame frameworks, which help us quickly develop games for Windows, Android, iOS, Mac OS, and others. Second, the Unity game engine is very popular with indie game developers, and C# is one of the programming languages you can use in the Unity environment. And finally, C# is a really good language for learning how to program.
At least his sentence compiled, but a little more debugging may be required.
It's free. It's fun and there is a large community of people doing tutorials and videos and answering questions.
Just dive in.
Lead by example, please....
I was thrown into the deep end with C# best way to learn it is to do it, that should be a no shit for anyone who has written in any language ever
programming a game however requires a totally different way of thinking about the problem at hand, and it doesnt matter the language, its the methodology of writing a game, just like writing a db app is different from writing a website
quit asking dumb questions, its a new to you language, do what you can and figure it out, god knows there's enough resources out there that even a non programmer like me can barf out fairly complex systems by basic programming structure + a bit of google within an hour.
Let alone a bazillion XNA articles to make your game even though for some odd reason you think that the game is made by the underlying language and not the gameplay formulas involved, which usually best suit pencil and paper
Settle down there buddy. Making something small and simple in scope. It's your first game - it's going to suck.
That is the reality of computer science. In my first semester of college, there were about 20 students in the Intro to Comp science class. By the next semester, there were maybe half or less left, and by the third semester, there were only about 4 of us left.
Also sign up at Coursera. They have a course titled "Beginning Game Programming with C#" taught by the University of Colorado. The course also teaches basic C# syntax, so it's very beginner friendly. You just have to wait for it to be offered again before signing up.
Aren't they in the process of deprecating C# use in the Unity engine?
Mada mada dane.
" I doubt you could write a balls-to-the-wall Crysis-like shooter in C#, but I don't imagine there'd be any performance-related reason you couldn't write an RTS in C# and have it run just fine on any machine not so old that its OS wouldn't support the .net framework anyway."
You might be surprised to discover you are completely wrong on this account. I'm currently write a game using the CryEngine 3. The code comes as a mix of C++, Lua and Flowgraph (a graphing system that allows rapid prototyping). There's an example implementation using the engine which is a complete FPS game, and that is a mix of all three languages. The hardcore stuff is done in c++ and access is provided to this through script binding for Lua and other means for Flowgraph.
There is also a working implementation of Mono (c#) which can be added to the system. Several teams are using that to produce various games using CryEngine.
Of course, the rendering, and main guts of the system is all nasty looking, balls to the wall c++, but a large amount of the game logic, AI, character handling, and the like is all in Lua, a simple scripting language.
All those moments will be lost in time, like tears in rain.
If you really want to learn to program games, start with Lua instead of C# or C++. It's a tiny little scripting language that can be learnt in a few hours and is used by an enormous number of game development companies. Lua is often tasked with providing a UI for the game, logic flow, rapid prototyping of features, anything really except for the critical loops - which are all handled in C++.
Once you have Lua under your belt you should learn C++, because at the heart this is what all performance sensitive games are written in. The game engine will be a mess of tight, sometimes obscure C++. If you want to make changes that are at that level then you absolutely need to be able to write C++.
Finally, think about learning C# if it's supported by the game engine you have chosen to use for your game. It should perform about the same speed as the Lua code and it's used for the same tasks - game logic, etc.
Since you're a beginner, I'd recommend you go with either Unity or Unreal Engine as these are both easier to learn and have a lot more community support. Unreal Engine now comes with the complete source code in C++, so you can take a solid look under the hood and see what's happening in there. CryEngine is moving towards releasing more of their source code, but are not there yet.
Really your first question should be which language to learn, but which engine to learn. The engine will dictate which languages you need to learn from there.
All those moments will be lost in time, like tears in rain.
Hi I think this course is perfect for you. https://www.coursera.org/cours... Regards
everything is faster than java
Especially your mom.
Naturally, she won't do garbage collection.
You have a more important problem than which language to chose. The most striking thing about your post is it sounds like you have grand designs for a game (your first game) and that's a bad thing. What you are doing is what almost every new game developer attempts to do... or at least thinks about: going in too big, running before you can walk, building a supersonic jet before you've built your first paper plane etc etc...
Sure you have programming experience and sound design and 3D modeling experience. But when you made your first 3D model did you create a masterpiece with immense detail? or just randomly poke around vertices of an abstract nurb? It's easy to get carried away having big plans for a big game, but you are one person, and you haven't? made your first game yet. You will fail in one way or another, so fail on something small first, then build up to your big idea (which will almost definitely change after you get your feet wet and get a sense of how practical the original ideas were).
Even just pick a small part of the big game that you envision... something so small that it should not take long to build (but it will take longer than you think), don't flesh it out, don't get carried away with detail, focus on a basic concept and see how far you get, this is how you learn: iterate. Wanting to have everything you imagine in your game is easy, deciding what you can have and what is more important is what you will learn.
Also something that might bias your choice of language, is that you will have to decide how much you want to build from scratch and how much 3rd party code you want to use, i.e in terms of engines. If you have very little interest in the physics engines and graphics engines behind games then you will have the task of choosing from the vast range of readily available ones. Not only does that sway your choice of language but it also sets you on a different path of learning, you have to learn how to use someone elses engine rather than learn how to write your own. Using someone else will give you more capability but less creative freedom and insight into how things really work, and could limit you to particular languages.
Hasn't anyone noticed that? Rithet there in the right up? C# is more like Java. Either that is a typo or the poster is clueless. So what what does the poster really want, a C# like language or a C/C++/Objective C type language?
putting the 'B' in LGBTQ+
I don't assume anything about that post, except the cluelessness/trollfulness of the poster.
Don't take the parent poster's advice unless you want to spend several years writing an engine just to discover that it's outdated by the time you can start on your actual game. Get an existing game engine. There are excellent ones out there for no or next to no money and they already care about all the tedious fiddly things that take several man years to develop and port across platforms.
Game development isn't about coding anymore. It's all about the game content. And that is always more work than it may seem to laymen.
Lastly, there's a "game" you can buy through Steam - called GTGD (Gamer to Game Developer) - some Aussie walks through creating a first person shooter with teams and multiple weapons. There's a S1 and S2 and after about 12 or so of the videos (out of 20+ in S1) I had enough to start programming my own game. He's writing it all in c# and explains the code decently.
It would be hard to make a programming language slower than Java, even if you tried.
Actually, the problem with Java isn't as much that the language itself is slow but that most of the GUI frameworks (particularly older ones) are slow.
Any insufficiently advanced magic is indistinguishable from technology.
There are a load of very detailed (fancy) 3D games using WebGL, not rudimentary at all.
Yes, and they are SLOW.
Crank them up to anything like a "decent, modern" FPS gaming (or even RPG gaming) resolution, and watch the framerate hit the floor.
Sure, it's getting faster. But you're missing the point. While WebGL and the like are getting ever faster, due almost entirely to better hardware, guess what? C++ or C are also getting faster at the same rate. Allowing better, faster, better resolution and more realistic games.
So he STILL needs to learn C or C++ if he's serious about writing games. Even a graphically-intense smartphone game has C underpinnings.
What about learning Java instead? It's free and it has free frameworks and IDEs too!
Yes c#!! It's the main scripting language for the unity game engine which has a basic version that is free. I've been learning it for a year and compared to many things out there is phenomenally user friendly and has a great online community that can walk you through just about everything and provide piles of sample code for free. Especially if you want to make an rts, look for the a* path finding project which provides all the basic navigation functionality for your ai. Google - unity rts and there are several projects that are already done and free to use that you can learn by tweaking. Unity!!!
My six year old son spends a lot of time on this learning-to-code site. I think his kindergarten teacher introduced him to it. It's probably the best thing I've ever seen for teaching kids coding.
Click on a starter project. Click the green flag to run the program. Click "See Inside" to look at the code in their editor. It's visual, easy to read, and quite elegant.
It really is a completely fantastic site. Brilliantly done.
scratch.mit.edu
Weaselmancer
rediculous.
sorry, that 1996 insult book is still largely up to date. java is slow and resource hungry compared to well written equivalent native C/C++.
Yeah and that code is calling what amounts to libraries all written in C or C++.
Java is still slow. But unless you're using it for heavy number crunching, you won't notice it on a 2014 computer like you did on a 1998 computer.
Isn't that what .NET native is supposed to tackle?
Sometimes I doubt your commitment to Sparkle Motion
So I, like many people, want to make my own game. Outside of MATLAB, Visual Basic, and LabVIEW I have no real programming experience. I initially started with Ruby, but after doing my homework decided that if I ever wanted to progress to a game that required some power, I would basically need to learn some form of C anyway. Further digging has led me to C#. The other parts of game design and theory I have covered: I have ~8 years of CAD modeling experience including Maya and Blender; I have a semiprofessional sound studio, an idie album on iTunes, and am adept at creating sound effects/music in a wide variety of programs; I'm familiar with the setbacks and frustration involved with game development — I beta tested DotA for 9ish years; I already have my game idea down on paper (RTS), including growth tables, unit types, unit states, story-lines, etc. I've been planning this out for a year or two; I will be doing this on my own time, by myself, and am prepared for it to take a couple years to finish
I don't have any gaming programming experience and a lot less programming experience than you do already.
You mentioned a lot of details but failed to mention if you'll be targeting a particular platform. For instance: will you release you game for sale/free? Is a mobile version ever a possibility? Will you release it for the "Windows Store"? Steam? Both? Neither? Is this just a hobbie no one else will ever see? A resume bullet point?
Anyway, speaking not as somebody who has done what your describing but merely as someone who did a lot of research into it I would say go to steam and filter the game list to only "Strategy - RTS" genre and start looking at the ones with both an extensive map editors/mod creator and a fairly large community. Try a few out. Pick a favorite. Make sure it's something you can stick with because it will be consuming thousands of hours of your life. This will probably work better if it's a game you're not that familiar with. Thus your learning the game creation bit along side the actual editor/scripting/programming end of it.
Then at least get a version of your game up and going/playable. After creating the most polished version of your laid out game in your engine of choice if you still want to build an engine from scratch with it...well best of luck to you.
"UNIX is very simple, it just needs a genius to understand its simplicity." -Dennis Ritchie
but anything that really needs fancy graphics or fast processing will need C++ or C.
Totally incorrect. Anything that needs fancy graphics just require an SDK with access to a fancy graphics processing engine. I've written games in Java that use OpenGL on the backend. You don't need the language to be C or C++ to access OpenGL. As far as fast processing requirements, I guarantee you most games don't actually need processing that would not be fast enough in bytecode but would be fast enough in native code.
Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
Java is, by all benchmarks that I can find, the fastest non-native language that exists. Java was known as slow in 1996. It's been intensely optimized since. I'm sure there are some programs that are sometimes faster due to very circumstantial situations. Here's one example, there are countless others: http://benchmarksgame.alioth.d...
I also think my given citation or the many others I can find just isn't enough to make any declaration about which is "fastest" - it would be safe to say they are fairly equivalent, and this whole argument about their comparative speeds is stupid. Average CPU abilities, amount of memory accessible, and what not change so consistently that anything you write now which is a little bit too slow will be fast enough in a year.
Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
So he STILL needs to learn C or C++ if he's serious about writing games. Even a graphically-intense smartphone game has C underpinnings.
WTF? No, he or she doesn't! Name 1 game that actually requires a programmer to learn C or C++, and I can name 100 or even 200 that don't. ESPECIALLY on a smartphone.
Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
What idiot marked my answer as "troll"?! You are the troll! trolling around slapping troll votes on answers that are not even slightly trolly. Nothing I said was trolly. I pointed out that making games these days is mainly carried out by large teams in a production company environment so Go F UR SELF FAGGOT.
That's great except that's not how it works. You pay $4500 and then maybe you'll make $100k or maybe you'll make $500. In the latter case, you're probably going to wish you had that extra $4000 to help pay the bills. (I write this an an independent app developer, albeit not in games. Money-wise, I've had several times where I realized I bought something for development that I didn't really need. I've never bought anything where I wished I'd bought it earlier, or otherwise regretted not buying something.)
No. you do not have to pay _until_ you start making $100K/year. It is not required to pay the cost up front, you can use the free version until you reach that threshold.
You can go ahead, make your app, and if it fails and you only make $500/year, you never have to pay a dime to unity.
Mobile Vo Lam is based on the story of the late Kim dynasty, famine raging across the country, puts Disorders harassed everywhere. Ethnic Man Outside visual intrigue invaded territory. Inside the busy military power competition no longer worry about her own life essence, more black people pushed into poverty and suffering misery, food robbed, exploited wealth from taxation. During that time the factions also gradually create hinhthanh many Vo Lam Mobile in 03 major power including: + The mission: This sect was formed by three main sects: Shaolin, My Russia, Wudang + Neutrality: including his account of the sect 3: Uranus, trails, Thuy Yen. + I must: is the set of the heroes of the sect 3: Christian forbearance, Doc Ngu, Ming Church. Map Vo lam mobile Every great power on a local, they have said that only they can help spread misery nature from catastrophe. 3 This power is growing stronger. That power increasing peak. And everyone wants to eliminate the remaining forces and become an independent Vo Lam Mobile. And what is to come, a forest can not have two tigers. Competition is becoming increasingly fierce and intense. The skirmish escalated to the level of the head of the 3 forces declare: "No Friends could also be to the left side" and the battle between the forces 3 becomes ever more stressful, the power of this artist's implacable determination to fight, attended by other factions became fierce than ever. Download Mobile Vo Lam (The program automatically detect the phone) Or write: TG 525 190 6086 posts
I suggest you look at using D instead. It is as powerful and efficient as C++, syntactically very similar to C#, and can link C++ libraries.
The main benefit this provides (apart from performance) is that it will be much easier to do a cross-platform release - although C# has Mono, I've found it to be unreliable.
That said, D is somewhat obscure, so caveat emptor.
Most human behaviour can be explained in terms of identity.