Author Topic: Source Code?  (Read 24519 times)

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« on: July 05, 2010, 09:25:30 PM »
So, I've been poking around the forums, and i keep running across the problem of not having the source code. I assume that the updates and modifications to the game have been done through dll's then? I know a bit of programming, and if the right programs could be pointed out for C, then I might be able to help with the source code problem. (thumbsup)  

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Source Code?
« Reply #1 on: July 05, 2010, 09:26:36 PM »
ASM and hex editing of the EXE.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #2 on: July 05, 2010, 09:29:25 PM »
Oh, I see why it could be difficult to make improvements. Well, I have a lot of free time right now, I'd be willing to see if I could write up some basic source code. It would take a while, but I think its doable, since there is already a working version of the game.

Offline Moley

  • Jr. Member
  • **
  • Posts: 95
Source Code?
« Reply #3 on: July 06, 2010, 10:48:20 AM »
not to make it sound like that i'm trying to bring you down or anything, but that project has been tried many times... but feel fine to try where others have failed...
PS: don't complain on me "bringing you down"... im surprised sirbomber hasn't done any thing yet... :P
I HATE SPELLING!!!!!!
if i spell something or screw up grammer,
ignore it or tell me if you dont understand what i typed.

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Source Code?
« Reply #4 on: July 06, 2010, 12:25:55 PM »
If he does, I might be inclined to consider it spam.  I think it would be awesome if someone who claims to have the time took a shot at it.  Most of the people who tried it before didn't have the time and that is a big part of why it failed.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Source Code?
« Reply #5 on: July 06, 2010, 02:51:48 PM »
Quote
If he does, I might be inclined to consider it spam.
Being realistic is not spam.  You don't just sit down and rewrite OP2.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline evecolonycamander

  • Hero Member
  • *****
  • Posts: 602
Source Code?
« Reply #6 on: July 06, 2010, 04:00:00 PM »
we should make a count as to how many times the source code issue has come up.  
''The blight cant get us up here!''
-famous last words
--------------o0o--------------
Outpost 2: EoM project status: Re-planning

Offline Kayedon

  • Sr. Member
  • ****
  • Posts: 378
Source Code?
« Reply #7 on: July 06, 2010, 06:28:53 PM »
Quote
we should make a count as to how many times the source code issue has come up.
You should try reading the topic before replying.
"Trust me, I'm crazy."

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Source Code?
« Reply #8 on: July 06, 2010, 07:46:31 PM »
Most of the edits have been added into the EXE by way of using the padding between functions or other unused areas in the .text section.

Some of the more major ones were placed into a DLL, op2ext.dll (we forced this DLL to be loaded by some modifications to the IAT in outpost2.exe) and are applied via memory edits from within DllMain.

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Source Code?
« Reply #9 on: July 06, 2010, 10:58:00 PM »
lol, I was kidding around at your expense bomber.

Anyway, re-coding the game entirely would be VERY beneficial to new modifications, which is why I'm hoping it works out (it would be nice to have the mapper openable in OP2)
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Source Code?
« Reply #10 on: July 06, 2010, 11:13:43 PM »
That would probably not be too hard.  Wayback when, didn't clicking the Internet button in the multiplayer menu open up OPUTool?
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #11 on: July 07, 2010, 09:42:18 PM »
As far as time, I have plenty of it. I just got back from deployment, so I am on leave for a few months. The only thing i can think of hindering me is not knowing which programs to use for the coding. I would love to see what could be done, with all the ideas here, with the actual source code.  I am willing to devote my more than substantial computer power to this project. Besides, it could be fun?  :P  

Offline evecolonycamander

  • Hero Member
  • *****
  • Posts: 602
Source Code?
« Reply #12 on: July 07, 2010, 10:04:40 PM »
Quote
Besides, it could be fun?  :P
seems more like a tedious, but rewarding job (thumbsup)  
''The blight cant get us up here!''
-famous last words
--------------o0o--------------
Outpost 2: EoM project status: Re-planning

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Source Code?
« Reply #13 on: July 08, 2010, 12:13:15 AM »
Quote
As far as time, I have plenty of it. I just got back from deployment, so I am on leave for a few months. The only thing i can think of hindering me is not knowing which programs to use for the coding. I would love to see what could be done, with all the ideas here, with the actual source code.  I am willing to devote my more than substantial computer power to this project. Besides, it could be fun?  :P
"The only thing i can think of hindering me is not knowing which programs to use for the coding." In other words, you don't know anything about programming?

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #14 on: July 08, 2010, 02:35:46 AM »
On the contrary, I know a lot about programming. I just dont know C very well. Never had to program with it, so I dont know what the best programs would be to use.

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #15 on: July 11, 2010, 10:03:12 PM »
So, Im curious on what the general opinion is as far a a programming language. I have fairly extensive experience with java, and would feel more comfortable writing the code that way. However, I do have some programs for C. I was wondering what people would prefer, Java or C?

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Source Code?
« Reply #16 on: July 12, 2010, 01:59:45 AM »
Up to you really. Lately I've been looking into D (Digital Mars D).

Java seems alright as a language, but I've always hated the JVM. It takes way too long to load up, consumes huge amounts of memory, which really kills performance on low memory systems, and generally isn't all the speedy for CPU bound tasks. Although people will always try to tell you otherwise on that last one, while simultaneously ignoring the other problems.

I think C and C++ have had a good run, and are certainly capable of writing fast code, but they have certain maintenance issues as programs get large. The split between header files and source files can be annoying, where you have to write a lot of things twice, and update them in both places should you ever need to refactor code. Use of the preprocessor is also a bit sick, and trying to get includes right can sometimes be difficult. The usual header file guards are annoyingly verbose for such a common problem. In short, a lot of things that a computer would be really good at figuring out and doing are pushed onto the programmer. Templates are nice, but error messages involving them are near impossible to read. The standard library for C and C++ are horrid. I hate the naming conventions used, I hate null terminated strings, I hate the security (and reliability) flaws inherent in so many of the original standard library functions. The standard library issue is probably one of the big reasons why a lot of people switched to Java. There is some degree of portability in the standard library, if you can bring yourself to use it, for certain common operations like file access. The basically raw sockets interface is very similar on Windows as it is to Unix/Linux, so you can kind of get away there. You are often encouraged to use the more modern Cout style functions, but these can be a lot slower than the printf style functions (and in some cases I've heard, slower than Java can perform). I often just avoid the standard library, as the Windows API is much nicer to write for, and works faster, but is not portable. I've heard a comment stating C and C++ are probably the least portable of the "portable" languages. ;)

I'm liking a lot of the cleaness with D, and the ability to write native code, plus good support for newer and higher level constructs. The Tango library (unofficial standard library) has a lot of really well thought out APIs, and the core language design also seems really thought out. The language is still a bit new though, and it can be a pain to setup the compiler. You also end up having to learning a new language before you can really do anything, and not many other people know it so it's probably harder to find someone who can help. There are a lot of interesting articles in relation to the language, and some very academic papers that are a great read if you're into that sort of thing. There is also a book "Learn to Tango with D" with is pretty well written. It covers the base language features well, and some parts of the Tango library, but I still feel like I lack general knowledge on how to use it's API to just get stuff done. It's a language I've been watching, but I'm not sure if I'd be ready to recommend it yet. Although, it seems like the install issue has gotten a bit better since I first dabbled with the project. There are compilers available for Windows and Linux. During install, there was a suggestion to install it in a path without spaces in it (which kind of annoys me).

I hear good things about C# as a language. I don't know too much about it though. It also sounds like it's cleaned up a lot of the issues with C and C++. I get the feeling it's a little more Java like in that a virtual machine is (usually?) used to run the code though. I've heard of performance issues, although, not frequently. I think I've heard stuff to suggest you can do native compiles, but I don't really know. I could easily be wrong about that. It was initially more of a Microsoft/Windows thing, but I've heard about a Linux compiler and runtime system that now exists for it. Probably worth looking into, but I've yet to bother. I've kind of stayed away from anything .NET. My experiences with Java inefficiency have taught me to fear what the underlying idea seems to be.


Kind of seems like there is no silver bullet language. Either which way it seems like there is something disappointing. The reason I've been liking D lately, is because the disappointing aspects of it seem mostly related to it's newness. I suspect as time goes on, and the language/compiler/packaging improve, the few things that annoy me about it will be resolved.
 
« Last Edit: July 12, 2010, 02:19:19 AM by Hooman »

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Source Code?
« Reply #17 on: July 12, 2010, 03:02:32 PM »
Aren't most coding languages used today based on C/C++?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #18 on: July 12, 2010, 07:40:59 PM »
Not all of them are based on the C's, but a few. are There is one language that I know, really new, that is amazing, but very few computers can run it. I have heard good things about D, but don't have any experience with it. Yes, C#is supposed to be the easier to use version of C/C++, but I don't much like anything C for something like a game, seems too great lumping messy.

I'll take a look at using D, but then my next question would be, what about the mods? Everything else would have to written in D as well, I would think, not sure about D's compatibility with other languages.

Also, Ill take a look at using the language I work with, but I dont know how well the translator would work for a game, never tried it. Some things to mull over with a nice glass of bourbon  B)  

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Source Code?
« Reply #19 on: July 12, 2010, 11:04:36 PM »
Quote
Not all of them are based on the C's
Hence why I did not say all :P
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #20 on: July 13, 2010, 11:13:11 PM »
So im going to go ahead and attempt this project. Ill be using C# and the Spring engine. Looking at the failure of other projects, I've decided to not post all my updates. I will post major things, but it'll be kept under wraps for the most part. Help would be appreciated with the graphical design, as Im not a good graphical artist  :blink:  

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Source Code?
« Reply #21 on: July 14, 2010, 12:05:33 AM »
Quote
I'll take a look at using D, but then my next question would be, what about the mods? Everything else would have to written in D as well, I would think, not sure about D's compatibility with other languages.
D is supposed to have pretty good compatibility with C, and I believe COM objects also work. It probably wouldn't handle C++ classes too well though, as I don't think the D classes support the same ABI (Application Binary Interface). But then that's kind of common. Almost everything is somehow compatible with C, which means you can probably mix and match with any language that is.

A lot of languages have been based on C, or at least influenced by it. Notably, for this thread, C++, C#, Java, and D. There also also C influences in languages that aren't really based on C, like the printf function in Ruby. Some languages that weren't based on C would include Basic, Python, Haskell, Prolog, and some of the really old languages (predating C), such as Fortran and Lisp. You can probably trace more languages back to C than any other language (which weren't a precursor to C, and hence by transitivity is also a precursor to all languages that derive from C).
 

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #22 on: July 15, 2010, 10:37:30 PM »
Something interesting as I slowly disassemble the DLLs, there really are four cheats. I havent found what they are, but in every game that Ive taken apart, four cheats are initialized. Also, yes, I have started working on this project. I am currently in the process of breaking and disassembling the DLLs as best I can, but large parts of code get garbled, though surprisingly, they can still be unscrambled. Let me just say, the over all programming is so basic and elementary compared to anything today, that I believe, knowing what we do today, a monkey could write this code.

That being said, I would also like to state that I am not dissing OP2  :D  Its just that it could have been designed so much better, even for when it came out. As in my last post, I am using C# and the Spring engine, though I am playing around with the idea of maybe using Java, maybe even something like Python. Well, thats all for now, more news as it comes  (thumbsup)  

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Source Code?
« Reply #23 on: July 15, 2010, 11:18:06 PM »
Why does everything you just said seem so familiar?
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline ImpulziveMyztikalGuru

  • Newbie
  • *
  • Posts: 29
Source Code?
« Reply #24 on: July 15, 2010, 11:29:46 PM »
My guess is my cousin. He apparently tried to convert the entire game into a completely incompatible programming language, and failed horribly. But he was telling me he was talking to somebody about his little "project", about the code and what not, so that is my guess why it seems familiar. Hes a good kid, he just knows jack about programming  :D