Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

About C++, a question.

soggie

Educated
Joined
Aug 20, 2009
Messages
688
Location
Tyr
Awor Szurkrarz said:
What would be the best when someone wants to make a game that looks like Exile?

The language that you're familiar with. But I would use C++ simply for clanlib and the various roguelike libraries that's catered for C++.
 
In My Safe Space
Joined
Dec 11, 2009
Messages
21,899
Codex 2012
Thanks for the info. I'm learning C++ at studies now, so I'll probably stick to it, then.
 

Catbert

Scholar
Joined
Apr 26, 2010
Messages
104
Antihero, all I see is stupid use of the tools C++ provides.
If you code like that in actual, real world systems, I hope you get fired.

You can fuck things up in Java too. Having a hold-your-hands language is no replacement for common sense and a little discipline.
All of those academic demonstrations of C++'s evil really miss the mark. If you want to witness truly horrible code taken from real systems, I implore you to look up a certain "worst comments ever" thread on Stack Overflow.

None of it changes the fact that C++ is the language of choice for engine designers today, because it strikes the best balance between convenience, power and performance.
 

soggie

Educated
Joined
Aug 20, 2009
Messages
688
Location
Tyr
Which again reinforces the fact that it's not about the language but about what language you are good in. Many people code in C++ because they seem to have a strange conception that C++ is always more efficient, which is bullshit because since it's a low-level language, it just gives you more options to fuck yourself up. Especially when you decide to act smart and commit suicide with stupid pointer and reference stunts.

By the end of the day, it's about discipline and a good dose of proper software engineering principles and paradigms. No amount of advancements in compiler and language technology can replace common sense and basic engineering principles.
 

Antihero

Liturgist
Joined
May 8, 2010
Messages
859
Catbert said:
Antihero, all I see is stupid use of the tools C++ provides.
If you code like that in actual, real world systems, I hope you get fired.
Heh, it's just a quick example that C++ isn't bullet-proof, not an argument for avoiding the language. Not the end of the world, but it's full of ugly crap like that - and worse, although some people seem to get off on it, like thinking they're clever and abusing how overloaded operators define sequence points.

You can fuck things up in Java too. Having a hold-your-hands language is no replacement for common sense and a little discipline.
Sure, you can even "leak" references in Java if you're thoughtless, for all the good having a GC will do you.
 

Raghar

Arcane
Vatnik
Joined
Jul 16, 2009
Messages
22,791
desocupado said:
So, I have had this pipe dream for a while, of making a simple strategic game.
Majority who failed did fail on art assets, or at ability to make consistent rules.
I don't remember having much trouble until I reached classes, and stopped there, run out of interest. I was losing interest since pointers, actually, because I was not seeing the tools to build a game.
Where were the stuff to show sprites, mouse support, grids, etc?
You'd need to download platform SDK from MS, and also DirectX SDK, because of tools. Use OpenGL, it has some advantages for people without large code base. (Small and very large code bases should use OpenGL.)
I mean, I know you do some of these stuff with arrays and loops, but I was about 1/3 to 1/2 through the book and all I was doing were DOS programs...
For cycles, and arrays are quite important. (Well you can hide them under cover, and then try to find that one line from 30000 that caused the RAM usage to grow from 60MB to 3 GB.)

But that was recommend to someone who did not want to complicate his head with programming, which is not my problem, I think I do like programming, so would not C++ be a better tool? But if so, what I am missing? How do you do that stuff in C++? Not seeing how I would use what I had was what made me loose interest.
C++ is shitty. When I need to make a program in C++ I make it in Java, test it, and then port it into C++ (and try to preserve design).

Sorry for the wall of text. Also, I was shocked when I had to include math.h for a C++ program be able to a square root. FORTRAN does that shit from start.
C++ isn't math language, you need to specify what sqrt you want to use. In fact, in Java you are using Math.sqrt() (which is a sign for compiler to use ASM command for sqrt.) Or you can use a different type of sqrt, when you need a strict compatibility with double precision floating point standard, or use yet another sqrt when you need to use 512+ bit data types.

In Java, both GUI support and mouse support is part of language specification, thus you can use standard libraries without thinking about licence, or platform specific problems. C++ didn't specified these because it's too old and they thought they would have better cross platform compatibility. (Yes, it wasn't that case, lack of data types of rigidly specified size prevents some efficient algorithms. Lack of an abstract thread, GUI, or mouse support, hurt stuff as well.) However there are too many C++ programmers that are unable to learn more modern language, and too much legacy code, the standard organization is basically tries to patch problems instead of repairing them completely, or deprecating the C++ language.)

In fact a modern ASM can be even more simple and straightforward than C++.

Code:
ADC eax, ebx
SAR eax, 31
AND eax, [struct.MASK]
ADD edx, eax
AND edx, [struct.MASK2]
MOV edx, [edx]
.if(zero?){
     invoke shotResolve edx
} else {
 invoke bloodBath edx
 

acolyte

Educated
Joined
Jan 24, 2010
Messages
107
Raghar said:
...deprecating the C++ language...
Hilarious! But I'm sure you're kidding, and actually know about cross-platform GUI frameworks like Qt & wxWidgets, about 'non-modern' stuff like Boost, template metaprogramming... anyway, enough.

On topic: some good advice above, would like to add these:

1) OP, you want to learn C++, but stopped before classes??? Does not compute, learn C instead if you don't care about classes.

2) #include <cmath> in C++. Not math.h (this hints to a warped way of learning C++, biased towards C). What book were you reading anyway? Most modern approaches of teaching C++ I know, use STL right from the beginning, favor std::vectors over arrays -whom they delay for later along with pointers-, try to introduce user defined types early on, etc.

3) As for the lack of tools for game/graphics programming... well, what did you expect? These things are not and should not be part of the language. As others said, you'll need 3rd party libraries/frameworks. But you'll probably need to know the core language first to use them effectively.
 

desocupado

Magister
Joined
Nov 17, 2008
Messages
1,802
acolyte said:
Raghar said:
...deprecating the C++ language...
Hilarious! But I'm sure you're kidding, and actually know about cross-platform GUI frameworks like Qt & wxWidgets, about 'non-modern' stuff like Boost, template metaprogramming... anyway, enough.

On topic: some good advice above, would like to add these:

1) OP, you want to learn C++, but stopped before classes??? Does not compute, learn C instead if you don't care about classes.

2) #include <cmath> in C++. Not math.h (this hints to a warped way of learning C++, biased towards C). What book were you reading anyway? Most modern approaches of teaching C++ I know, use STL right from the beginning, favor std::vectors over arrays -whom they delay for later along with pointers-, try to introduce user defined types early on, etc.

3) As for the lack of tools for game/graphics programming... well, what did you expect? These things are not and should not be part of the language. As others said, you'll need 3rd party libraries/frameworks. But you'll probably need to know the core language first to use them effectively.


1 - Well, it is not that I did not care about classes, Classes were where I lost interest.

2 - It was not in the book that I saw that, I searched the net. The book I was reading was C++ for Dummies :oops:

3 - I did not know not to expect that! I new FORTRAN did not have those, because it's not meant to do games, but since C++ is what's used by the industry, I sort of assumed...

Right now, I went bookmarked SDL that was suggested in this page, but I'm following soggie's suggestion, and I'm reading about Python.

But you guys don't expect much, who knows if I will have patience/time/will to actually produce something.
 

acolyte

Educated
Joined
Jan 24, 2010
Messages
107
Yeah, not such a good book... But since you've gone Python, I'll refrain from suggesting other C++ books;)
Good luck !
 

Yggdrasil

Educated
Joined
May 22, 2010
Messages
312
Location
Eastern Europe
To the OP: you SHOULD know the language before you start any big projects on your own, or start trying to understand the internals of some large game or graphics framework. Otherwise you'll quickly find yourself overwhelmed.

In particular that applies to mainstream programming languages (C++, Java, C#). Scripting languages can be picked up "on the fly", if you're smart and have a little previous programming experience. C++ - doubtfully.
 
In My Safe Space
Joined
Dec 11, 2009
Messages
21,899
Codex 2012
Is taking informatics studies a good way to be get programming skills good enough to be able to start thinking about making a game without getting completely overwhelmed by the complexity of the task?
 
Self-Ejected

Davaris

Self-Ejected
Developer
Joined
Mar 7, 2005
Messages
6,547
Location
Idiocracy
Awor Szurkrarz said:
Is taking informatics studies a good way to be get programming skills good enough to be able to start thinking about making a game without getting completely overwhelmed by the complexity of the task?

I don't know what the course covers, but if you can program C and C++ by the end of it, then yes. Otherwise you could try a video course.

Once you learn to program, look for books on game making, that have source code and step you through the making of a small game. If you complete a book like that, it should be enough to get you started in game making.
 

Naked Ninja

Arbiter
Joined
Oct 31, 2006
Messages
1,664
Location
South Africa
Dude, you've got SUCH a long road ahead of you here. A few years of learning and practice before you can make even a 'simple' strategy game (truth is you don't yet have enough knowledge to understand the full scope of any idea you might currently be entertaining), if you're going the 'code it yourself' route. C++ or anything else, really.

Get a 3rd party tool. Unity free edition or Torque 2D. Learn the tool, use it, it'll get you to the fun bit (creating your game) and save you a ton of work by doing all the grunt work you don't realize right now that you will need to do. And your programming knowledge will slowly expand as you tackle more and more complex scripting tasks.

Unless you're really dedicated to becoming a good game programmer, learning how to do it the hard way is probably not the best path. Unless you feel you can stick with it for a long period, take a shortcut, use middleware.
 

desocupado

Magister
Joined
Nov 17, 2008
Messages
1,802
If using middleware is the best option, why doesn't everybody, except middleware makers use it?

I'm not being sarcastic or anything, that's a genuine question.

I have been learning python, but out of curiosity I'm downloading Unity trial edition, to take a look.
 
Self-Ejected

Davaris

Self-Ejected
Developer
Joined
Mar 7, 2005
Messages
6,547
Location
Idiocracy
Naked Ninja said:
Get a 3rd party tool. Unity free edition or Torque 2D. Learn the tool, use it, it'll get you to the fun bit (creating your game) and save you a ton of work by doing all the grunt work you don't realize right now that you will need to do. And your programming knowledge will slowly expand as you tackle more and more complex scripting tasks.

Good advice.

I've seen people talk about Unity3D and Torque a lot here, but there is a gem called the C4 Engine, that is worth considering. It has tools, very clean C++ source and for scripting it has this:

http://www.terathon.com/wiki/index.php/ ... g_Language

See the comparison with Kismet.

The big advantage Unity3D has right now is ease of assets import, but the downside is it is $1500 per seat and you don't get the source code. As for C4, I don't see why someone couldn't write a batch importer for it. They already have a batch importer for the textures and someone is working on an XML one for their material files, so rapid import isn't far off.
 

Antihero

Liturgist
Joined
May 8, 2010
Messages
859
desocupado said:
If using middleware is the best option, why doesn't everybody, except middleware makers use it?

I'm not being sarcastic or anything, that's a genuine question.

I have been learning python, but out of curiosity I'm downloading Unity trial edition, to take a look.
Not sure what you meant with "except middleware makers use it", but lots of people use middleware, unless they have some pressing reason to write something from the ground up or for whatever financial reasons. Just look at all the small logos when you fire up any semi-recent commercial game for example.
 

soggie

Educated
Joined
Aug 20, 2009
Messages
688
Location
Tyr
Davaris said:
Naked Ninja said:
Get a 3rd party tool. Unity free edition or Torque 2D. Learn the tool, use it, it'll get you to the fun bit (creating your game) and save you a ton of work by doing all the grunt work you don't realize right now that you will need to do. And your programming knowledge will slowly expand as you tackle more and more complex scripting tasks.

Good advice.

I've seen people talk about Unity3D and Torque a lot here, but there is a gem called the C4 Engine, that is worth considering. It has tools, very clean C++ source and for scripting it has this:

http://www.terathon.com/wiki/index.php/ ... g_Language

See the comparison with Kismet.

The big advantage Unity3D has right now is ease of assets import, but the downside is it is $1500 per seat and you don't get the source code. As for C4, I don't see why someone couldn't write a batch importer for it. They already have a batch importer for the textures and someone is working on an XML one for their material files, so rapid import isn't far off.

Seconded. Checked out C4 long ago, and would have gotten a lifetime license if not for the author's inability to keep to release deadlines. After waiting 2 months for their supposed "overhaul" on the physics engine, I gave up and went Ogre instead.
 

desocupado

Magister
Joined
Nov 17, 2008
Messages
1,802
Antihero said:
desocupado said:
If using middleware is the best option, why doesn't everybody, except middleware makers use it?

I'm not being sarcastic or anything, that's a genuine question.

I have been learning python, but out of curiosity I'm downloading Unity trial edition, to take a look.
Not sure what you meant with "except middleware makers use it", but lots of people use middleware, unless they have some pressing reason to write something from the ground up or for whatever financial reasons. Just look at all the small logos when you fire up any semi-recent commercial game for example.

Sort of a joke about the chicken and the egg. If you make middleware with middleware how was the first middleware made?

Can't play any semi-recent commercial game, fried video card. I do remember seeing SpeedTree being used on Oblivion and a couple other games, though, but I had this (aparently wrong) concept that this kind of software was used mostly to some specific area of the game. Like trees.

I installed Unity, run it, and I was... overwhelmed. Of course I did not expect to be able to do anything with the program, but I expected to recognize something. A concept, a tool, whatever. It looks like it's written in greek, I can't even guess what most menus and options do.

But then again, I shouldn't be surprised. Reminded me of when I had one or two Solid Edge (engineering program) lessons.
 

Naked Ninja

Arbiter
Joined
Oct 31, 2006
Messages
1,664
Location
South Africa
If using middleware is the best option, why doesn't everybody, except middleware makers use it?

Eh? Just about everybody does use middleware. All commercial games are at least 50% middleware (watch the loading screens, you'll see a list of icons and trademarks for the middleware they are using.) Even if they write their own engine, it tends to make use of middleware for sound, animation, video streaming, tree rendering, networking, etc. Many 'engines' are simply collections of middleware stitched together.

And at least 50% of commercial titles are built on 3rd party engines. Writing an engine is a huge undertaking, many simply choose to license Unreal, Source, Gamebryo, Hero Engine, etc.

Think of all the infinity engine games, the aurora engine, etc.

Desocupado, try this tutorial :

link

Don't expect to be able to use complex pieces of software without a bit of reading dude (or having worked with similar tools). When in doubt, RTFM.
 
Self-Ejected

Davaris

Self-Ejected
Developer
Joined
Mar 7, 2005
Messages
6,547
Location
Idiocracy
soggie said:
Seconded. Checked out C4 long ago, and would have gotten a lifetime license if not for the author's inability to keep to release deadlines. After waiting 2 months for their supposed "overhaul" on the physics engine, I gave up and went Ogre instead.

Not having deadlines is one of his selling points. LOL

I looked at C4 in 2007 and didn't buy it, because back then it was only suitable for fps, but now I am kicking myself that I missed out on that lifetime deal.
 
Self-Ejected

Davaris

Self-Ejected
Developer
Joined
Mar 7, 2005
Messages
6,547
Location
Idiocracy
desocupado said:
I installed Unity, run it, and I was... overwhelmed. Of course I did not expect to be able to do anything with the program, but I expected to recognize something. A concept, a tool, whatever. It looks like it's written in greek, I can't even guess what most menus and options do.

But then again, I shouldn't be surprised. Reminded me of when I had one or two Solid Edge (engineering program) lessons.

Unity3D is about as user friendly as it gets with 3D engines, but it still requires a lot of effort to learn.

If you want to get started making games faster, you might be better off with one of those 2D RPG makers. I remember a fairly successful female dev, who used one of those programs to make her RPGs. They were very simple and very girly, but they were RPGs.

I think this is her site:
http://www.amaranthia.com/
 

Raghar

Arcane
Vatnik
Joined
Jul 16, 2009
Messages
22,791
desocupado said:
2 - It was not in the book that I saw that, I searched the net. The book I was reading was C++ for Dummies
You shouldn't read books called for dummies. For some reason, these books would teach you in hard to understand style far less than a properly written book, or a web page.

BTW you asked about grids. http://www-cs-students.stanford.edu/~am ... ing/grids/

Also, do you remember what happened to Brad Wardel? Write design document.

Awor Szurkrarz said:
Is taking informatics studies a good way to be get programming skills
Not.

(They will not teach you about: software architecture, programming styles, unwritten programming conventions, and they will teach you unnecessary amount of math. When you need math, you'd learn it in few days, it's much easier when you know what for you need that math. Either you have talent, or you don't, and when you have talent you have no need for school.)
Basically, I doubt they will teach you more programming skills than you'd be able to learn by self education in half year.
 

desocupado

Magister
Joined
Nov 17, 2008
Messages
1,802
I am gonna look like a total moron, but what is design document? You mean something to keep track of your decisions/goals as you go making your stuff?

Also, this thing about using Unity or whatever other engine, doesn't that involve having models, textures, art and whatever? As a poor citizen of third worldia, I don't have money for these things.

My plan was to make a freeware, 2d, with placeholders/paint art/roguelike. And maybe, just maybe, when I'm competent enough, maybe try to get a partner to deal with art, sprites, and the stuff I have no patience for, and maybe go commercial. Have I said maybe enough? Maybe.

Of course, even though I am learning stuff right now, I make no promises of me ever getting off my lazy ass and doing something. Ever.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom