|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
Hi guys, I have kind of a n00bish question. 
I am studying animation and digital graphics with the hope of working in the gaming industry (or at least something technology related). Most of my friends are comp sci students, so I am vaguely familiar with a variety of programming languages and ideas, but have not used much except for Java and a tiny bit of Python.
I find I have difficult with the learning process for math/logic/programming type of things (the learning specialist at my uni says I have a learning disability of sorts, but I think it might be just that I learn very kinestheticly and am not taught that way). I would like to become familiar with the kind of programming that will be used in the gaming industry, but obviously I can't learn everything, especially since it takes me so long. What would be the best language for me to learn so I am familiar with things, at least conceptually?
|
Anyone know the scalability of modulus (%) in java? I can't find it anywhere. I'm taking about big O-notation.
|
On July 11 2011 02:34 RedJustice wrote:Hi guys, I have kind of a n00bish question.  I am studying animation and digital graphics with the hope of working in the gaming industry (or at least something technology related). Most of my friends are comp sci students, so I am vaguely familiar with a variety of programming languages and ideas, but have not used much except for Java and a tiny bit of Python. I find I have difficult with the learning process for math/logic/programming type of things (the learning specialist at my uni says I have a learning disability of sorts, but I think it might be just that I learn very kinestheticly and am not taught that way). I would like to become familiar with the kind of programming that will be used in the gaming industry, but obviously I can't learn everything, especially since it takes me so long. What would be the best language for me to learn so I am familiar with things, at least conceptually?
As long as your language strongly supports OOP paradigms, it doesn't really matter, since transferring from one language to the other will be very easy.
If I had to give you a specific language, I would definitely recommend C++. Basically every non-indie game studio uses it (for various reasons - although performance is by far the biggest one).
By the way, since you're complaining about learning too slow: Programming is especially brutal, since there are very few skills that you can pick up by only reading about them or dealing with them in a theoretical manner.
Why exactly one approach is better than another is most of the time just a thing of experience. You will only notice the difference if it actually makes a difference for you - if you implement something differently than before and suddenly realize how easy it is to expand on that piece of code, something will go *click* in your head and you will have understood the concept.
So all you can basically do is read a couple of books, read some online tutorials, and then practice, practice, practice (by actually starting hobby projects that you aim to complete). Go to places like www.stackoverflow.com and www.gamedev.stackexchange.com to ask quesions if you have problems.
|
On July 11 2011 02:38 Qzy wrote: Anyone know the scalability of modulus (%) in java? I can't find it anywhere. I'm taking about big O-notation. Uhm, since it's arguments are basic types with fixed size it's O(1).
|
On July 11 2011 02:34 RedJustice wrote:+ Show Spoiler +Hi guys, I have kind of a n00bish question.  I am studying animation and digital graphics with the hope of working in the gaming industry (or at least something technology related). Most of my friends are comp sci students, so I am vaguely familiar with a variety of programming languages and ideas, but have not used much except for Java and a tiny bit of Python. I find I have difficult with the learning process for math/logic/programming type of things (the learning specialist at my uni says I have a learning disability of sorts, but I think it might be just that I learn very kinestheticly and am not taught that way). I would like to become familiar with the kind of programming that will be used in the gaming industry, but obviously I can't learn everything, especially since it takes me so long. What would be the best language for me to learn so I am familiar with things, at least conceptually? Hey man sorry to hear that. I can't help you with what languages are used in gaming. But as far as learning the how to program: A lot of it is understanding the logic of how a computer thinks. Then googling the syntax. So if your looking ahead to get an advantage writing programs in general will help you lots. So to start getting better i would say run with java which you have a bit of experience with. Try and make simple but GOOD programs, good means completely proper object oriented etc. Learn and practice managing your instances and basically challenge yourself. When you learn about what languages you will have to know focus on the differences and limitations of that languages from what you already know. TLDR: Learn what a computer can do and how to use those things to accomplish something as opposed to syntax.
EDIT: The answer above mine is good too and we say a lot of the same things... Definatly C++ over java tho he was right about that.
|
On July 11 2011 02:44 heishe wrote:Show nested quote +On July 11 2011 02:34 RedJustice wrote:Hi guys, I have kind of a n00bish question.  I am studying animation and digital graphics with the hope of working in the gaming industry (or at least something technology related). Most of my friends are comp sci students, so I am vaguely familiar with a variety of programming languages and ideas, but have not used much except for Java and a tiny bit of Python. I find I have difficult with the learning process for math/logic/programming type of things (the learning specialist at my uni says I have a learning disability of sorts, but I think it might be just that I learn very kinestheticly and am not taught that way). I would like to become familiar with the kind of programming that will be used in the gaming industry, but obviously I can't learn everything, especially since it takes me so long. What would be the best language for me to learn so I am familiar with things, at least conceptually? + Show Spoiler +As long as your language strongly supports OOP paradigms, it doesn't really matter, since transferring from one language to the other will be very easy. If I had to give you a specific language, I would definitely recommend C++. Basically every non-indie game studio uses it (for various reasons - although performance is by far the biggest one). By the way, since you're complaining about learning too slow: Programming is especially brutal, since there are very few skills that you can pick up by only reading about them or dealing with them in a theoretical manner. Why exactly one approach is better than another is most of the time just a thing of experience. You will only notice the difference if it actually makes a difference for you - if you implement something differently than before and suddenly realize how easy it is to expand on that piece of code, something will go *click* in your head and you will have understood the concept. So all you can basically do is read a couple of books, read some online tutorials, and then practice, practice, practice (by actually starting hobby projects that you aim to complete). Go to places like www.stackoverflow.com and www.gamedev.stackexchange.com to ask quesions if you have problems.
Nono, I don't think you understand what I mean about learning slowly. It's not that I expect to just 'get it', or learn it theoretically. (Maybe I have a screwed perspective cause I'm at a very prestigious school with a lot of people smarter than me.)
For example, I tried to use arrays for a long time, and I just could not wrap my head around starting at 0. People would tell me over and over, and something would just not click in my head. It seems so simple-- the first piece of data is in slot 0--but I just couldn't understand/use it. I would constantly mess up everything when I used arrays. Then a friend took me to the grocery store to the frozen food isle and explained each little section as a place to put a kind of vegetable, and made this huge long analogy that I could actually follow. I know it seems so dumb, like why can I just not start counting at 0, but something in my brain just would not... understand. It's hard to explain.
It's just that for each new thing I learn about (if/else, objects, classes, lists), it takes a lot of searching for the right explanation for me before something clicks in my head and I am able to use it right. My brain just doesn't understand. /fail explanation.
If you have any recommendations of sites or books that explain C++ with pictures especially, that would probably be a huge help! I draw all of my code out visually to help me understand how it works, so I think it is one of the best methods for me.
|
On July 11 2011 02:46 japro wrote:Show nested quote +On July 11 2011 02:38 Qzy wrote: Anyone know the scalability of modulus (%) in java? I can't find it anywhere. I'm taking about big O-notation. Uhm, since it's arguments are basic types with fixed size it's O(1).
So you are saying its constant time for both 234234234234%1231443534 and 2%1?
Hm, didn't know!
|
On July 11 2011 03:00 RedJustice wrote:Show nested quote +On July 11 2011 02:44 heishe wrote:On July 11 2011 02:34 RedJustice wrote:Hi guys, I have kind of a n00bish question.  I am studying animation and digital graphics with the hope of working in the gaming industry (or at least something technology related). Most of my friends are comp sci students, so I am vaguely familiar with a variety of programming languages and ideas, but have not used much except for Java and a tiny bit of Python. I find I have difficult with the learning process for math/logic/programming type of things (the learning specialist at my uni says I have a learning disability of sorts, but I think it might be just that I learn very kinestheticly and am not taught that way). I would like to become familiar with the kind of programming that will be used in the gaming industry, but obviously I can't learn everything, especially since it takes me so long. What would be the best language for me to learn so I am familiar with things, at least conceptually? + Show Spoiler +As long as your language strongly supports OOP paradigms, it doesn't really matter, since transferring from one language to the other will be very easy. If I had to give you a specific language, I would definitely recommend C++. Basically every non-indie game studio uses it (for various reasons - although performance is by far the biggest one). By the way, since you're complaining about learning too slow: Programming is especially brutal, since there are very few skills that you can pick up by only reading about them or dealing with them in a theoretical manner. Why exactly one approach is better than another is most of the time just a thing of experience. You will only notice the difference if it actually makes a difference for you - if you implement something differently than before and suddenly realize how easy it is to expand on that piece of code, something will go *click* in your head and you will have understood the concept. So all you can basically do is read a couple of books, read some online tutorials, and then practice, practice, practice (by actually starting hobby projects that you aim to complete). Go to places like www.stackoverflow.com and www.gamedev.stackexchange.com to ask quesions if you have problems. Nono, I don't think you understand what I mean about learning slowly. It's not that I expect to just 'get it', or learn it theoretically. (Maybe I have a screwed perspective cause I'm at a very prestigious school with a lot of people smarter than me.) For example, I tried to use arrays for a long time, and I just could not wrap my head around starting at 0. People would tell me over and over, and something would just not click in my head. It seems so simple-- the first piece of data is in slot 0--but I just couldn't understand/use it. I would constantly mess up everything when I used arrays. Then a friend took me to the grocery store to the frozen food isle and explained each little section as a place to put a kind of vegetable, and made this huge long analogy that I could actually follow. I know it seems so dumb, like why can I just not start counting at 0, but something in my brain just would not... understand. It's hard to explain. It's just that for each new thing I learn about (if/else, objects, classes, lists), it takes a lot of searching for the right explanation for me before something clicks in my head and I am able to use it right. My brain just doesn't understand. /fail explanation. If you have any recommendations of sites or books that explain C++ with pictures especially, that would probably be a huge help! I draw all of my code out visually to help me understand how it works, so I think it is one of the best methods for me.
First of all, don't feel stupid if understanding some programming concepts is more difficult for you. Not everybody learns the same, and if somebody tried to teach me anything artistic, I would fail miserably. You might want to take a look at Alice: http://www.alice.org/
I haven't used it myself, but it's a much more visual way of learning to program. I know they used it in my CS department in college in a non-major course (and I know of at least one other university that does). It might be total crap and a waste of time, but maybe it will help . If you do play around with it, post what you think, I'm curious :D.
Other than that, I don't really recommend spending a lot of time with C++ unless you're actually going to be writing code or need to understand nuts and bolts aspects of the projects you're working on (memory management, graphics code, etc.). I work with C++ every day and hate it lol.
C# has very similar syntax to C++ but you don't have to deal with a lot of the annoying stuff. You can get simple windows applications up and running very quickly, which you won't be able to do out of the box with C++. Because you're learning similar syntax, if you do need to read C++ code, you could do it very easily, assuming you're not dealing with a lot of pointer manipulation code.
Unfortunately, I don't have many good book explanations for you, but I hope this helps in some way. Does your university/college offer a non-major CS course?
|
On July 11 2011 03:12 Qzy wrote:Show nested quote +On July 11 2011 02:46 japro wrote:On July 11 2011 02:38 Qzy wrote: Anyone know the scalability of modulus (%) in java? I can't find it anywhere. I'm taking about big O-notation. Uhm, since it's arguments are basic types with fixed size it's O(1). So you are saying its constant time for both 234234234234%1231443534 and 2%1? Hm, didn't know!
i'd guess the implementation is platform dependant, but most JVMs will hopefully map this to an according command in your cpu instead of manually iterating some random numbers or stuff, so you can just assume it to be O(1), as you can do for basically all numerical operations like * / + etc. In the end, multiplication of course takes longer than addition, and addition takes longer than a bitwise XOR, but since "most" cpus have dedicated circuits for these jobs, it's fast as shit and you can't influence it anyways.
@RedJustice: Do you want to learn programming in a specific language or do you want to learn software design / formal modeling in general?
|
On July 11 2011 03:12 Qzy wrote:Show nested quote +On July 11 2011 02:46 japro wrote:On July 11 2011 02:38 Qzy wrote: Anyone know the scalability of modulus (%) in java? I can't find it anywhere. I'm taking about big O-notation. Uhm, since it's arguments are basic types with fixed size it's O(1). So you are saying its constant time for both 234234234234%1231443534 and 2%1? Hm, didn't know!
Well, time complexity is usually defined depending on input size and a basic type like an integer can be assumed to have constant size regardless of it's value. For the CPU it's only relevant that it has to compute the modulus of a 32bit integer, the actual value is usually not relevant.
|
Okay thanks for answering my complexity question!
|
On July 11 2011 03:34 japro wrote:Show nested quote +On July 11 2011 03:12 Qzy wrote:On July 11 2011 02:46 japro wrote:On July 11 2011 02:38 Qzy wrote: Anyone know the scalability of modulus (%) in java? I can't find it anywhere. I'm taking about big O-notation. Uhm, since it's arguments are basic types with fixed size it's O(1). So you are saying its constant time for both 234234234234%1231443534 and 2%1? Hm, didn't know! Well, time complexity is usually defined depending on input size and a basic type like an integer can be assumed to have constant size regardless of it's value. For the CPU it's only relevant that it has to compute the modulus of a 32bit integer, the actual value is usually not relevant.
actually, if you really want to optimize speed to the last tiny bit, you can assert, based on how many zeros are leading your input values and what operation is chosen, how long the cpu circuit will take to be finished, and then schedule your pipeline or adapt your cycle speed accordingly .. so this *could* make a difference indeed. But it's so minimal, unless your doing nothing except calculating modulus, you won't notice anything, if such an optimization is present at all.
|
I would like to learn a specific language that has concepts that apply very broadly. That way even if I have not used the language they happen to be using, I can still understand what people are talking about.
Specifically I want to learn this in case I am working in a smaller indie or startup type of company, where people often fill many roles. I do not expect I would ever be doing any serious coding, but I think it would be an asset to at least have an understanding of what is going on.
My university does not offer non-major classes for anything. I took the second level programming class last year, which was mostly Java and python, and did very poorly grade-wise, though I learned a lot. I have also taken Theoretical Mathematics in Comp Sci, and same story. I do not want to take too many more higher level classes because I do not have much room in my schedule, and I do not want to hurt my GPA much. (Also, being on the brink of failing all semester is not very fun. t.t) I thought learning on my own might be better just because I can work at my own pace and not have the stress of grades and deadlines.
Thanks for the Alice link! I have seen it once before bet never used it, so I will see how it is. It seems very visual and interactive (which is good for me!).
Also, I tried to read about the differences between C# and C++ but it was too many terms I don't know! I know they look pretty similar, but what are the major differences that affect how you use it and what you can do with it? (if someone could please summarize in easy to understand words <3)
|
C# and C++ are huge languages. If you have trouble dealing with new concepts, you'd be well advised to steer clear, in my opinion.
If you wanted to learn a simple language with broadly-applicable concepts that will be generally useful to you for a long time, I suggest Javascript or C, which both fit that bill.
|
Well I already know Java alright. (Not brilliantly, but have been using it for the past 5 years on and off, so what I don't know I can figure out eventually. I can't necessarily write super clean sexy code in Java, but I can write stuff that works.) I would just like to learn something a bit more professionally standard for the industry I want to work in, and I know it is not Java.
|
On July 11 2011 03:44 RedJustice wrote: Also, I tried to read about the differences between C# and C++ but it was too many terms I don't know! I know they look pretty similar, but what are the major differences that affect how you use it and what you can do with it? (if someone could please summarize in easy to understand words <3)
C# is good for a number of reasons. First of all, you can get an application running up and very quickly. It's really easy to use Forms or WPF to get windows, dialog boxes, menus - all the stuff you expect in your standard windows application. In C++ you generally have to use MFC (which is awful) or an external library, which is going to be a lot more work.
C# abstracts away a lot of junk you have to deal with when you write C++ code, such as memory management. All this means is less annoying crap you have to worry about .
Not sure if you're using Visual Studio or not, but C# projects are way easier to work with than C++ projects. I think it's better with 2010, but I'm still on 2008 so this might be less of an issue. Either way, in C++ you have to deal with .h/.cpp files (which can get messy on large projects!), but in C# you just have .cs files which are easier to manage.
C# provides some cool stuff for programmers (lambda expressions, foreach, iterators, algorithms). Many of these features exist in C++ in the STL, boost, or some other library but it's MUCH harder to use and you need to know templates for a lot of it. Templates in C++ suck royally, but are far easier to use in C#. This probably doesn't mean anything to you now, but it will as you get more experience under your belt. Microsoft also has created XNA for indie development. XNA basically provides a game loop and APIs needed to write games in C#. In C++, you're going to have to use an engine, and this will be daunting for somebody not experienced with C++. You can get XNA here: http://www.microsoft.com/download/en/details.aspx?id=23714
EDIT: C# is becoming more standard also. Not for writing the game itself, but it's becoming more popular for tools development. It's part of the .NET framework (which is a bunch of languages developed by Microsoft) which means it's used outside of the industry as well.
If that was too technical for you or you have other questions, please post and I or somebody else will be happy to help clarify .
|
On July 11 2011 04:03 RedJustice wrote: Well I already know Java alright. (Not brilliantly, but have been using it for the past 5 years on and off, so what I don't know I can figure out eventually. I can't necessarily write super clean sexy code in Java, but I can write stuff that works.) I would just like to learn something a bit more professionally standard for the industry I want to work in, and I know it is not Java.
try suing notch for not employing females, minecraft is java-based haha 
so basically, you simply want to learn c++ and maybe sume lua scripting?
|
Hey guys having some trouble again (Java). I have looked aroud for some help but every explanation im given is way above my head.....write a program taht prompts the user to enter the number of students and each students name and score, and finally displays the name of the student with the highest score is what I am supposed to be doing. + Show Spoiler + import java.util.Scanner;
public class highscore{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int i = 0; System.out.print("How many student's are there? ");
int count = input.nextInt();
do{
if (i > count)
break;
System.out.print("Students name: ");
String n = input.nextLine();
System.out.print("Student Score: ");
int score = input.nextInt();
i++;}
while (i != 0);
System.out.println("No students left");
}
}
Basically I am unsure of how to put my 2 questions that I want to continuously ask over and over again into a loop. As it currently sits it rune/displays but has both quesitons I want to ask on the same line....Also unsure of how I will save the names inputted by the user as well as their scores since I will be recalling names and numbers further in the program.....I was suggested to create a student class and create a student object inside my loop, but frankly I need it explained out a little better.
|
Hmmm well for the C++ vs C#, it seems (please correct me if I'm wrong anywhere, just want to make sure I understand right)--
They are similar enough I could understand the other alright if I knew one. C++ seems to be used the most in professional fields. C# is easier to use/work with.
If C# is easier to work with, and would still give me a pretty good idea of C++, I think I would like to learn C# first, and then maybe I can use C++ later so I have less new things to worry about.
Also... lua scripting... looks similar to python in wikipedia. Is that an ok generalization? Why would it be good to know for me?
|
On July 11 2011 04:03 RedJustice wrote: Well I already know Java alright. (Not brilliantly, but have been using it for the past 5 years on and off, so what I don't know I can figure out eventually. I can't necessarily write super clean sexy code in Java, but I can write stuff that works.) I would just like to learn something a bit more professionally standard for the industry I want to work in, and I know it is not Java.
I said Javascript, not Java; the two languages have no relation. I would never have recommended Java in the first place, as it's also a big language, but if you are already comfortable in Java, you might find C# less hard to pick up.
In the case of the gaming industry, there's a big difference between something "professionally standard" and something useful to someone who is not programming games for 8 hours a day. I definitely hold that if you are not actually pursuing a career in programming, then you would probably be better served learning a smaller useful language fairly well rather than becoming sort-of-proficient in C++.
|
|
|
|