what language should i use to

This is a discussion on what language should i use to within the Game Programming forums, part of the General Programming Boards category; What language should i use to make little games? like a language that is easy to make games for....

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    2

    Exclamation what language should i use to

    What language should i use to make little games? like a language that is easy to make games for.

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Depends on what you mean by "little games".

    Text-based games? Almost any language will do, although a simple scripting language or something that offers a nice text manipulating library would probably be nice.

    Perhaps 2D games? This is personal preference depending on a few things. If you're not very good at memory management and never remember to free() what you malloc() or delete/delete [] what you new, a languague like Java might be easier to work with if you're interested in focusing on concepts as opposed to language details. Java, though, suffers from a lot of setbacks, so it's trade off.

    If you can take care to clean up memory, and pointers and such are not a hard concept for you to understand, then both C and C++ are well able to do what you need, although I would recommend using some library like SDL or Allegro if you go that route.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    Why would you ask this on a board devoted to the C/C++ language?

    Perhaps you already know the answer.

  4. #4
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Quote Originally Posted by roobert
    What language should i use to make little games? like a language that is easy to make games for.
    Experiment around with different languages until you find one you like. That's what I did and why I picked C++. I just couldn't get used to any other language.

  5. #5
    Registered User mmarab's Avatar
    Join Date
    Jul 2007
    Posts
    30

    Talking

    If you have some programming experience but not much, but would like to create a game simply and quickly. Then Java is a good place to start, as it will allow you to get into programming and hide some of the complexity like memory management. Although you can play about with the garbage collector or force it, but that’s not important to you. I re-created the Mega-Drive computer game Streets of Rage 2 in Java, work great. Did it for my final year project at UNI. Plus java is fun.

  6. #6
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Most common:
    [Language] C++/Delphi/Pascal/Python [Library/Technique] Console/DirectX/OpenGL/SDL

    Plus mostly for web:
    Java
    Flash
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  7. #7
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Quote Originally Posted by mmarab View Post
    Although you can play about with the garbage collector or force it,
    You can't force the GC, at best you can hint it (and doing so is usually counterproductive in that it forces the GC to (if it runs on the hint at all) perform a full GC cycle rather than an incremental GC cycle, consuming unnecessary CPU cycles, and can be forcibly ignored through JVM configuration).
    Just about the only time you may want to do that is when you have an application that you know will require a lot of memory for a longrunning operation. Just before consuming that memory you might want to try and get the GC to run so you have as much free RAM as possible, hopefully reducing GC overhead during that expensive operation.

    Quote Originally Posted by mmarab View Post
    Plus java is fun.
    It is, and productive as well.

  8. #8
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Quote Originally Posted by jwenting View Post
    You can't force the GC, at best you can hint it (and doing so is usually counterproductive in that it forces the GC to (if it runs on the hint at all) perform a full GC cycle rather than an incremental GC cycle, consuming unnecessary CPU cycles, and can be forcibly ignored through JVM configuration).
    Just about the only time you may want to do that is when you have an application that you know will require a lot of memory for a longrunning operation. Just before consuming that memory you might want to try and get the GC to run so you have as much free RAM as possible, hopefully reducing GC overhead during that expensive operation.
    Indeed. I have software I'm developing in Java that I wanted to take advantage of some.... -- perhaps I could call them "bizarre features" since they might be better implemented in a different way -- that require garbage collection. I find it annoying that I can't manage memory myself in Java, and I can only ask for the cleanup to possibly, maybe, perhaps, be attempted.

    If Java had a way to manually delete an object, that would be nice.

    I have to say, though, everytime I've asked the system to perform a garbage collection, it's appeared to work, and the necessary objects/classes appeared to be unloaded. I know this should not be relied upon, but I figure if it works... hey it works. If it doesn't, then it doesn't.

  9. #9
    Registered User mmarab's Avatar
    Join Date
    Jul 2007
    Posts
    30
    Example of kind of forcing garbage collection but using runtime: But i agree, using something like System.gc() is just a hint, and it does not guarantee immediate action, but actually it could slow your app down.

    Code:
    /*
    * This Java program shows you how to force garbage collection
    * Author: Megh Thakkar
    */
    public class CollectGarbage {
    
       int ASIZE = 1000000;
    
       void useMemory() {
    
          int[] intA = new int[ASIZE];
    
          for (int i=0; i<ASIZE; i++) {
            intA[i] = i*2;
          }
    
       }
    
       public static void main (String[] args) {
    
          CollectGarbage gct = new CollectGarbage();
    
          // Get a Runtime object
          Runtime r = Runtime.getRuntime();
    
          // Collect garbage at the start of the program
          r.gc();
    
          // Let's see how much memory we have at the start
          long availMem = r.freeMemory();
          System.out.println("At program start we have : " + availMem + " bytes");
    
          // Let's use some memory
          gct.useMemory();
    
          // Let's see how much memory is left
          long availMem1 = r.freeMemory();
          System.out.println("After running the program, 
    we have :  " + availMem1 + " bytes");
    
          // Collect garbage
          r.gc();
    
          //Let's see what we have now
          long availMem2 = r.freeMemory();
          System.out.println("After collecting garbage 
    we have :    " + availMem2 + " bytes");
    
          long freedMem = availMem2 - availMem1;
          System.out.println("Garbage collection 
    freed :    " + freedMem + " bytes");
    
    
       }
    }

  10. #10
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    I've been working professionally in Java for almost a decade and never missed the ability to explicitly handle memory...

    The reason why calling Runtime.gc() slows down your system (usually momentarilly) is the heavy operation it triggers (if it triggers anything of course).
    When letting the JVM do its own thing it runs at a constant trickle in the background, consuming only spare CPU cycles when it can and not pushing itself into the limelight unless it has to.

  11. #11
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Quote Originally Posted by mmarab
    Then Java is a good place to start, as it will allow you to get into programming and hide some of the complexity like memory management.
    You can do the same under C++. You just either have to find a garbage collector library or code your own.

    http://www.hpl.hp.com/personal/Hans_Boehm/gc/
    http://www.devarticles.com/c/a/Cplus...r-C-plus-plus/

  12. #12
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    but why go to the trouble when Java has one built in as standard that just works?

  13. #13
    Registered User
    Join Date
    Jul 2006
    Posts
    162
    use macromedia flash, it has an OOP oriented IDE and such, blabla. :-) tons of tutorials, etc etc... most games around the net are flash or shockwave so you see it's popular.

    ActionScript is pretty much JavaScript just OOP and added language features.

    It's far simpler than doing such a project with the same potential in c++ without the extra work. Flash can hand all sorts of audio files for you, and all that mess. You really just focus on game logic in Flash, you also should be patient with flash, it has a learning curve as well.

    flash also has 3d capabilities, so you can display models and adjust the camera, etc....

    Java won't look or work as nice as flash apps right away*, both java and c++ applications will require an obscene amount of "messaging" just to -render- the graphics as flash already does.

    in flash you just worry about putting all the resources together, and as i said, game logic.
    Last edited by simpleid; 08-15-2007 at 07:42 AM.

  14. #14
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    use macromedia flash,
    I agree. I've seen many simple flash games.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  15. #15
    Registered User
    Join Date
    Jul 2007
    Posts
    20
    if you look at modern games like forza motorsports 2 on the 360. what language is that made in, does anyone have any ideas

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 01:40 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  5. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 05:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21