David_J_Rogers Posted March 14, 2014 Report Share Posted March 14, 2014 Hello Guys,I emailed the developers of this game a while ago. My name is David James Rogers. I am 19 years old and I am currently majoring in Game and Simulation Programming at DeVry University in Long Beach, California. I want to help out since I am going to be a programmer myself in the near future.Concerning my knowledge of programming, I know little to nothing about writing code in C++ and Java. I just started going to College in September soon after I graduated High School and my first GSP class only used Game Maker Pro - which if other programmers know, is not exactly writing code, but takes away the writing of code to make a game.I wanted to get ahead of my class and go ahead and try to help all of the other programmers here. Again, I do not know much, and I understand if you other programmers don't want to teach me on top of writing the code for this game. But, I am willing to learn and I will work hard once I do learn to do this while also keeping up with my school work.I will be happy to help however I can. And getting some real experience with programming early on will help me out in the future.Thanks for reading, and I hope you guys will accept my help. Quote Link to comment Share on other sites More sharing options...
niektb Posted March 14, 2014 Report Share Posted March 14, 2014 What do you want to program? The game is really diverse: Random Map Scripts, AI's, Gameplay, Engine (Not recommended to start with), Graphics (shaders, also not recommended to start with). 1 Quote Link to comment Share on other sites More sharing options...
Romulus Posted March 14, 2014 Report Share Posted March 14, 2014 If I were you, I'd get a C++ book and learn it from scratch before delving into the games code. C is a very manual orientated language and if you don't know the syntax, best to learn the root basics first. Quote Link to comment Share on other sites More sharing options...
niektb Posted March 14, 2014 Report Share Posted March 14, 2014 No, you'd better start with JavaScript. That is much easier to start with. Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 14, 2014 Author Report Share Posted March 14, 2014 Anything you see fit to give me I will work my best. I just need to learn to write some code is all. Preferably, I would like to start with basics and move on up.If there is anything you all can give me to get started as soon as possible, I will get to work on it so I can make some productive contributions soon. Quote Link to comment Share on other sites More sharing options...
Romulus Posted March 14, 2014 Report Share Posted March 14, 2014 Anything you see fit to give me I will work my best. I just need to learn to write some code is all. Preferably, I would like to start with basics and move on up.If there is anything you all can give me to get started as soon as possible, I will get to work on it so I can make some productive contributions soon. You might want to consider joining our mod team.Speak to Niektb or Hephasteon for assistance. Quote Link to comment Share on other sites More sharing options...
leper Posted March 14, 2014 Report Share Posted March 14, 2014 Have you already taken a look at the =getting started guide for programmers? If not check it out, especially the starter tasks linked from there. You might also want to take a look at the full ticket list if something that isn't explicitly marked as a starter task would suit you. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 14, 2014 Report Share Posted March 14, 2014 Basically, learning to program just requires a lot of time. Writing code that doesn't work, and then trying to understand why it doesn't work. Because of that, you need to pick something that really interests you.When you have chosen a task, you can always ask for help (and you should). 1 Quote Link to comment Share on other sites More sharing options...
niektb Posted March 14, 2014 Report Share Posted March 14, 2014 To summarize:- Decide what you do like most, since it is going to cost a lot of effort and time with ups and downs.You can either decide to come up with something of your own (Random Map Scripts, AI, Gameplay) or pick a task from the trac. http://trac.wildfiregames.com/query?status=assigned&status=new&status=reopened&keywords=~simple&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&report=16&order=priority- Ask for help when you run into problems or do not fully understand it.In doing so, you can either decide to place a topic here in which you explain what you are doing and your questions or ask someone directly by sending him a PM. Some tips:Make sure you get the source from SVN, since the alpha releases aren't very up-to-date.For instructions: http://trac.wildfiregames.com/wiki/GettingStartedProgrammersWhen writing out ideas think in terms of algorithms. What would be needed to achieve something? Which steps do you have to take? And so on. Quote Link to comment Share on other sites More sharing options...
Radagast. Posted March 14, 2014 Report Share Posted March 14, 2014 (edited) I support the points of my colleagues, especially it takes simply a lot of time and experience to a feel for how programming works just like Sander said.Once one got used to that, it's really no longer difficult, nevertheless, it might quickly turn into tedious work.Generally my feeling is that those guys and gals that take over university assistance jobs early and try to follow tutorials in different languages only to get magic projects done, are getting used to programming pretty quickly, especially if they are forced to program to not fail in university too (weekly exercise sheets... ).So as a quickstart:Start up Linux. The earlier you get used to UNIX-like systems (GNU/Linux, Mac OS, FreeBSD, Android, ..) the better. Because though Windows is powerful too, it's tedious to keep up to a commercial firms plans and changes to improve their funding. A problem UNIX not suffers from. STRG+ALT+T to show up the terminal/console (alternatively look for a search field and type term.. and there you go).Then in the terminal type:sudo apt-get install gitIf that's not working, search the internet for "install git <you_operating_system>". (<> indicates a placeholder, so there your OS goes without those <> !!) Follow the instructions. Another common usecase for <> is for elements/tags in markup languages like HTML, XML, sure you will hear more about that soon.Back with focus on the terminal, create a directory for 0ad in you home folder (shortcut: ~) and enter this directory using cd <path-to>/<directory>:mkdir ~/0ad/ && cd ~/0ad #this sign begins a shell comment, it's ended automatically at EOL End Of Line, which is denoted as \r\n (\rewind\newline) commonly but you don't have to care for that.Now try to download the git repository: (in the correct folder, . means the current folder we're in: ~/0ad/)git clone https://github.com/0ad/0adWait for the download to finish, in the meantime search the internet for "JavaScript tutorial" and "javascript syntax reference". It's probably the best language to start with as Java is almost identical and more and more widespread in university teaching.Once the download has finished successfully:Go to http://trac.wildfiregames.com/wiki/BuildAndDeploymentEnvironment . Type STRG+F , then Linux. Follow the instructions for building on linux (it's only a few commands! it's easy!).If successful, there you go:~/0ad/binaries/system/pyrogenesis #this will start your custom built 0adTip: Whenever you try to figure out a path or command in he terminal use the TABulator key! Type twice to list all possibilities, then pick one by typing the first letters and type TAB again to auto-complete.Once 0AD is started, first be surprised how much more advanced the up to date version is. Start any map, then type ALT+ENTER to switch to windowed mode (to allow to return to the terminal without closing 0ad).In the terminal:vi ~/0ad/binaries/data/mods/public/ #type TAB now to see a list of all folders and filesChoose the file you wish to edit:vi ~/0ad/binaries/data/mods/public/simulation/ai/aegis/aegis.jsLook for Line 95. Then type i to enter INSERT mode.Type ENTER once. Then type (not copy or you will never learn programming) in these brilliant lines of the famous Teiresias now:if (!this._counter){ this._counter = 1;}this._counter++;// Every 25 time we enter this onUpdate function/mthod we perform a special action:if ((this._counter % 25) == 0){ var myEntities = this.entities.filter( function (ent/*<-An argument also called parameter.*/) { return ent.isOwn(PlayerID); } ).toEntityArray(); if (myEntities.length > 0) { var sacrifice = API3.PickRandom(myEntities); this.chat("This time we had to sacrifice " + sacrifice.templateName() + " to keep our gods from sending another famine!"); sacrifice.destroy(); //<-- has to be called after the chat message as we need its template name for the message. } /* extend here if you like, you could pick another unit and make it walk around ... read through the aegis files in the directory this file here is in to find out how to do that. */}/*Or insert here some other code/commands. e.g. if you don't want to perfrom this action every 25th time like the above but each 100th time, then retype the above code and change 25 to 100 .*//* Here starts the original code of the AI.*/Exit INSERT mode now using ESC. (if you have left INSERT MODE you can also undo changes by typing u)To save the additions we inserted, let's save the file. (make sure you are no longer in INSERT mode via ESC).Then type the command for writing (colon w)::wTo save and quit you would write::wqTo quit without saving and hence lose all changes::q!The cool thing with JavaScript is, that it can be changed while 0ad is running. So you see immediately if something breaks. => Switch to 0AD via ALT+TAB or similar. Look what you've done.I think we can only gain if we really teach the new generation. Although many people forget thatNever take more than you give.Happy learning. Edited March 14, 2014 by Hephaestion Quote Link to comment Share on other sites More sharing options...
niektb Posted March 14, 2014 Report Share Posted March 14, 2014 I support the points of my colleagues, especially it takes simply a lot of time and experience to a feel for how programming works just like Sander said.Once one got used to that, it's really no longer difficult, nevertheless, it might quickly turn into tedious work.Generally my feeling is that those guys and gals that take over university assistance jobs early and try to follow tutorials in different languages only to get magic projects done, are getting used to programming pretty quickly, especially if they are forced to program to not fail in university too (weekly exercise sheets... ).So as a quickstart:Start up Linux. The earlier you get used to UNIX-like systems (GNU/Linux, Mac OS, FreeBSD, Android, ..) the better. Because though Windows is powerful too, it's tedious to keep up to a commercial firms plans and changes to improve their funding. A problem UNIX not suffers from. STRG+ALT+T to show up the terminal/console (alternatively look for a search field and type term.. and there you go).Then in the terminal type:sudo apt-get install gitIf that's not working, search the internet for "install git <you_operating_system>". (<> indicates a placeholder, so there your OS goes without those <> !!) Follow the instructions. Another common usecase for <> is for elements/tags in markup languages like HTML, XML, sure you will hear more about that soon.Back with focus on the terminal, create a directory for 0ad in you home folder (shortcut: ~) and enter this directory using cd <path-to>/<directory>:mkdir ~/0ad/ && cd ~/0ad #this sign begins a shell comment, it's ended automatically at EOL End Of Line, which is denoted as \r\n (\rewind\newline) commonly but you don't have to care for that.Now try to download the git repository: (in the correct folder, . means the current folder we're in: ~/0ad/)git clone https://github.com/0ad/0adWait for the download to finish, in the meantime search the internet for "JavaScript tutorial" and "[url=http://google.com/?q=javascript+syntax+reference]javascript syntax reference". It's probably the best language to start with as Java is almost identical and more and more widespread in university teaching.Once the download has finished successfully:Go to http://trac.wildfiregames.com/wiki/BuildAndDeploymentEnvironment . Type STRG+F , then Linux. Follow the instructions for building on linux (it's only a few commands! it's easy!).If successful, there you go:~/0ad/binaries/system/pyrogenesis #this will start your custom built 0adTip: Whenever you try to figure out a path or command in he terminal use the TABulator key! Type twice to list all possibilities, then pick one by typing the first letters and type TAB again to auto-complete.Once 0AD is started, first be surprised how much more advanced the up to date version is. Start any map, then type ALT+ENTER to switch to windowed mode (to allow to return to the terminal without closing 0ad).In the terminal:vi ~/0ad/binaries/data/mods/public/This looks good, but only applies to Linux users and for Git purposes, I don't know if the Git transfer is already good enough, better stick with TortoiseSVN for the time being. (And I thought Haskell was fancied in University? Not by students though) Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted March 14, 2014 Report Share Posted March 14, 2014 JavaScript will bite if you haven't learned about data types though. C++ is a good place to start. Unfortunately, I don't think any of the C++ here is suitable for beginners considering you'll most likely need some pointer knowledge.My recommendation would be to start with C++ or Java or some other reasonably typed language. Begin with simple "hello world" programs. Don't try to just dig into complex code until you understand the basics or you'll just get frustrated. It'll be at least a year or so before you'll be able to really read C++ on a game and a bit longer than that before you will really understand anything. If you can get some basics down, you will probably be able to tackle some simple tasks in our JavaScript in 6 months or so. You are developing a skill; it takes work and time. Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 15, 2014 Author Report Share Posted March 15, 2014 A lot to take in for me. But thanks for helping me out you guys. I really appreciate it. I'll get straight to it. Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted March 15, 2014 Report Share Posted March 15, 2014 Checkout some intro to programming tutorials. There are many available for free. The programming language used in the tutorials isn't too important - once you learn the basics, you can apply them to nearly all other programming languages that are in the same classification.Java is a "strongly typed language" that is probably the easiest to start with and provides almost all of the features you would need to learn about in C++ (except for memory management). There should be a lot of introductory tutorials available using Java. There are several IDEs (integrated development environment) available for Java. The Netbeans IDE (it's free) will do a lot of hand-holding to get you through syntax / grammar errors in your code. After you get the basics, you can either start learning JavaScript or go closer to the hardware and learn C++.By the way, Java and JavaScript are two completely different languages. The reason I don't really recommend JavaScript for new programmers (besides the weak data typing) is that it is such a freeform lanuage that inexperienced programmers can learn to write really badly formed code (ask me how I know, lol). Java will help instil some better design habits. C++ is alright also, but doesn't offer anything over Java for learning the basics and has many more pitfalls. You'll probably need to learn C++ eventually if you really want to do game development, but you won't have the skills to appreciate the advantage C++ has over Java until you are much more experienced anyway. Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 15, 2014 Author Report Share Posted March 15, 2014 Sweet. Will do. I am looking into them right now. I am so excited to learn and help you guys out. I appreciate all the pointers and I will see if I can write some basic code soon and soon hopefully some more advanced code. I don't own a Linux OS, I run Windows 8 on my phone and on my computer. I dont know of that limits me or not as to what I can do with writing code. 1 Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted March 15, 2014 Report Share Posted March 15, 2014 I personally like Ubuntu (Linux) better than windows, but if you've never used Linux before, you might want to stick with Windows for now. You can only learn so many new things at once.Windows is perfectly fine for programming in C++, JavaScript, Netbeans / Java, etc. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 15, 2014 Report Share Posted March 15, 2014 Windows doesn't limit you in your ability to code, but it does somehow limit you in what apps you can use to code. Like for compiling the game, we only support MS Visual Studio.And since you need visual studio anyway, you can start with C# too. It's like Java (strongly typed with automated memory management), but this way you'll also get to know the development environment you can use for C++ (and getting to know all sorts of debug tools is important too).In any case, all languages we mention: C++, C#, Java and JavaScript all have syntax that's based on C syntax. This means that their basic features all look very alike.int fac = 1;for (int i = 1; i <= n; i++){ fac *= i;}The example above is a (quite naive) method to calculate the factorial of 'n'. And it will work in all mentioned languages (except in JS, where you have to drop the 'int' types, as JS has no types). Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted March 15, 2014 Report Share Posted March 15, 2014 I agree with the C# recommendation. It's very similar to Java in style and would also be a good starting point. You'd have to use Microsoft Visual Studio for C# as Netbeans doesn't support it. MS Visual Studio is kind of expensive, but if you are a student in a technical program at a university, you can probably get it for free. There is also a limited feature MS Visual Studio Express Edition that is free for anyone. It should still have all the features you would need to get started learning programming. Quote Link to comment Share on other sites More sharing options...
Zeta1127 Posted March 15, 2014 Report Share Posted March 15, 2014 Ah, so with my solid foundation in C# and Java, I actually shouldn't have that difficult of a time transitioning into C++. I already knew this to a certain extent, but it is nice to see it reiterated. My main problem is I really need a job and to get my own computer with a proper programming set up in order to effectively contribute, because XP isn't going to cut it for anything other than older games for very much longer. Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted March 15, 2014 Report Share Posted March 15, 2014 The main difference is that C++ makes you clean up after yourself so to speak. If you allocate memory, you must manually free that memory in a destructor (opposite of a constructor). "finally" is the closest thing Java has to it, but that's not per class. Also you have really direct memory access with pointers that Java's reference variables don't allow. (Imagine adding an integer to an object variable and making it point to a different object.) Quote Link to comment Share on other sites More sharing options...
Romulus Posted March 15, 2014 Report Share Posted March 15, 2014 because XP isn't going to cut it for anything other than older games for very much longer. Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted March 15, 2014 Report Share Posted March 15, 2014 And it's free just pick a flavour of your choice with the desk top environment you like yeah that's a choice as well lots of Linux experience here to help you over the first ridges in the learning curve don't worry about all the chaff about spotty hardware support it's actually better than Windoze (you don't have to track down the manufacture's drivers).Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
David_J_Rogers Posted March 16, 2014 Author Report Share Posted March 16, 2014 I like that there is a lot of good responses. It makes me feel welcomed. Thanks you guys, does anyone have a particularly great tutorial source for writing code? Or am I on my own with that. I checked the web and there seems to be a lot of good ones. Thanks again. 1 Quote Link to comment Share on other sites More sharing options...
Radagast. Posted March 16, 2014 Report Share Posted March 16, 2014 Don't worry about all the chaff about spotty hardware support it's actually better than Windoze (you don't have to track down the manufacture's drivers).Windows: Intel IA-64, x86.Linux: Intel IA-64, x86, ARM (mega-widespread, Open standard, almost every smartphone), Analog Devices, Alpha, C6X, ETRAX CRIS, Atmel AVR32, Hexagon, H8, M32R (Misubishi), Microblaze (Xilinx), MIPS, MN103, OpenRISC, Power, IBM, PowerPC, SPARC, SuperH , Synopsys DesignWare ARC cores, S+core, Tilera, Xtensa, UniCore32.If you don't to lose all your work in the near future. Go with an open system.Someday you might want to reuse your programs on your anti-gravity laser optical quatuum non-screen-required hologram device. Now look at the list above, take the decision to your liking.Fear of Windows 9 losing compatibility? XP support was dropped (now university legally is REQUIRED to trash all XP systems)On the other hand there is our Archlinux, a bleeding edge system. Belongs to noone other than this planet. No more updates, live update / incremental updates only (event the kernel).To not get shocked at the beginning better start with Ubuntu, it's just like a smartphone platform and simply works. There binaries for everything. No compilation required. Simply asksudo apt-get install officeand it will ask if you meant LibreOffice. For editing DocX there is Docx4J upcoming.For TeX us TeXLive which integrates with LuaTex (use Lua for creating your documents) which will some day replace all TeX-specific commands.Okay, we've lost. Take Windows, because you have to use Windows for University anyway (as universities mostly have Windows installed, perhaps all those thousands of licenses are too cheap, noone really knows?).Use Linux in your freetime to feel morally fine, Earth's citizens have created it and will always help you out - even in future (programs from 30 years ago still supported without changes, e.g. perl, ..).If apt-get fails to install your program, don't worry, try again with:aptitude install blenderand it will resolve dependency issues if you say you don't like the default solution. It looks for more solutions until all is fine again. C# is a good choice indeed. So look for Visual Studio, get it, install it. Search for C# getting started. (it will probably even help with setting up C# environment)We are not angry if anyone does not like UNIX systems. Our principle is: no hierarchies, not even for Operating systems. it's everyone's freedom to choose. Just never stop asking questions and the reasoning behind decisions. That's all philosophers wish.Have fun. 2 Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted March 16, 2014 Report Share Posted March 16, 2014 There are quite a few good tutorials out there. If one doesn't work out, there are always others. You should also consider purchasing an intro to programming book (in what ever language you choose to start out with) as it would be more complete and structured. Read the online reviews at your favorite online bookstore to find a good one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.