Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Modding C&C 3 and Creating Video games  (Read 3137 times)

0 Members and 1 Guest are viewing this topic.

valeryk

    Topic Starter


    Rookie

    Modding C&C 3 and Creating Video games
    « on: March 04, 2012, 07:19:55 PM »
    I have sort of modded before C&C 3 and loved it because it was so simple, but it was only xml understanding as it turns out. So I was wondering, is it possible to create a mod for this game using Python? I hear it's one of the simplest object oriented languages to learn.
    Second part of the question is what language best used if I wanted to create a video game for Linux like Ubuntu?
    Thanks for any tips and hints and whatever help you may suggest :)

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Modding C&C 3 and Creating Video games
    « Reply #1 on: March 04, 2012, 08:47:38 PM »
    Although it's not your entire question, part of your question seems to be "Which programming language should I learn first for creating a Linux game?".

    Think of it though. This is sort of like a aspiring painter asking "Which kind of paints should I learn to use first?"; and, no doubt, in threads like this people don't hesitate to jump in and do the metaphorical equivalent of recommending that the Original Poster should "learn watercolour, it's the easiest" (Learn programming language X because it is 'easy') or "Learn Oil-based paints, the greatest artists all use it"  (Kernighan and Richie invented C) or the entirely redundant "The sistine chapel was painted using fresco" (Excel is written in C++!).

    It is all missing the point. The entire purpose of a programming language is to get the computer to do things. Programming languages vary in power- Java is weaker than C# (C# has delegates, lambda's, proper event handlers, etc) and D is more powerful than either of them, with support for static if's and strong metaprogramming support. Lisp is indebatably the most powerful programming language since it is, to programming languages, sort of what Mathematics is to most of the other sciences. A base, pure form that all others aspire to. many of the more powerful features of Lisp are only recently finding their way into popular programming languages.

    That, however, is not a recommendation to learn Lisp. Everybody who works with programming languages has a favourite. My personal favourite at the moment is C#.

    Let's take an example. Let's say somebody recommended you learn Java. regardless of the reasons, this is entirely subjective; there really is no better reason to learn java compared to any other language. In their mind, Java is better only because they are better with Java; they can look at less powerful languages like C and wonder "how could I ever get along without Objects?" but when they look at a more powerful language, they see constructs they are not familiar with; for example, many Java programmers I know don't like C# because it's "weird"; but it's only weird because they don't understand the constructs. They've essentially gotten used to their language of choice; if it's worth having, it's in their language, and if it's not in their language of choice, it's not worth having. Too often when I note the existence of C#'s delegates,events operator overloading, etc to a Java programmer, they will note "But that's not pure OOP" or "but why would I want to do that?", or "operator overloading is dangerous!" The first is a cop out- OOP is not some sort of end-all be all of programming languages and if anything the cost of maintaining a Triple-tiered Application framework based on clean Object Oriented design is at least as much as a standard procedural solution, by virtue of so much of the OOP code being boilerplate cruft. The second is nothing more than an expression of ignorance; just because you cannot immediately see an application for a given concept does not make that concept useless. The third, is equally silly because arguably with any amount of power there is additional responsibility to use it properly. If you litter your classes and code with operator overloads that make no sense, than, yes, it's dangerous. But once you understand what is going on and how best to implement them your code becomes cleaner and easier to read.

    Anyway, my position on the question of "What programming language should I start with" has usually been that they should stop asking and start doing. You can ask 12 dozen different forums which programming language you should start with and get 12 dozen different recommendations, but those aren't going to actually get you to learn any of those languages- you have to start, and overall, it doesn't matter what you start with.

    Python is a powerful language that supports, as you said, Object Oriented Programming. It lacks a few OOP concepts but again OOP isn't some sort of be-all-end-all thing; additionally, most programming languages that claim to be "fully object oriented" don't support even a tiny fraction of what should be required for a fully Object Oriented Language. Another nice thing about Python is that it doesn't force you to write in an Object oriented fashion. in java or C# everything has to be a class or object, but with python you don't have to write your main routine as a class.

    Once a person recognizes two facts- the first being that programming languages vary in power, and the second being that if you are unfamiliar with a concept it will seem foreign,the sooner a person can realize that it doesn't really matter what programming language they are starting with, they are going to have to deal with something that seems foreign. I often also hear people say that "programming languages are designed for computers". But that's nonsense. A Computer cannot understand python any better than it can understand English. Programming languages are designed for use by people, and are translated by other programs, either through compilation or interpretation, into the one true language that the computer understands- machine code.

    Another interesting but pointless debate that often springs up is the debate between "interpreted" and "compiled" languages, with proponents of compiled languages claiming that an interpreted languages can "never" reach the speed of a well-written compiled language. And that may be true, but the same argument came up between Machine code and compiled languages, with proponents of machine code saying that the compiled languages could never equal the performance of hand-tuned assembly or machine code. And that is true as well. But what both fail to realize is that the absolute speed at which a program ones is less important than the trade-off in development time that it takes to reach that speed. Is it really worth it to work 10 times harder on a C application rather than a Python script to gain a speed boost of 10%? That depends on the context. if it's a function called a bajillionty times in a CPU intensive loop, than it might be worth it. But for most applications that time is better spent adding features to the application rather than focussing on speed.

    I seem to have rambled a bit there but I hope it helps at least.
    I was trying to dereference Null Pointers before it was cool.

    valeryk

      Topic Starter


      Rookie

      Re: Modding C&C 3 and Creating Video games
      « Reply #2 on: March 04, 2012, 11:31:30 PM »
      So any programming language can be used to mod any video game? How about Linux/ Ubuntu, any programming language works the same on there as on Windows? But yes, you have cleared up the barrier, it's just that I don't know what languages exactly exist, just from reading and searching I hear about these new languages like Python and Lisp, but I don't know anything about them, and there are plenty more of those programming languages. I know of web developing and programming languages, PHP, JavaScript, CSS, and HTML. But besides the point, I guess I need some kind of guidance like everyone else into some direction of any language to start learning. Obviously as you stated that we will like that language that we start learning and spend majority of our time with. In the end I guess my question is , what language to learn that I can use to make mods for games and also later on make actual games for Ubuntu.

      I chose ubuntu because it is an OS that deserves more than it gets. But then again, I guess majority but not all questions could be answered by using google. So back to the first question up top. :)

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Modding C&C 3 and Creating Video games
      « Reply #3 on: March 05, 2012, 01:27:19 AM »
      So any programming language can be used to mod any video game?
      No. It depends on the game. A Java game- for example, minecraft- would have to be modded using Java. However, a mod could be created, in java, that interfaced  with a .NET assembly or something.

      Most games are written in C++, and compile to machine code, so the only real modding you can do would involve either directly manipulating that machine code, or, more commonly, using whatever tools and configurations the game creator provides.

      Quote
      How about Linux/ Ubuntu, any programming language works the same on there as on Windows?
      Not "Any", No; but any language worth using works on a variety of platforms. Those that don't often have attempts to bring a similar language to it. For example, VB6 usually only works on windows, but there is a program called "Gambas" that runs on Linux that provides a similar toolset and language.

       
      Quote
      it's just that I don't know what languages exactly exist, just from reading and searching I hear about these new languages like Python and Lisp
      Lisp was created in the early 60's, so not really that new. It was one of the earliest hkigh-level languages. Python was around mid-90's, and given the age of computer science, that's still quite a while ago.

       
      Quote
      what language to learn that I can use to make mods for games and also later on make actual games for Ubuntu.
      There is no "mod language". Each game will expose it's innards to mod developers using a different scripting language. many games use Lua, but some lothers use python. Still others use a custom script language, like "RealScript" for the unreal engine. Some don't expose themselves at all, in which case, if you are lucky, they are written in a language with some sort of introspection capability, such as Java or a .NET language. Minecraft mods, for example, are essentially extra class files and hacked class files that add and replace existing classes in the game, adding new blocks or items or whatever. If the game compiles to machine code- and most do- that means that you would need to understand how to dissassemble the file, as well as how to read uncommented assembly language.

      As for languages that could be used for making games on Ubuntu. The list of languages that you can't use to make games in Ubuntu(or any OS, for that matter) would be perhaps a dozen, and that is a liberal estimate.

      I was trying to dereference Null Pointers before it was cool.