Thread: C or C++

  1. #16
    Registered User AcerN30's Avatar
    Join Date
    Apr 2008
    Location
    England
    Posts
    32

    Question

    You mentioned a keyword there, project files / linking ?

  2. #17
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Yes. If you are going to have a go at sdl theres a tutorial for this here:
    http://lazyfoo.net/SDL_tutorials/lesson01/index.php
    Which covers setting SDL up and linking it with many different operating systems and IDEs.

  3. #18
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    I think Acer might be more interested in a game engine rather then doing everything by hand.

  4. #19
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Do you know what SDL is?

  5. #20
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    Yeah, but I meant a higher level application game engine.

  6. #21
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    SDL is a great tool much like OpenGL and Direct3D. However it is just like all other tools in software and in any other field. You must know how to utilize the tool in order to be effective with it.

    I tire quickly of suggestions to use this or that API solely based on the fact the the OP does not have a grasp of the fundamentals of the language. Please do not use A or B API just to stay away from the nitty gritty or because you don't want to learn. If you do this I guarantee you utter failure. Do this the right way and learn the language top to bottom. Then learn 2D or 3D concepts top to bottom. Then you can make the choice of which API you will use to aid you in creating your game. Doing this in any other order is just a recipe for disaster.

    I find it very disturbing that some of our members continually suggest this or that API to people and claim it's easy or keeps you away from the hard stuff. Game programming is hard. Graphics programming is hard. 3D graphics programming is extremely hard. If you are trying to avoid the learning curve you are already going down the wrong path.

    1. Learn the language. Learn the concepts.
    2. Learn about game code through coding, books, internet, etc.
    3. Learn about 2D/3D through coding, books, internet, etc.
    4. Once you have a grasp of these things you can then choose your API.

    None of us here have created anything that I would call a 'complete' 3D game. It is not a simple task to undertake even if you know the language very well and also know your API very well.

    We could show you all manner of matrix transforms, C/C++ code, HLSL code, etc, but it would blow you away. It's too much and we could never explain it all here. Take the advice of the members here who have told you to take it slow and learn the language. I'm not saying don't code. Quite the contrary I would code as much as possible to complement my research and learning. I do not recommend getting your hands on a 3D engine and trying to wedge your own stuff in without knowing how it all works or at least the fundamentals of how it works. You will just get frustrated and probably quit. Be fair to yourself and be fair to the breadth of the information that is out there. Trying to code a 3D or even 2D game with no knowledge is not fair to yourself. Go slow and eventually it all starts to come together and make sense.

    Please do not take our advice as just negativity. We, more than anyone, want you to learn and want you to succeed. However we see your kind a lot here and usually they die off in a few months. Enthusiasm is great but it won't keep you. Enthusiasm tempered with reality and facts will keep you going depsite the problems you may encounter. If you need assistance these forums are a great place to get help provided you have attempted programming and/or shown at least some effort. I wish you well on your journey into game programming. In the end it's fun and very rewarding. Just make sure you have a huge Tylenol or Advil bottle with you because there are many headaches down the road.
    Last edited by VirtualAce; 04-30-2008 at 07:58 PM.

  7. #22
    Registered User AcerN30's Avatar
    Join Date
    Apr 2008
    Location
    England
    Posts
    32
    Thank you Bubba, I'm not a full on programmer.

    I've done little of vb. I am trying out 2d gfx as it is easier.

    For windows mobile. 2D game.

    I'm also actually trying to move away from computers in a technical manner.

  8. #23
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by AcerN30 View Post
    I'm also actually trying to move away from computers in a technical manner.
    Boggles the mind. Are you going back to beads on a string or just using your fingers?

  9. #24
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    Visual Basic = weak sauce

    Like everyone else has said so far, you need to learn the language of C or C++ before you get into graphics using either of those languages. You can find several good books at bookstores all over the place.
    My Website

    "Circular logic is good because it is."

  10. #25
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    I think even microsoft is trying to get people to move away from visual basic. I read somewhere that they intend to discontinue development of VB in 2012 and stop support in 2020. Not sure if it was a MS website or someone elses, btu I do know they intend to deprecate VB in the not too distant future.

  11. #26
    Registered User AcerN30's Avatar
    Join Date
    Apr 2008
    Location
    England
    Posts
    32

    Question

    Oh well since I learned VB at college very little.

    You get my drift?

    Stick with it, and continue since it is slightly easier and there is only that for WM. That has no hassles.

    If I wanted to do C how do I get the buttons to work?

    For anyone who has done pocket programming, you click on the form in VS and click on the buttons, type your code etc. Done and dusted!

    And then there is palm ?

    I read that there is a c compiler for palm, so you could program on the device....



    But again all that issue of having a "mobile template" for a device just complicates things.

    Please do not use A or B API just to stay away from the nitty gritty or because you don't want to learn. If you do this I guarantee you utter failure. Do this the right way and learn the language top to bottom.

    Even focusing on just what you want to learn? Is that not possible?
    Last edited by AcerN30; 05-02-2008 at 10:45 AM.

  12. #27
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    You have never programmed in C or C++ and have very little programming experiences at all, just a bit of VB.

    Any you want to create a game from a mobile phone? After all the tips and advices you have been given, it is very nice of people to not flame you, but I bet several of the people posted here wanted to....

    Best of luck

  13. #28
    Registered User AcerN30's Avatar
    Join Date
    Apr 2008
    Location
    England
    Posts
    32

    Question

    Quote Originally Posted by h3ro View Post
    You have never programmed in C or C++ and have very little programming experiences at all, just a bit of VB.

    Any you want to create a game from a mobile phone? After all the tips and advices you have been given, it is very nice of people to not flame you, but I bet several of the people posted here wanted to....

    Best of luck
    Hang on buddy.

    What do you mean ?

    I know I don't know much about anything to do with this subject. But as silly as it sounds I did explain myself as not being a full on programmer.

    So some of you if not most are saying that trying to take this up wouldn't be much point. Even if what you want to do is so small.

    I'm not talking about making huge levels, or 3D. Only very basic 2D using the GDI of the pc.

    No images, no stats no menus etc.

  14. #29
    Registered User
    Join Date
    Jul 2006
    Posts
    162
    So you want to build games, but you don't want to learn how to write software. Hmm.

    This might be a great start,

    Intro: http://www.youtube.com/watch?v=djHD30qlL-A
    Site: http://mygamebuilder.com/


    Enjoy!

  15. #30
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    AcerN30, the thing that you are not understanding here is the idea of abstraction. Visual Basic abstracts all the nitty-gritty stuff from you. In other words, it hides all the deep stuff from you and gives you these simple 1-line commands to do the things you want. Abstraction can be a good thing, and at times it can be a bad thing.

    In terms of abstraction, C and C++ do not do as much abstraction for you as Visual Basic. Hence you have to write much more code in order to create windows, draw squares, and do many tasks that would take less lines of code in Visual Basic. Is this a bad thing? No. C and C++ programs perform hundreds of times more efficiently than Visual Basic programs do, and they truly give the programmer access to the system. But to be proficient in C and C++ you need to know what you are doing. You need to know at the very least know how memory/pointers work, or else you will completely fall on your face.

    You are frustrated because you cannot do the same things in one line of code in C/C++ as you could do in Visual Basic, but you are not putting forth the effort or showing any willingness to learn how things are properly supposed to be done in the C/C++ languages. Be willing to learn.

    Does this mean that there is no way to reduce the amount of lines of code that exist in a C/C++ program? No. There are several APIs that programmers use that provide nice functionality for them and some additional levels of abstraction, but you need to understand how to program in the standard C/C++ language before you start using those APIs.
    My Website

    "Circular logic is good because it is."

Popular pages Recent additions subscribe to a feed