Sign in to follow this  

Game Dev.

This topic is 664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

what would be the perfect language in developing 3d and 2d game.? thank you in advance.

 

To be honest, it would be good to know what you already tried, have you done any projects before or are you totally new to programming?. For everybody another language is perfect so this question is kind of unclear. 

Share this post


Link to post
Share on other sites

"perfect language"? Doesn't exist as each language has their own set of pros and cons. Languages that can do 2D and 3D? C, C++, C#, and Java (with the help of libraries like SDL, SFML, OpenGL, or Allegro). Engines to use for making your work slightly easier? Unity (C#) and Unreal (C++) are popular choices. Just starting out? Pick a language and then make games off this list of games to get some experience in using the language and making games. Don't get stressed, it takes a long time to be comfortable with any language, but it is doable. 

 

List for easy access:

 

 

  • Pong = Simple: input, physics, collision detection, sound; scoring
  • Worm = Placement of random powerups, handling of screen boundaries, worm data structure
  • Breakout = Lessons of pong, powerups, maps (brick arrangements)
  • Missile Command = targeting; simple enemy ai, movement, and sound
  • Space Invaders = simple movement for player and enemy, very similar to breakout with the exception that the enemy constantly moves downward, simple sound
  • Asteroids = asteroids (enemies) and player can move in all directions, asteroids appear and move randomly, simple sound
  • Tetris = block design, clearing the lines, scoring, simple animation
  • Pac Man = simple animation, input, collision detection, maps (level design), ai
  • Ikari Warriors = top down view, enemy ai, powerups, scoring, collision detection, maps (level design), input, sound, boss ai
  • Super Mario Bros = lessons of Ikari Warriors (except with side-view instead of top-down view), acceleration, jumping, platforms
Edited by BHXSpecter

Share this post


Link to post
Share on other sites


More seriously though, don't think there is any language, apart maybe from the very old ones like Cobol that haven't been used for game development yet.

 

Hi Gian-Reto, sorry to contradict but even the 'very old ones like COBOL' have been used for game development: https://twitter.com/scotnielsen/status/695265768167096320

 

There was even a contest http://academic.microfocus.com/code/. The winner created a 3d Snake game created in COBOL.

 

entry-snake.png

 

In all seriousness, COBOL is probably not the best choice for a new game but this does clearly demonstrate its versatility – not bad for a 50 year old language. But the fact is,

COBOL hasn’t stood the test of time by standing still. Like most other popular languages in existence, it's had to evolve. Credit where credit's due. 

Share this post


Link to post
Share on other sites

I would be surprised if there is any language where games have not been written.

 

As long  as you have both input and output, its possible, and even the first mainframes would often have a game or two for showing off the system.

 

Even if its just text based towers of hanoi, its still a game.

Share this post


Link to post
Share on other sites

Hi Gian-Reto, sorry to contradict but even the 'very old ones like COBOL' have been used for game development: https://twitter.com/scotnielsen/status/695265768167096320

 

There was even a contest http://academic.microfocus.com/code/. The winner created a 3d Snake game created in COBOL.

 

I stand corrected... well, I guess I had this coming making such broad statements without checking the facts.

 

Having had to work with COBOL briefly on a very different topic I cannot imagine how they got this language to work for a 3D game. Certainly have to check it out.

 

 

Thanks for the heads-up.

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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++.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

This topic is 664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this