Quantcast

Jump to content

» «
Photo

Any tips for a C++ coder?

10 replies to this topic
gta3masta5000
  • gta3masta5000

    'Sup?

  • Members
  • Joined: 28 Apr 2012
  • United-States

#1

Posted 24 May 2014 - 01:15 AM

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?


SoftTouch
  • SoftTouch

    Lone Wolf

  • Members
  • Joined: 04 Dec 2013
  • Lithuania

#2

Posted 24 May 2014 - 05:21 PM

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

  • BnB likes this

gta3masta5000
  • gta3masta5000

    'Sup?

  • Members
  • Joined: 28 Apr 2012
  • United-States

#3

Posted 25 May 2014 - 01:39 AM

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

Thanks for the luck.

  • godziller likes this

K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States
  • Most Knowledgeable [Web Development/Programming] 2013
    Most Knowledgeable [GTA Series] 2011
    Best Debater 2010

#4

Posted 25 May 2014 - 02:34 AM

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.

  • uNi, Rewas, a cactus and 2 others like this

BillGates
  • BillGates

    Boot me up.

  • Members
  • Joined: 31 Jan 2013
  • None

#5

Posted 11 June 2014 - 01:20 PM

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:


K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States
  • Most Knowledgeable [Web Development/Programming] 2013
    Most Knowledgeable [GTA Series] 2011
    Best Debater 2010

#6

Posted 12 June 2014 - 09:53 PM

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.

  • epoxi likes this

N3RD4L1F3
  • N3RD4L1F3

    Player Hater

  • New Members
  • Joined: 31 Jul 2014
  • England

#7

Posted 01 August 2014 - 10:23 PM

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 


gtamann123
  • gtamann123

    Bang Bang, Skeet Skeet

  • Members
  • Joined: 10 Jun 2008
  • United-States

#8

Posted 15 August 2014 - 12:29 AM

What free online compiler would you guys recommend?


K^2
  • K^2

    Vidi Vici Veni

  • Moderator
  • Joined: 14 Apr 2004
  • United-States
  • Most Knowledgeable [Web Development/Programming] 2013
    Most Knowledgeable [GTA Series] 2011
    Best Debater 2010

#9

Posted 15 August 2014 - 05:36 AM

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.
  • Street Mix likes this

gtamann123
  • gtamann123

    Bang Bang, Skeet Skeet

  • Members
  • Joined: 10 Jun 2008
  • United-States

#10

Posted 15 August 2014 - 06:19 AM

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


LOES
  • LOES

    Kawaii!!!!!!!!!!!

  • Members
  • Joined: 02 May 2014
  • Canada

#11

Posted 19 October 2014 - 03:01 AM

All I can say is

Using namespace std;

Int main()




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users