Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,222 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Vannimon

Any tips for a C++ coder?

Recommended Posts

Vannimon

I'm planning on making a game in C++ and was wondering if anyone had any tips on making a rendering engine similar to the one in GTA IV\V. I will be using SDL 2 and (obviously) C++. Any tips on this?

Share this post


Link to post
Share on other sites
SoftTouch

If you want to start making a render engine without even knowing anything about C++.. well, good luck boy.

Share this post


Link to post
Share on other sites
Vannimon

If you want to start making a render engine without even knowing anything about C++.. well, good luck boy.

Thanks for the luck.

Share this post


Link to post
Share on other sites
K^2

Erm, yeah. Not to be mean, but it's not going to happen. It's a good goal to work towards, and you can learn a lot along the way, but the end result won't be anything like that. But don't let that stop you.

 

That said, writing a simple rendering system under DirectX is a pretty good way to learn the language better, so long as you know the basics. You can look at DirectX tutorials on-line and see how much you can follow. If it doesn't seem overwhelming, then you might consider picking up this book. This will teach you all the basics of modern 3D engine. But you need to have a bit of programming experience to get started with it.

 

If these things are over your head, you'll probably need to pick up a book on C++, or find some on-line tutorials to get you started. I can't help you much with that, because it's been a very long time since I started learning the language. But I'm sure somebody else can chime in with what worked for them.

 

 

Rendering isn't all there is to the engine, however. Even if you aren't planning to build a complete game, there are a lot of little things with managing resources, doing optimization, and so on. It's usually a good idea to take a look at how this is handled in other engines. You can look at source codes of some of the older Id Software games, try to make a Half-Life 2 mod, or even just make a simple game in Unity. All of these things will help you figure out what else you need to learn to write an engine.

 

Unfortunately, if you're just starting out, it will be years before you will actually have the necessary skills. And by then, you'll probably realize that making an engine is a lot of work, and you probably don't want to write one all by yourself. But maybe you'll want to work with a team that makes engines, or even start your own team and make the engine with a group of like-minded people.

 

 

If you want to make a game in some foreseeable future, definitely go with an engine that already works. Unity is a very good one to start with. It has a decent rendering engine, animation system, and resource manager already built for you, and game code can be written in C#, which is a lot like C++. You won't be making a next GTA with that, but you won't be making one without a huge team of artists and designers, anyways. If you want to make games by yourself, or with a small team, Unity is a perfect platform. And lots of fantastic games have been made with Unity. Even giants like Blizzard don't dismiss it. Hearthstone client runs on Unity.

Share this post


Link to post
Share on other sites
BillGates

I'm planning on making a game in C++ and was wondering if anyone had any tips on making a rendering engine similar to the one in GTA IV\V. I will be using SDL 2 and (obviously) C++. Any tips on this?

 

Do you think Rockstar has one or two programmers creating the rendering engine? Jesus. What a disrespect. :blink:

Share this post


Link to post
Share on other sites
K^2

To be fair, I know people who have built quite decent game engines mostly from scratch and working alone. It just takes a lot of time on top of a lot of experience. Two programmers don't get the project finished in half the time. An engine built by a team of a dozen or so people wouldn't take an individual a lifetime to make. But it does take a while, and usually, your work is much outdated and largely irrelevant by the time you are finished.

 

Also, there are game engines and there are game engines. OP specifically mentioned one similar to that of GTA V, which would be a huge project, but if you aren't shooting for anything quite that fancy, even a sand box game engine can be put together in a year or two. Just the bare necessities, probably not as well optimized, but quite serviceable for an indy game. Still, if your goal is to actually make a game, a ready engine or some middleware to start with is your ticket.

Share this post


Link to post
Share on other sites
Sir_Martin_Esq

All I can say is good luck to you. Speaking from past experience with SDL2 (I attempted to make a platformer). It is a good graphics library for 2D games. However if you want a 3D game I would recommend OpenGL. It is more catered for 3D games

Share this post


Link to post
Share on other sites
gtamann123

What free online compiler would you guys recommend?

Share this post


Link to post
Share on other sites
K^2

What free online compiler would you guys recommend?

I'm not sure what you mean by an "online compiler"? One that actually compiles on a remote server? Or you mean just download it online? I'm going to assume the later, because I'm not sure why you would even want the former.

 

Realistically, there are two options for C/C++ compilers out there. GNU or Visual-C++. Former is the compilers on Linux machines, and later is responsible for majority of Windows games these days. Both you can get for free. Specifically, if you want GNU adapted for Windows, you want MinGW, and the current free version of Visual-C++ is part of Visual Studio Express 2013.

 

There are some other compilers, but unless you have some super-specific task, I wouldn't bother with any of them.

 

Now, there is also a matter of IDE. Visual-C++ is part of Visual Studio, which has an IDE which is what you should probably use it with. I'm not sure if MinGW comes with an IDE these days. But you can take a look at either Code::Blocks or Dev-C++. Later comes with MinGW compilers and is pre-configured to use them, but it's a bit out of date. Still, good enough for learning. This might be true of Code::Blocks as well. Personally, I've never used it, but I've heard a lot of good things about it.

 

Or, if you just have small bits of code to compile, you can always go old school and do everything from command line. I rarely bother with an IDE, unless I'm working on a large project.

Share this post


Link to post
Share on other sites
gtamann123

I ended up downloading Visual Studio and it works pretty good.

Share this post


Link to post
Share on other sites
LOES

All I can say is

 

Using namespace std;

 

Int main()

Share this post


Link to post
Share on other sites
Swoorup

 

What free online compiler would you guys recommend?

I'm not sure what you mean by an "online compiler"? One that actually compiles on a remote server? Or you mean just download it online? I'm going to assume the later, because I'm not sure why you would even want the former.

 

Realistically, there are two options for C/C++ compilers out there. GNU or Visual-C++. Former is the compilers on Linux machines, and later is responsible for majority of Windows games these days. Both you can get for free. Specifically, if you want GNU adapted for Windows, you want MinGW, and the current free version of Visual-C++ is part of Visual Studio Express 2013.

 

There are some other compilers, but unless you have some super-specific task, I wouldn't bother with any of them.

 

Now, there is also a matter of IDE. Visual-C++ is part of Visual Studio, which has an IDE which is what you should probably use it with. I'm not sure if MinGW comes with an IDE these days. But you can take a look at either Code::Blocks or Dev-C++. Later comes with MinGW compilers and is pre-configured to use them, but it's a bit out of date. Still, good enough for learning. This might be true of Code::Blocks as well. Personally, I've never used it, but I've heard a lot of good things about it.

 

Or, if you just have small bits of code to compile, you can always go old school and do everything from command line. I rarely bother with an IDE, unless I'm working on a large project.

 

Is there anything you don't know? I'd love to know :p

 

EDIT: Didn't realize I bumped a year old topic. Sorry

Edited by Swoorup

Share this post


Link to post
Share on other sites
GN 1992

That was a good read, old or not. Just want to say that I learned something in this thread. That's nice.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.