Jump to content

Can we make games like GTA using C++?


R A J A

Recommended Posts

games for PlayStation are programmed in C++, since the PlayStation Dev Kit are in C++,

 

XBox game are programmed in C#, using DirectX and XNA ...

 

Computer games can be programmed even by flash, java, ..etc

 

Good programming skills are required, but a complex game requires alot of specialized developers

of different specialties from Graphics\Music\Animations to Artificial Intelligence,

 

Game Platforms provide a Dev Kit, that you can download and use ...

Link to comment
Share on other sites

  • 1 year later...

Most complex games like GTA have a graphics and game "engine", and use a scripting language to implement much of the game story/encounters or whatever. Most console and PC games are written in C++. Some have a custom scripting language built into the game or engine (usually implemented in the same language) like UnrealEngine3 has UnrealScript + Kismet, or quake3 has quakeC. Lua is a popular scripting language... it's implemented in C.

 

You'd typically use or build a graphics engine, which provides features and game structures, which would in turn use a graphics library like OpenGL, rather than programming the game to use OpenGL directly.

 

Apparently modern GTA games use Rockstar's RAGE engine. GTA3/VC/SA used RenderWare.

Link to comment
Share on other sites

Apparently you need to use GLM to use OpenGL and C++.

 

No that's just not true. I used OpenGL (without GLM) along with DirectX when I created a proprietary cross-platform game engine for Casino Systems Inc.

 

OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification.

 

GLM provides classes and functions designed and implemented with the same naming conventions and functionalities than GLSL so that when a programmer knows GLSL, he knows GLM as well which makes it really easy to use.

 

This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, half-based types, random numbers, procedural noise functions, etc...

 

This library works perfectly with OpenGL but it also ensures interoperability with third party libraries and SDKs. It is a good candidate for software rendering (Raytracing / Rasterisation), image processing, physic simulations and any context that requires a simple and convenient mathematics library.

 

Of course, GLM does provide all those handy matrix functions that work on vectors / vertices, but it is not a requirement (especially if the code base already has functions to do this).

 

You'd typically use or build a graphics engine, which provides features and game structures, which would in turn use a graphics library like OpenGL, rather than programming the game to use OpenGL directly.

 

md65536++ ; )

 

Exactly and I can't stress md65536's statement enough!!! Please, do not try to reinvent the wheel. If you do not know what you are doing, it will cause you nothing but headaches. You will appreciate this statement when or if you already have had to come in behind someone to fix their crappy spaghetti code because they considered themselves to be a coding god (only to find out that they have never designed or implemented a game engine in their life). For a decent graphics engine, I recommend using OGRE, which is used by Multimedia Games in their latest game engine, or SDL, which is also cross-platform.

Edited by Daedalus
Link to comment
Share on other sites

  • 2 weeks later...

Okay, this can get very technical so to answer your questions in the most literal way possible: "Yes, you can make any game in C++".

 

However, it's not as simple as sitting down, typing a few code lines, and then expecting a game where you can beat up people, steal their cars, and implement hot coffee mods. There is a LOT of work that goes into making a videogame. Especially one of GTA IV and soon to be V, calibur. There are many people with varying skills who get together (typically hired by a large organization such as Rockstar in this case) and collaborate.

 

As you may know the writers develop the story, the artists draw out the fancy pictures, the designers come up with the ideas, and the developers put it all together. That is the process in a small nutshell. It can either be very complex or as simple as I have stated it to be. It really just depends on the scope of the project. If you want GTA level games, expect it to be a little complex. (I haven't even mentioned the licensing fees and all the other legal jargon such as merchandising rights, advertising, etc.)

 

Now to get to the point:

 

The developers can be broken down into several different categories, which can vary depending on how the lead designer organizes the project. Most generally you have the programmers, the 3D modelers, and the level designers. Again, this is keeping it pretty simple too.

 

The 3D modelers build the models using pre-existing software that COULD have been written in C++, but some company somewhere went through a similar process as the game creators just to make the software. Naturally it would be a huge waste of time and resources for both the company and the programmers to have to create software for 3D modeling from scratch when there are perfectly good programs that are already put together and marketed toward the game developers. Keep in mind this company is out to design the next best game, NOT necessarily the next generation of software.

 

The level designers take the models that the modelers have built and integrate them into a "world" that made via special software. Much like, if not the same as, what the modelers use. In fact, it is possible that the level designer and modeler could be merged together and have one job. Though to me that sounds very inefficient. But enough on that, you get the idea.

 

Now, the programmers are arguably the bread and butter of the game industry. I say this simply because I am an aspiring programmer by trade. Don't get offended people. Anyway, these guys bring the game to life in many ways. They could use special game engines that were also written in C++, or they could use other types of software, compilers and linkers to bring everything to life. In fact, it is also possible for a game to be written in multiple languages, depending on the skills and preferences of the programmers. It all depends on the software that is being used, who is doing the programming, and who is signing the checks and hiring the hot interns.

 

Again, this is as summarized as I can get this without developing carpel tunnel syndrome. Yes, you can make games in C++. Yes, GTA like games can be made with C++. But if you're going to design games like GTA you're going to need some more know how, money, good software, and either an experts working knowledge of video game development and design and/or a good team.

 

It is highly possible, profitable, and recently quite popular for indie game developers to create their own games. A group of friends get together with a working knowledge of programming, design, and business mechanics (optional but a good idea) and come up with a cool game idea, and then they create it! Next thing you know Angry Birds is being advertised everywhere and people can't get enough of it. It's simple, it's well designed, and most of all it is fun. There are no fancy game engines, no cutting edge graphics, and no ridiculous physics based alogorithms.

 

I guess to sum it all up: Anything can be coded in c++ if it is a software of some type. But there are always more practical solutions than just sitting down, coming up with a program algorithm, opening up an IDE and coding line by line. If you want to know more just do some research, or PM me. I'm just really tired of typing now.

 

Oh and in case you want to know if I'm not just blowing smoke: I have spent the past three years researching how video games are made and how to make them. I am currently in college as a computer science major and using the c++ programming language. I'd like to one day make my own game but I just don't have the time with classes and work, nor do I have the appropriate skill level or the resources... Yet. That is all. I promise.

 

-The Pragamatist

Edited by The Pragamatist
Link to comment
Share on other sites

Okay, this can get very technical so to answer your questions in the most literal way possible: "Yes, you can make any game in C++".

 

[...]

While I agree with everything said, I'll just add a bit more aimed at a novice who wants to make games. If you go the "programming in C++"-only route, you'll likely end up implementing small pieces of the game, like features that the designers need, or the "systems" that make up the game. Or you'll spend a long long time making a complicated game.

 

If someone wants to just fool around with making a game on their own, you can do it nowadays with very little to none C++ programming. I'll use Unreal3 as an example cause that's all I know, but you can create a game in it using the existing base game example that comes with it, and run the editor, place a large flat surface into the world, drop an existing Unreal vehicle onto it and a spawn point, then you can play it and you already have a game where you can drive around with all the same physics and vehicle art/sounds of a basic Unreal game. Next you could add buildings or start creating a unique game with custom code. However, most of that can be done with scripting (c-like code) and you could make a pretty complex game before ever having to touch any c++.

 

A layer of abstraction above this, instead of just using a base game of an engine, you could use an entire game and make a "mod" for it. For example you can create a Half Life 2 mod, actually I don't know exactly how but people do it... create new levels and art and stuff, script the encounters and game mechanics, and code any new behaviors and junk. This is probably the best way for an individual to "make a game" of the calibre of GTA, and often games companies hire people based on the quality of the mods that they've made.

 

You could probably make a "cut the rope" style phone game with nothing but c++ or equivalent; even Angry Birds uses a physics engine (third party I think), but you could create your own if you were eager; you can make a bad 3d game fairly easily by using an available engine; and, you could probably make a game as good or better than GTA3 for example, using a more modern engine and existing art/sound assets and only scripting the game.

 

To anyone really curious, I'd recommend making a bad 3d game (that is, nothing novel about it, nothing polished) starting with an engine's example games, just to get started figuring it out and having a base to start experimenting with.

Edited by md65536
Link to comment
Share on other sites

For example you can create a Half Life 2 mod, actually I don't know exactly how but people do it... create new levels and art and stuff, script the encounters and game mechanics, and code any new behaviors and junk. This is probably the best way for an individual to "make a game" of the calibre of GTA, and often games companies hire people based on the quality of the mods that they've made.

 

Actually, you use c++ to create Half Life 2 mods. I know because I've helped fix bugs in a mod that my friend, Mosalar, is trying to make. However, you can easily create server side scripts and add functionality to these type of mods, but such scripting engines are based on c++ and actually hook functions within the game engine in order to do their task. I am the author of NetS2S, which is a free multi-server messaging plugin that also allows admins to moderate game activity across several servers. I also created custom build rules for Visual Studio that allow plugin developers to create SourcePawn plugins using Visual Studio wink.png It's actually a very thorough tutorial that teaches you how to create custom build rules that will invoke other compilers and linkers not supported by Visual Studio. In essence, allowing you to use unsupported third-party programming tools within Visual Studio's IDE.

 

NetS2S Multi-Server Chat / Admin Utility

 

NetS2S gives players and admins the ability to chat with each other on different servers and in different games. The menu provides server / sorted player lists as well as messaging, instant messaging, and commands for admins that can be executed across servers (allowing admins to monitor and govern multiple servers, reducing the amount of people you have to entrust with admin).

 

The player list is sorted by admins with ban privileges, then by admins with kick privileges, and finally by player names.

 

Admins with ban privileges have an @ preceding their name

Admins with kick privileges have a + preceding their name

players are listed without tags

 

Dependencies:

 

Socket Extension: http://forums.alliedmods.net/showthread.php?t=67640

 

However, I did not create the socket extension plugin, which proved to be buggy. I intended to use c++ along with the SourceMod SDK to create an extension to replace it, but I never got around to doing so ohmy.png If you host multiple Half Life 2 servers or some of its mods, such as Day of Defeat or Counter Strike, then check out the plugin. If you want to use it, I could possibly find time to program a replacement for the socket extension plugin and make NetS2S a viable option for admins once again. Mosalar, the server admin and a good friend of mine, actually tested it across multiple mods:

 

This was also tested on DoDS, CSS, TF2, FoF, L4D, HL2DM, and Hidden servers with

perfect results.

 

Unfortunately, we are no longer hosting the servers. So you can't see the plugin in action anymore sad.png

Edited by Daedalus
Link to comment
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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.