Game Dev.

Started by
13 comments, last by Brain 8 years, 2 months ago

np Gian. To continue the tangent a little further and answer your follow up question, how could the COBOL you once knew be used for a 3D game - one clue is the ability to compile COBOL apps directly to Java byte code or MSIL. Once you're here, the COBOL developer can pretty much use all the same things a Java or C# developer has access to.

Here's a snippet of COBOL code checking for a collision in the Blitz game:

class-id CobolBlitz.Bomb inherits type Sprite.
working-storage section.
01 initialVelocity type System.Drawing.PointF static.
method-id. NEW.
local-storage section.
procedure division using by value gameState as type GameState l-x as float-short l-y as float-short.
invoke super::Construct(gameState l-x l-y "graphics\bomb6x20.bmp" type GameObjectEnum::Bomb)
set initialVelocity to new type System.Drawing.PointF(0 80)
set super::Velocity to initialVelocity
end method.
method-id CheckCollisions.
local-storage section.
01 collide condition-value.
procedure division returning ret as type Sprite.
set ret to null
perform varying thing as type GameObject through super::GameState::GameObjects
if thing::ObjectType = type GameObjectEnum::BaseShip or
thing::ObjectType = type GameObjectEnum::Base
set collide to false
invoke super::Collision(self thing as type Sprite) returning collide
if collide
set ret to thing as type Sprite
exit perform
end-if
end-if
end-perform
end method.
end class.
For the adventurous, you can download a free COBOL compiler including the game code here https://www.microfocus.com/product-downloads/vcpe/vcpe23/
Advertisement

The best programing language for games and realtime software is C/C++, but i think that you can need other language if you want use an engine as unity, in this case you need know javascript or c#, if you want to use Unreal Engine you would need to know UnrealScript or C++. In a personal view point, i think that you need to know C/C++ is a good base to begin in videogames development, because there are other languages as java or c# with a sintax like C and that can help you to learn it quicly.

Game maker

The best programing language for games and realtime software is C/C++


Highly subjective. The best programming language for any task, not just making games, is the one you know best with the right facilities to solve a problem.

If you disagree with that then I have a round hole somewhere that needs a square peg inserting :)

The best programing language for games and realtime software is C/C++, but i think that you can need other language if you want use an engine as unity, in this case you need know javascript or c#, if you want to use Unreal Engine you would need to know UnrealScript or C++. In a personal view point, i think that you need to know C/C++ is a good base to begin in videogames development, because there are other languages as java or c# with a sintax like C and that can help you to learn it quicly.

Unrealscript was a thing in Unreal 3 / UDK... has been replaced by the Blueprint Visual Scripting System in Unreal 4 AFAIK.

It is questionable if C++ or C is the right starting point into the world of C-based languages. While C certainly is the ancestor to all these languages, there are certainly easier languages to start than C++. We can discuss how complex or easy memory management is as a topic all day long, but NOT having to care about it at first does flatten the learning curve. Everything you don't have to worry about at the time will make learning easier.

Is the complexity on such a different level that you cannot start in C++? Certainly not. And many Engines and Frameworks actually wrap the language enough to make it almost as easy to use as some managed languages... but the point is, it actually doesn't matter too much which language you start with. Ideally you don't pick the most complex dialect of the most complex language first and try to solve the hardest technical problems with them you can find. You pick a language that gives you a smooth start, and write a "hello world" program.

Learning multiple languages should be a goal anyway, if you want to get anywhere in the programming world. You will certainly find jobs where you develop in one language only for 10+ years.... for most programmers its a necessity to be fluent in multiple however... for some it might be just a useful tool to improve efficiency (as braindigitalis said round peg -> square hole)... and for some it is just to keep their mind felxible.

After all, many a programmer had to face the fate of his one and only programming language he specialized in for 10+ years loosing its importance until it was almost impossible to find a job. Being able to quickly adapt and switch careers to a language more in demand would have saved this guys a lot of trouble.

COBOL seems to be a good example, now that some big players in the industry finally seem to have accepted that the amount of COBOL programmers on the job market will only decrease... seems like more modern languages will take its place. Good for the guys that can adapt and switch to Java, for example.

So don't fixate so much on any one language that you cannot switch careers when the time comes. And don't use a screwdriver on a nail, learn to use different tools.

In a personal view point, i think that you need to know C/C++ is a good base to begin in videogames development, because there are other languages as java or c# with a sintax like C and that can help you to learn it quicly.


A professional game programmer who does not know C++ is probably at a disadvantage. Beginning game development in either C or C++ is in my experience a very bad idea. Neither language is in any way forgiving to a beginner in programming, especially because things easily 'appear to work' but are in fact horribly broken.

Saying languages like C# and Java can help you learn C++ or C quickly is simply an obscenity. First, you learn languages on their own terms. Knowing other languages certainly makes it easier up to a point but the biggest task in learning any language is learning it idiomatically. If a skilled C programmer writes C++ code largely like they write C code that usually ends in a 'worst of both worlds'-state. That is despite the fact that C++ and C share a very close relationship (some of the first C++ compilers even generated C code to do the actual compilation).
This does not get any better when looking at Java and C#. Some of the worst C++ code I have seen in my time was made by people who had some Java experience but were absolutely clueless about idiomatic C++. C# programmers are probably guilty of similar crimes but there were never that many around the code bases I have to deal with.

The other core complaint here is using 'quickly' in the context of 'learning C++'. C++ is not a language you learn quickly. And I'm saying that while loving the language (despite or because of all its rough edges).

The best programing language for games and realtime software is C/C++, but i think that you can need other language if you want use an engine as unity, in this case you need know javascript or c#, if you want to use Unreal Engine you would need to know UnrealScript or C++. In a personal view point, i think that you need to know C/C++ is a good base to begin in videogames development, because there are other languages as java or c# with a sintax like C and that can help you to learn it quicly.

Learning languages like Java or C# makes it easier to learn C++. C++ is a rather complex language that can be difficult and depression inducing to try and learn for some beginners. There are engines that use other languages to learn game development so you don't have to be locked into C++.

Learning languages like Java or C# makes it easier to learn C++


While I agree in part, learning one language as a way to help understand another may teach you habits that appear to port to c++ but will land you in hot water. For example a java developer coming to c++ might overuse exceptions, or regularly leak memory forgetting that what is new'd must be deleted...

Similarly c# has some behaviours and idioms that don't port straight to c++ such as pointer safety as default.

If you want to move to c++ from another object oriented language with slightly c like syntax, tread with caution!

This topic is closed to new replies.

Advertisement