GrogHeads Forum

IRL (In Real Life) => General Discussion => Topic started by: Toonces on May 09, 2013, 01:45:18 AM

Title: Game programming languages
Post by: Toonces on May 09, 2013, 01:45:18 AM
Hey all.

I have an interest in attempting to write a computer game program.  If I wanted to write a hex-and-counter type wargame, what programming language would you recommend, and why?

As an entering argument, I'd basically be learning to program from scratch, so ease of use has to figure high on the list.  Also, price matters.

As a follow-up question, how does your answer change for a FPS-type game?

Same entering arguments.

Thanks,
Toonces
Title: Re: Game programming languages
Post by: Staggerwing on May 09, 2013, 06:10:36 AM
For the FPS game probably Unity since it is fairly easy to use, with a GUI. You still need to learn some coding to do the tricky stuff and if you want bells and whistles you have to pay for the pro versions but the basic program is free to D/L. You could probably make a hex game as well but making a nice one might actually be more work because of the AI and related rules of engagement, supply, and whatnot. I'm a complete noob AFA programming goes so hopefully you will get some real answers from the experten hereabouts

http://unity3d.com/unity/
Title: Re: Game programming languages
Post by: LongBlade on May 09, 2013, 09:25:11 AM
Hmm.

Not being a developer (though I've had some general programming classes - and was on the advisory board for WPI's game development curriculum) I'm not sure I'm your best source of info. That said, I'll toss in my perspective and hope it helps.

Probably you should use whatever language you actually know. If you're starting from scratch I guess I'd recommend whatever everyone else uses. Which is probably everything under the sun.

If you look at Tiller's games, they appear to me to be made in Powerbuilder - an old competitor to Microsoft's Visual Basic. Visual Basic is probably the development tool of choice I'd recommend for classic hexagonal wargaming, but remember it's not just he visual overlay - there is also an underlying database which holds all that precious stuff like armor thickness, gun range, penetration, and the associated logic for blasting a tank at, say 1000 yards.

The FPS stuff, I'm less sure about. Some games offer you the ability to craft new levels. I'd recommend starting to play with that as it can be somewhat complex to design a level on your own. The best FPS games have dozens of devs working on them for a couple of years. Call of Duty isn't programmed by one guy in his basement who works on it after he's surfed for the afternoon ;)

In terms of game design keep in mind there are several elements. Broadly speaking they can be broken down into two spectra.

Creative - Technical
Artistic - Logic

Those areas can overlap. Those gorgeous explosions you see in Call of Duty are both artistically masterful and technically founded in some mad programming skills.

Conversely, you also have people who write plots (creative), and you also have folks who crunch the ballistics (math/logic/programming). Again, the big titles will have artistic directors as well as technical project managers for both visual and underlying physical programming. They all work together and if they're successful they can sell a billion dollars worth of a game in a month.

If they're not successful...well, we've all seen what that can look like.

I believe guys that build their games from the ground up sometimes code in C++. But that language is much more complex (and equally more robust) than, say, Visual Basic. It all depends on how much time you want to invest in learning some new skills.

Hopefully that provides some insight.
Title: Re: Game programming languages
Post by: Capn Darwin on May 09, 2013, 10:05:47 AM
We are using Delphi XE2 with a handful of 3rd party software for Flashpoint Campaigns Red Storm. Also offers some cross platform capabilities.
Title: Re: Game programming languages
Post by: bayonetbrant on May 09, 2013, 10:23:13 AM
Quote from: Toonces on May 09, 2013, 01:45:18 AM
I have an interest in attempting to write a computer game program.  If I wanted to write a hex-and-counter type wargame, what programming language would you recommend, and why?

Back up a step -

Are you doing this b/c you want/need to write a program for some other reason, and you're choosing to do a wargame just 'cuz?

Or are you actually interested in making a game to explore a particular scenario or event?

Or are you trying to do something specific in a rules engine that you feel needs its own game to investigate?

I'm asking b/c there are a metric monkeyload of games out there, and it seems like doing some scenario editing or mod work (especially if its for, say, FPG where the devs are close at hand and can be hornswaggled into working with you) would be much, much easier than writing a game from scratch.

Keep in mind, too, that a 2-player game is going to be much easier to build than a solo game b/c you don't have to program an AI into a 2-player game.

Ask the devs 'round here - moving counters around a map and calculating damage from an airstrike is the easy part.  The hard part is programming the AI to move the counters around a map while consciously avoiding the airstrikes...
Title: Re: Game programming languages
Post by: carnator on May 09, 2013, 03:32:43 PM
You asked what language...so the answer is C++
But, I think you meant to ask what engine / tools should I use so I don't need to learn how to program...?  (obviously if you can't program then you are just using the tools provided, and not creating anything "new").
Title: Re: Game programming languages
Post by: eyebiter on May 09, 2013, 04:07:34 PM
Unreal offers a development kit for FPS games.  Free for non-commercial use, or $99 + 25% of profits above 50k for independent developers

http://www.unrealengine.com/udk/
Title: Re: Game programming languages
Post by: Toonces on May 09, 2013, 09:09:38 PM
Ok, well then I have a couple of "specific" ideas I'm interested in exploring.

And, I'll caveat everything by saying that this is mostly cloud talk right now; the reality of me actually sitting down and pushing out a true game are slim.  But, depending on how my free time evolves over the next couple of months, I might just give it a shot.

Game 1:  I have an idea of converting the boardgame "Carrier" into a computer version.  I realize copyright and all that- just bear with me for now.  I think that Carrier is a good candidate for a computer game because 1) I'm interested in it, 2) It is solo and the AI is driven by tables and rules that can be interpreted into a computer language very readily, 3) With the exception of Carriers at War, tactical CV vs CV combat hasn't been done well. 

Game 2:  I like War of the Roses, but what I really want to do is play the London Tournament part of the game as a game unto itself.  The idea would be to just have a whole tournament world that allows the player to take a knight and fight through the lists for glory.  This might have been done already in Mount and Blade, and in fact modding M&B is probably a more viable alternative.

But if I were to create a FPS game from scratch, that's the idea I have.

Hopefully that clarifies where I was going with my questions...
Title: Re: Game programming languages
Post by: besilarius on May 10, 2013, 06:16:12 AM
Toonces, with your interest in carrier combat, if you haven't found the books of Barrett Tilman "Clash of Carriers", do yourself a favor.
Add his stuff to Shattered Sword (Midway) and you've got a very clear presentation of how the two navies air elements worked.
Title: Re: Game programming languages
Post by: MikeGER on May 10, 2013, 07:19:55 AM
Toonces
how about Lua (script)
and test your first programming learning skills with manipulating  favorite stuff in the DCS World  8) you know and love?
= instant gratification when "a little AI" Idea with a LUA script  4expl in a mission works like planed...

and your programming skills (solving a problem with math, function, loops, conditions,.. )  carying over to any other language you may later chose for your games.

programming can be splitt of in: building an algorithm which does the trick for your needs, and getting it writen down according to the unforgiving complicated syntax/ruleset of a given language.
If you know how to solve, its just adjusting to the different syntax.

Now the crux is:, The easier and forgiving the language to write in, the slower it usually execute and the farer its from the hardware.  So a critical realtime problem will ask for a less compliant to us language, down to even machine code itself ...will not happen with your project... but propably with for example Raytheon's, Rheinmetall, EADS needs

the hardboild answer is of course: C++
...but not nesseary for a wargame

for FPS i think i would also name Unity, but how large a team you will hire to get a decent result in decent time with all the art and 3d-modelling stuff to build.
Title: Re: Game programming languages
Post by: Toonces on May 11, 2013, 12:16:54 AM
Hey Mike,
Yes, I had an idea to start working on some sort of dynamic campaign generator in lua for DCS.  I've been hesitant only because I haven't really explored the robustness of the supplied editor.

Lua is on my short list, though, for the exact reason you mention.
Title: Re: Game programming languages
Post by: Toonces on September 28, 2013, 04:14:59 PM
Necro-bumping this old thread.  I've taken the first baby step and ordered two books from Amazon.com about game programming.  One is just an overview of game design in general, the other is a general look at how a computer game is structured. 

I think they'll be good fundamental building blocks for me to sort of wrap my head around how to turn my ideas into code.

Once I have a grasp of the fundamentals I'm going to look harder at what language or tool is best. 
Title: Re: Game programming languages
Post by: GDS_Starfury on September 28, 2013, 10:07:13 PM
Id recommend figuring out what game you want to make and then find a similar game already out there and mod it.
Title: Re: Game programming languages
Post by: LongBlade on September 28, 2013, 11:11:58 PM
Quote from: GDS_Starfury on September 28, 2013, 10:07:13 PM
Id recommend figuring out what game you want to make and then find a similar game already out there and mod it.

That's a good idea.

Star, maybe we can apply that to your Panthers in the Fog review. I'll send you a review I wrote and you can mod it. Just replace "Orcs Must Die!" with "Panthers in the Fog." and you'll be golden.

http://grogheads.com/rev-omd2.html
Title: Re: Game programming languages
Post by: Bison on September 28, 2013, 11:23:51 PM
Quote from: LongBlade on September 28, 2013, 11:11:58 PM
Quote from: GDS_Starfury on September 28, 2013, 10:07:13 PM
Id recommend figuring out what game you want to make and then find a similar game already out there and mod it.

That's a good idea.

Star, maybe we can apply that to your Panthers in the Fog review. I'll send you a review I wrote and you can mod it. Just replace "Orcs Must Die!" with "Panthers in the Fog." and you'll be golden.

http://grogheads.com/rev-omd2.html

HAHAHA!!!!!!!!!   OMFG!  Classic.
Title: Re: Game programming languages
Post by: GDS_Starfury on September 28, 2013, 11:48:09 PM
well speaking of CC, I learned a lot about how a game works by modding that one.  once you start messing around with one part you see how it affects the rest and its a good learning tool.
Title: Re: Game programming languages
Post by: Bison on September 29, 2013, 12:13:44 AM
I still don't quite get your strong dislike of Panthers.  This is not a review comment.  I actually thought it was pretty decent beyond my complete inability to take out Panthers on a regular basis.
Title: Re: Game programming languages
Post by: GDS_Starfury on September 29, 2013, 12:39:37 AM
after everything else thats been done with that series it was more of a half assed mod then a game people should spend money on.
Title: Re: Game programming languages
Post by: GJK on September 29, 2013, 10:00:14 AM
Drudging up this old topic again - I hadn't seen it before. 

I too would LOVE to do a "Game Assist Program" for Carrier.  Either a GAP where you play the game on the tabletop and then a program does all of the chart referencing and tracking for you(*) or even better, Carrier on the PC.

I bought this book:
http://www.amazon.com/Going-War-Creating-Computer-Games/dp/1598635662/ref=sr_1_1?ie=UTF8&qid=1380466352&sr=8-1&keywords=wargame+programming

And have a copy of Multimedia Fusion 2. 

http://www.clickteam.com/multimedia-fusion-2

It's fairly simple and I think that if I stuck with it, I could make some progress.

I realize that every "real" programmer is going to say not to use some proprietary programming GUI knock off if you're looking to make "real" games and I get that.  This might be good for doing something for just you or some friends.

(*) There is a "GAP" that was made years ago using QBasic I think.  grognard.com has the source code and if you can scrounge up a copy of QBasic, you can compile it.  It does have some coding errors in it however.  I've started to use this code and have tried to convert it to BlitzMax but have only gotten so far. Speaking of BlitzMax, that is the program that gameleaper is using for his WarTactical game.
Title: Re: Game programming languages
Post by: Toonces on September 29, 2013, 02:18:40 PM
I have that book as well.  I think MMF2 would work for a Carrier computer game.  However, I spent some time thinking about it and researching it, and I suppose that I came to the conclusion that if I'm going to invest the time to learn how to program I want to learn a program that is versatile enough to do multiple games if this goes anywhere.

But even before that, I feel like I need to get a better handle on how to structure a game program in the first place.  When I was a kid this stuff was second nature, writing GOSUB routines in BASIC on my Atari.  I've long since forgotten all of that!

Basically I'm finding myself in between college classes and I have some free time on my hands.  Learning to program is something I've wanted to do for a while now, so this is a good time to jump in and give it a try.

I'm not going to create the next Total War or Call of Duty game, I know that, but I do have some ideas for games that I'd like to play and I'd like to at least try to make something.
Title: Re: Game programming languages
Post by: SgtRock on October 02, 2013, 03:59:21 PM
Python

take a look at

http://inventwithpython.com/pygame/
Title: Re: Game programming languages
Post by: GDS_Starfury on October 02, 2013, 09:40:52 PM
Im not lookin at your python.   :o

but I know someone who might shave it.  ::)
Title: Re: Game programming languages
Post by: Toonces on October 03, 2013, 12:44:12 AM
Got my books today.  Man alive are they meaty.

I wonder if my attention span will last long enough to actually do anything, now that I have them.   ::)
Title: Re: Game programming languages
Post by: GDS_Starfury on October 03, 2013, 12:53:23 AM
dude.... listen to me.
find a game and apply what you read.  dry reading will blunt the creative process.
pick a game you like, not love, thats already been modded and dig into it.  take apart the tools and take apart the game and start messing around.
Title: Re: Game programming languages
Post by: Toonces on October 03, 2013, 12:54:37 AM
Dude, I've done modding before.  This isn't about modding.  It's about learning something new that I don't know how to do, but I've always wanted to do.  Stop harshing me brah.
Title: Re: Game programming languages
Post by: GDS_Starfury on October 03, 2013, 12:57:29 AM
I aint harshing ya, Im trying to help you.
what did you play around modding?
the hexidecimal shit made my eyes glaze over with the CC games.
milkshape and code did the same thing with Homeworld.
I got pretty far into both before I realized its best left to people with thicker glasses and no sex life.  ;)
Title: Re: Game programming languages
Post by: GJK on October 03, 2013, 06:38:42 AM
My issue with learning programming is what Toonces hit upon; the span of attention that is needed.  I program dynamic websites by self-learning server side scripting.  I actually did that professionally for a while (dot com boom, anybody remember that??).  So learning programming languages isn't beyond me.  I've looked at Python, C++ and visual basic.  I've made a few simple things and I understand how to put those things together.  I get bogged down with the creative process; do I begin coding the UI first or build all the data tables and then build mini UI's that will take a random number, apply variables and constants and then have the result pulled from the data table?  Then do I start to put all of those little pieces together and makes calls in the routine that handle when those sub-routines are run?  I suspect yes, but that's where my attention span wanes.
Title: Re: Game programming languages
Post by: SgtRock on October 03, 2013, 05:00:26 PM
Quote from: GJK on October 03, 2013, 06:38:42 AM
My issue with learning programming is what Toonces hit upon; the span of attention that is needed.  I program dynamic websites by self-learning server side scripting.  I actually did that professionally for a while (dot com boom, anybody remember that??).  So learning programming languages isn't beyond me.  I've looked at Python, C++ and visual basic.  I've made a few simple things and I understand how to put those things together.  I get bogged down with the creative process; do I begin coding the UI first or build all the data tables and then build mini UI's that will take a random number, apply variables and constants and then have the result pulled from the data table?  Then do I start to put all of those little pieces together and makes calls in the routine that handle when those sub-routines are run?  I suspect yes, but that's where my attention span wanes.

Design first, then start with something simple like a creating a map and some kind of (thing/unit) to move around the map.

Go join some beginner game design forms.
You might want to look at some of the development tools for mobile apps (phones/tablets).



Title: Re: Game programming languages
Post by: gameleaper on October 11, 2013, 07:58:29 PM
Well I have been programing since 1980, and got my first home PC ZX81 in 1981. The most important things to look for in a language of process in which to do to produce a game are 1) transparency, without transparency your limited to rectangles as graphics, so PNG support would be great. 2) Rotation, you need to be able to rotate a none rectangle graphic. 3) collision, you need to detect a collision of a none rectangle rotated graphic. 4)size of compiled game 5)What extra files are needed to run the game

you wont need all 3 in boardgames, but just do some tests to find out if you can do these things, before you start programing. Also I would look for an easy language to learn AND easy to write, C++ is a pig for getting syntax wrong. there are benefits and drawbacks to every language, you plan your game and figure out what you need.

I use BlitzMax from blitzbasic.com , its the best I have ever come across, the only drawback is it cant scroll around a map you need to put hextiles instead. its a super basic and has Transparency, Rotatio, and collision, its cheap too compared to other ways to produce a game. The size of the finished game is very small perfect for distribution. no extra files needed to run your game(No .NET needed etc...) extra files can need extra copywrite so its not realy your game, blitzmax needs no extra files. Blitz is a superbasic which makes it the easiest for a new programmer to use.

I hope you get the bug to program, remember to test everything and backup before you run a test. It is hard work to program, but you do it in small blocks,looking at someones elses code looks complicated its what puts off most people, but it was built a bit at a time in easy chunks, so don't be put off

here is a simple game with source code, its old fashioned old skool, but I like these type of games. the programing is long winded , programing is a lot of copy pasteing so just look out for the interesting bits
http://www.mediafire.com/download/4dka6zx2d6566fx/TexTPrivateer.zip
Title: Re: Game programming languages
Post by: Mr. Bigglesworth on October 13, 2013, 10:15:45 AM
I bored out of turbo pascal in HS. End. I have made a variety of systems in Excel, Access, SQL Server that ran the operations of companies bypassing their ERP systems. Nobody messes with success whatever the executives say should work. Here is the point:

Programming languages change like fashion in Paris. Focus on the core of how things work. You need the math model. You need the database. Make those parts how you understand the system to work then do the programming in whatever language seems to have a future at the time. If you learn the programming first by the time you have done the guts of the system you have to learn another.
Title: Re: Game programming languages
Post by: Toonces on October 13, 2013, 02:27:41 PM
Yeah, I agree with that Biggs.

I've been doing a bit of reading and I realize how dumb this question was now.  Really I can get to where I want to go with any number of languages.  I suppose a better question might have been "how do I learn to program?" or something like that.

I'm reading two books concurrently, Game Coding Complete and Introduction to Game Development.  Both books are about 1,000 pages so it's a lot of reading but I'm making good progress.  The Game Coding book is a bit tougher because it uses a lot of examples in C++ to illustrate their points, and not knowing C++ some of the nuances are lost on me.  However, I get the gist of it and without getting wrapped up too much in the code they explain how to structure a game program.

The Intro book is better as it takes  a more macro stance of explaining how a game is structured.  I'm probably learning more from this book about how to think big picture how to make a game.

The Game Coding book comes with source code that you can type in and compile into a game at the end, with a lot of explanation of the hows and whys. 

On game languages, based on what I've read and comments here and at other websites, I think I'd be best served with a higher level, simpler language at the expense of flexibility.  While learning C++ would be optimal, for what I want to do I don't think that's necessary.  I've been sort of looking at C# and Java gets mentioned a lot.  I have more research to do, though.  I'm not at the point of pushing buttons yet, but I have a much better appreciation of the steps involved in writing a game than I did when I started this thread.  I think by the time I'm done reading and sketching out my ideas into a skeleton of a game I'll have a better idea of what language is the best to start with.
Title: Re: Game programming languages
Post by: LongBlade on October 13, 2013, 02:52:30 PM
Some guys are gifted programmers. They're born to code.

I'm not one of them. I've studied some languages and managed to be moderately competent with them. But I've always needed a teacher to help start me down the road.

Once in a while you'll meet someone who is more-or-less self-taught. They only need school for the sheepskin so someone will believe them when they interview.

I realize you've got a lot of irons in the fire already, but you might see if your employer offers some continuing education incentives and could help pay for a class or two to help assist you in your endeavor.