Pages: [1] 2
|
|
|
Author
|
Topic: How do I actually view the UQM source code? (Read 5604 times)
|
EHO
Zebranky food
Offline
Posts: 6
|
Hi All,
I'm getting into programming and thought it would be neat to get to pick through the UQM source code to get a better idea of how the original team built their game (SC2 was an all time favorite with me and my gaming buddies back in the day (yes, I'm getting old!) so I'm excited to check this out).
How do I actually open the uqm-0.7.0-source.gz file that I'm able to download from the uqm-0.7.0-source.tgz link on the Downloads page? (Is that OK that it downloaded as a .gz file and not a .tgz as named in the link on the Download page? That struck me as a potential problem).
I've been using Dev C++ for some other programming exercises. The most recent version of the SDL I've found for that is 1.2.4. Does anyone know how I can use the 1.2.14 version in Dev C++ that's required for use with UQM 0.7.0? If I'm not able to use Dev C++, can anyone recommend another compiler?
Thanks in advance for any help you can offer
|
|
|
Logged
|
|
|
|
Quinarbre
Frungy champion
Offline
Posts: 60
|
Hi,
First of all, what's your current level in programming ? If you're quite new to it, then the UQM source code is probably not the best option. It's scattered over 600 code and header files, and I'm not even not counting the custom libraries. At best you could find some functions that are quite easy to understand as standalone routines, but you'd have to search for them in quite a haystack. On the other hand, if you're getting into separate compilation, then it's interesting to look at and quite well organized.
Anyway, to open a .gz file, use for instance 7zip (assuming you're using windows). MSVC is known to be usable to compile UQM, I don't know about Dev C++.
|
|
|
Logged
|
|
|
|
EHO
Zebranky food
Offline
Posts: 6
|
Hi Quinarbre,
Thanks for the tip on 7zip. I had tried something called gzip but it apparently didn't want to run on my machine (yes, a PC)? Not quite sure what it was up to!
7zip appears functional for me.
Unfortunately when I try to extract the source file, I get an error in 7zip stating "Data error in 'uqm-0.7.0-source'. The file is broken". Even though I close the extraction, it does create a folder and extracted file. The extracted file has no file extension. What type of file should extract out of the process?
600 code and header files sounds pretty complex for my skill level! That said, this is probably exactly why I'd like to have a look at the code. I'd like to see just how complex a game of this nature can be. Exploring something outside of my comfort zone should teach me a few things. Also, SC2 is one of my all time favorite games so I have a high level of intrinsic motivation to try and figure a few things out from this.
Thanks
|
|
|
Logged
|
|
|
|
Alvarin
Enlightened
Offline
Gender:
Posts: 801
|
I have absolutely no knowledge of the code, but just wanted to wish you good luck.
|
|
|
Logged
|
|
|
|
onpon4
Enlightened
Offline
Gender:
Posts: 709
Sharing is good.
|
I don't know your C or C++ level, but it sound like you're not familiar with UNIX or UNIX-like OSes. If you're learning C or C++, I would STRONGLY encourage you to do it on a UNIX-like OS (i.e. Linux). Both C and C++ are pretty much made for UNIX and compiling code on Windows is a huge hassle.
Also, if you're completely new to programming, it's just my opinion, but I don't think C is a good starting point. Start with an easier, high-level language. Python is what I'd recommend, but I'm biased. You might also want to try Ruby or Perl (I'm not familiar with those, so I can't recommend them). Heck, even C++ would be much better than C, if only because you'll learn object-oriented programming.
As has been said, the UQM source isn't a good place to start. It's all over the place (split into tons of source files that are tough to follow) and extremely lacking in comments. Of course, it might be worth looking at, but the vibe I get is that you're a beginner, in which case it isn't going to be helpful.
Regarding 7-Zip, I'm not sure, but it could I suppose be that the download wasn't finished or something. Maybe try re-downloading the source or something? Regarding the one extracted file, in UNIX, plain text files usually don't have an extension (Windows uses the extension ".txt"). If it's a text file (though it might not be; it could be a Linux binary as well), you can open it with Wordpad.
|
|
« Last Edit: December 28, 2011, 05:24:20 pm by onpon4 »
|
Logged
|
|
|
|
|
|
|
|
EHO
Zebranky food
Offline
Posts: 6
|
I don't know your C or C++ level, but it sound like you're not familiar with UNIX or UNIX-like OSes. If you're learning C or C++, I would STRONGLY encourage you to do it on a UNIX-like OS (i.e. Linux). Both C and C++ are pretty much made for UNIX and compiling code on Windows is a huge hassle.
Also, if you're completely new to programming, it's just my opinion, but I don't think C is a good starting point. Start with an easier, high-level language. Python is what I'd recommend, but I'm biased. You might also want to try Ruby or Perl (I'm not familiar with those, so I can't recommend them). Heck, even C++ would be much better than C, if only because you'll learn object-oriented programming.
I am pretty novice however I'm actually strongest with C++ having taken a beginning course in it. I've used Python a bit but really prefer C++ having had that class.
I'm in the process of having to reinvent my career (yet again!). I'm looking to take some more programming courses to make myself more marketable for technical jobs. If I were to earn a certificate through the local university extension program, does anyone have any advice on what languages are most marketable?
Thanks for the tip on Unix based OSs... that seems to be very relevant for embeded systems, correct?
|
|
|
Logged
|
|
|
|
|
EHO
Zebranky food
Offline
Posts: 6
|
Wow, that looks more useful. Is that all of the files and content then? Now I'm getting more confused!
|
|
|
Logged
|
|
|
|
|
|
|
Pages: [1] 2
|
|
|
|
|