What's the Best Programming Language for Wargames?

Gamers can also use this forum to chat about any game related subject, news, rumours etc.

Moderator: maddog986

User avatar
PunkReaper
Posts: 1003
Joined: Wed Aug 23, 2006 6:27 pm
Location: England

RE: What's the Best Programming Language for Wargames?

Post by PunkReaper »

Is Dark Basic suited to your needs......
User avatar
TonyE
Posts: 1583
Joined: Mon May 22, 2006 9:50 pm
Location: MN, USA
Contact:

RE: What's the Best Programming Language for Wargames?

Post by TonyE »

ORIGINAL: bobogoboom

php is horrible as a programming languege. most programming langueges at least understand the concept of name space.

I won't disagree with you there. Being a horrible language doesn't mean it is always the wrong choice though.
Sincerely,
Tony Eischens
Harpoon (HC, HCE, HUCE, Classic) programmer
HarpGamer.com Co-Owner
User avatar
Zakhal
Posts: 1407
Joined: Thu Jan 04, 2001 10:00 am
Location: Jyväskylä, Finland

RE: What's the Best Programming Language for Wargames?

Post by Zakhal »

ORIGINAL: bobogoboom
php is horrible as a programming languege. most programming langueges at least understand the concept of name space.

I dont really care if it has namespaces or not as long as its widely popular and people pay lots of money to you when you code with it. [:D]

Also if you really need it PHP5.3/PHP6 do seem to have namespaces.
"99.9% of all internet arguments are due to people not understanding someone else's point. The other 0.1% is arguing over made up statistics."- unknown poster
"Those who dont read history are destined to repeat it."– Edmund Burke
GaryChildress
Posts: 6925
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

RE: What's the Best Programming Language for Wargames?

Post by GaryChildress »

OMG, I'm really cracking myself up now! I don't know what I did but I got this to work! (Kind of a loose patchwork of lines I picked up from various mini-scripts and incorporated into my own script. [8D]

Pick a number between 1 and 100 and if it matches a random number generated by the program it will say "You win!" if not then "You lose!". [8D]


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int number;
Random RandomClass = new Random();
int RandomNumber = RandomClass.Next(1, 100);
Console.WriteLine("Pick a number.");
number = int.Parse(Console.ReadLine());
if ((number > RandomNumber) || (number < RandomNumber))
Console.WriteLine("You lose!");
else
Console.WriteLine("You win!");
Console.WriteLine("The Lucky Lotto number is:");
Console.WriteLine(RandomNumber);
Console.ReadLine();

}
}
}

Programming is pretty fun (until something doesn't work). [:)]



Image
Attachments
Lotto Game.jpg
Lotto Game.jpg (19.85 KiB) Viewed 4014 times
User avatar
Perturabo
Posts: 2461
Joined: Sat Nov 17, 2007 5:32 pm
Contact:

RE: What's the Best Programming Language for Wargames?

Post by Perturabo »

ORIGINAL: Gary Childress

OK. So let's say I want to learn C++. Are there any inexpensive online colleges which others here can recommend which offer classes over the Internet?
College?
ORIGINAL: Gary Childress

Also whats the cheapest LEGAL way of getting C++?
Bloodshed Dev C++.
GaryChildress
Posts: 6925
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

RE: What's the Best Programming Language for Wargames?

Post by GaryChildress »

What do you call them then? Online Universities?
User avatar
Terl
Posts: 601
Joined: Wed Jun 01, 2005 10:47 am
Location: Charleston, WV

RE: What's the Best Programming Language for Wargames?

Post by Terl »

Have you tried picking up a second hand text book? I got one via Amazon and just work at my own pace at home and dead times at work. I find I learn better by reading and just trying to program something with what I have learned to date. The best way to get good at it is to just do it and keep trying. Just pick a modest goal and go for it.

There are some versions of basic that are made for game programming and are fairly easy to pick up as well (DarkBASIC and Blitz Basic). These are great to learn programming flows and you can actually make commercial quality games with them. There is also Emergence Basic which is quite good as well. If you mostly want to learn programming and another language may work for you, these might be worth checking out. DarkBASIC has quite an active community willing to advise and assist too.

There are a wealth of choices out there. If you just google for things like "C++ tutorials" or "learn C++" you can find a lot of resources too.
GaryChildress
Posts: 6925
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

RE: What's the Best Programming Language for Wargames?

Post by GaryChildress »

Thanks. I'll try to find an inexpensive text book online. Right now I'm just sort of stumbling through things but I find that I'm actually learning things in a goal oriented setting. First I set easy goals like a Lottery program or a random die rolling program (below). And then try to gather the resources necessary to complete them. I'm actually learning a little faster that way I think, rather than going page by page through a tutorial. But you are right a tutorial is next in line for me.

So now I've got my first program to resemble the random roll of a six sided die. What do you think? It's probably a fundamental baby step toward my first real wargame. Just give me a few more years. [8D]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestVisualC1
{
class Program
{
static void Main(string[] args)
{

Console.WriteLine("Fire when ready!");
Console.WriteLine("Hit enter key to fire");
Console.ReadLine();

Random RandomClass = new Random();
int RandomNumber = RandomClass.Next(1, 6);
if (RandomNumber > 4)
Console.WriteLine("Hit!");
else
Console.WriteLine("You missed!");
Console.WriteLine("The number generated was:");
Console.WriteLine(RandomNumber);
Console.ReadLine();

}
}
}





Image
Attachments
dierollgame.jpg
dierollgame.jpg (20.76 KiB) Viewed 4015 times
User avatar
Gil R.
Posts: 10820
Joined: Fri Apr 01, 2005 4:22 am

RE: What's the Best Programming Language for Wargames?

Post by Gil R. »

ORIGINAL: Gary Childress

If I were going to learn a programming language with which to create a war game what would be the best language to use? What programming language are the majority of wargames created with? What programming language works best with wargames?


If you plan on making a game devoted to the Civil War or Napoleonic Wars that combines both a strategic and tactical level then I'd say that BASIC ADVANCED is definitely the way to go. For any other periods, go with C++ or something else.
Michael Jordan plays ball. Charles Manson kills people. I torment eager potential customers by not sharing screenshots of "Brother Against Brother." Everyone has a talent.
User avatar
Perturabo
Posts: 2461
Joined: Sat Nov 17, 2007 5:32 pm
Contact:

RE: What's the Best Programming Language for Wargames?

Post by Perturabo »

ORIGINAL: Gary Childress

What do you call them then? Online Universities?
IMO a paid online programming schools are a waste of money. You can learn all the needed thing from free tutorials. Also, there are whole sites/communities dedicated to gamemaking which may have some game creation orientated series of tutorials.
User avatar
Fred98
Posts: 4019
Joined: Fri Jan 05, 2001 10:00 am
Location: Wollondilly, Sydney

RE: What's the Best Programming Language for Wargames?

Post by Fred98 »

What is the difference between Microsoft Visual Basic as discussed above and Microsoft Visual Basic that comes with an Excel spreadsheet?

-
WYBaugh
Posts: 158
Joined: Mon Jul 05, 2004 7:50 pm

RE: What's the Best Programming Language for Wargames?

Post by WYBaugh »

ORIGINAL: Joe 98

What is the difference between Microsoft Visual Basic as discussed above and Microsoft Visual Basic that comes with an Excel spreadsheet?

-

Hey Joe,

A real quick answer would be that the Visual Basic in Excel is called VBA (Visual Basic for Applications). It is used to manipulate the spreadsheets/data in Excel. Visual Basic.NET is a full fledged development language allowing you to create windows forms, console and web apps.

For game designing, you would want to use C++/C# and or VB.NET

Hope this helps.

Bill
User avatar
Veldor
Posts: 1434
Joined: Sun Dec 29, 2002 9:32 am
Location: King's Landing

RE: What's the Best Programming Language for Wargames?

Post by Veldor »

ORIGINAL: Gary Childress

If I were going to learn a programming language with which to create a war game what would be the best language to use? What programming language are the majority of wargames created with? What programming language works best with wargames?

Thanks. [:)]

Gary,

I have some very specific advice I can give to your question. What others have already said is all good advice. But my specific advice:

1. Do not, REPEAT, do not learn C++. If you already knew it there is nothing wrong with it but the market for it is diminishing in rapid favor of C#. Speaking for a large consulting firm we have loads of C# work across all avenues (Except maybe the hardware/driver side which is still highly C++). Java is diminishing, pretty much everything is outside niche uses. What you see is people/companies building on what they already know but anyone starting anything new from the ground up or otherwise recruiting etc. is C#. If you must choose something else to learn from scratch go with VB.NET.
2. Wargame specific reason to use C#. This only applies to the latest versions especially more-so 2008 version. Windows Forms... Its the most wonderous thing for wargaming. Pretty much zero coding to make your editor. We all know how much data is in games like these. You can interface with free versions of SQL Server Express or Compact Edition to store and manipulate all the data (redistributable free). Very little SQL knowledge needed through the C# Windows Forms interface (Like not much more than the book below teaches you). Really slick end results, almost no coding again. Comparable with some other languages results in 2007 and blows the socks off anything with the 2008 C# edition.
3. Enough C# gaming books are out to cover just about anything else you would need even DirectX Advanced Level which may not even be needed for a Wargame.
4. Plenty of online help since it has such widespread usage across both business and gaming.
etc. etc.

What I specifically recommend to learn and produce... Skip any class (I say this as a Microsoft Certified Trainer amongst my other jobs/roles), I can eleborate specifically why if you request.

Step #1 - Buy this Book: HEAD FIRST C# - ISBN 0-596-51482-4 (This is the best writing style ever invented for learning a programming language. If this doesn't work for you honestly don't know if I'd go any further with it)
Step #2 - If you make it through that ok go ahead and spend $99 on the Standard Edition of C# 2008 (You dont need the PRO version and if your not willing to invest $200.00 or less in the total effort than its not an effort in the first place) :)
Step #3 - Buy this Book: WINDOWS FORMS 2.0 PROGRAMMING - 0-321-26796-6

You can make a fully finished commercial product with nothing but the above (well a cheap one anyway). From there you can get into DirectX etc. but for less than $200.00 (Well outside of Graphics & Sound Editing Software) you can't go wrong. Never understood why some insist so much on the fully freeby software and efforts. What you learn for your $200.00 you could earn 5 times that taking one simple side project off of a tech match making site not to mention a better job in the long run should that be of any interest.

You may or may not be able to buy used versions of those books on Amazon but I cannot stress enough those specific ones vs. others to get started. All the standard suggestions (Deitel books etc. just arent good unless your already skilled/experience or want to read text book or reference style 10,000 page nonsense). What you need is something that motivates you to continue instead of creating frustration that makes you give up and quit.

Only my own pro opinion. God bless Delphi fans and MS H8ers!
GaryChildress
Posts: 6925
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

RE: What's the Best Programming Language for Wargames?

Post by GaryChildress »

Thanks Veldor. [:)]

I'll give those books a look up and see what I can find.
User avatar
Widell
Posts: 890
Joined: Wed Apr 27, 2005 2:25 pm
Location: Trollhättan, Sweden

RE: What's the Best Programming Language for Wargames?

Post by Widell »

Regardless of some of the rather stupid remarks regarding PHP, I'd say it's a good option for online stuff where you don't want a client side application. I have done stuff in VB, PHP/MySQL and C++ over the years, and I can only conclude you have to choose your tool depending on what you intend to do. Wrong tool = Lot's of additional work and possibly worse results. Right tool = The opposite. That beign said, VB and C are as good or as bad as PHP if you use them to solve the wrong problem (The classic is that you can't fix all your handyman stuff with a hammer, and you can't really solve all your computer communication stuff with Excel, although I have colleagues trying to do just that)

And to compare PHP with C++ is not a relevant comparison. They do very different things. Compare PHP to ASP and C++ to VB (or any other language of your choice).

I also want to second TonyE in his statement to go Open Source. You can get most tools you need initially for free regardless of what language or dialect you decide to go for.
User avatar
jwilkerson
Posts: 8109
Joined: Sun Sep 15, 2002 4:02 am
Location: Kansas
Contact:

RE: What's the Best Programming Language for Wargames?

Post by jwilkerson »

ORIGINAL: bobogoboom

...pascal that would also be a wrong choing.[:'(]

R U Sure? Our most excellent Flashpoint Germany is coded in "pascal" how could that be a wrong choing [sic] ?
AE Project Lead
SCW Project Lead
User avatar
sterckxe
Posts: 1897
Joined: Tue Mar 30, 2004 8:09 am
Location: Flanders
Contact:

RE: What's the Best Programming Language for Wargames?

Post by sterckxe »

ORIGINAL: jwilkerson
ORIGINAL: bobogoboom

...pascal that would also be a wrong choing.[:'(]

R U Sure? Our most excellent Flashpoint Germany is coded in "pascal" how could that be a wrong choing [sic] ?

As are all the games from AGEod : Birth of America 1 & 2, Campaigns of Napoleon and American Civil War.

The upcoming World in Flames as well.

Greetz,

Eddy Sterckx
User avatar
Jeffrey H.
Posts: 3154
Joined: Fri Apr 13, 2007 6:39 pm
Location: San Diego, Ca.

RE: What's the Best Programming Language for Wargames?

Post by Jeffrey H. »

I heard C-sharp is looking good. Also, I think Direct-X is going to be it's own challenge.
&nbsp;
History began July 4th, 1776. Anything before that was a mistake.

Ron Swanson
User avatar
Deride
Posts: 488
Joined: Mon Jun 21, 2004 1:48 pm
Location: Dallas, TX
Contact:

RE: What's the Best Programming Language for Wargames?

Post by Deride »

I highly recommend XNA Studio from Microsoft.

This is the new toolset from Microsoft that they are hoping to push for new developers. You can use these tools to write programs that run on PCs or XBox. If you build a nice enough game, you can buy the professional version that allows you to post your games to XBox Live - and even make money.

At Koios Works, we used C# with Managed DirectX, which was the pre-cursor to this toolset. It's the easiest way to make semi-professional or professional games.

Russ
User avatar
Veldor
Posts: 1434
Joined: Sun Dec 29, 2002 9:32 am
Location: King's Landing

RE: What's the Best Programming Language for Wargames?

Post by Veldor »

ORIGINAL: Deride

I highly recommend XNA Studio from Microsoft.

This is the new toolset from Microsoft that they are hoping to push for new developers. You can use these tools to write programs that run on PCs or XBox. If you build a nice enough game, you can buy the professional version that allows you to post your games to XBox Live - and even make money.

At Koios Works, we used C# with Managed DirectX, which was the pre-cursor to this toolset. It's the easiest way to make semi-professional or professional games.

Russ

Bingo! And why the XBox 360 and so on will do even better over time as they open it up more to just regular Joe's who want to make games for it using not much more than they should already know. Not aware of anything even remotely close available for PS3 or Wii Development...
Post Reply

Return to “General Discussion”