|
|
|
 |
|

February 23rd, 2009, 06:51 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Perking up the AI
That would indeed be great. It'd be a big project though, and not one I personally can even attempt being as SemiRandom is a windows program and (a) my server is Linux, and (b) I don't have a lot of skill in doing interesting things in Windows. Otherwise I might succumb to temptation and add it to the LlamaServer some time.
|

February 23rd, 2009, 06:52 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Perking up the AI
What language is SemiRandom written in Ballbarian?
|

February 23rd, 2009, 08:53 AM
|
 |
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
Re: Perking up the AI
SemiRandom is written in Yabasic, which should work in Linux. The RanDom front end that builds the command line for dom3 is written in VB6. SemiRandom is where most of the work was done and is manipulated through an external text/cfg file.
I really wish that I was able to utilize a more advanced cross-platform gui solution, but I get very frustrated with not immediately knowing how to perform simple tasks.
Can anyone recommend the direction of least resistance for an old windows user who started programming in basic on an TRS80 back in the early 80's and now is stuck in VB6 for his GUI needs? Don't get me wrong, I love VB as it is much more powerful than it gets credit for and allows me to generate fairly complex solutions quickly and painlessly for work. I just wish I could compile my work as a functional web page or something along those lines. Guess I should take the time to do some more research. Anybody familiar with VB6's web programming features?
|

February 23rd, 2009, 09:13 AM
|
Second Lieutenant
|
|
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
|
|
Re: Perking up the AI
Define 'least resistance', BB. I don't recall very much of VB (mainly because I sucked at it), but I do know both C and Java.
From comments I've picked up in my classes, Perl is apparently widely known for its ability to take virtually any syntax and parse it correctly. This may allow you to write it 'VB code' and get a working web app.
Other than that, I'd suggest Java, due to the incredible ease of making web-ready apps with it. And I say this as someone who started dabbling in programming not long after you.
|
The Following User Says Thank You to VedalkenBear For This Useful Post:
|
|

February 23rd, 2009, 10:19 AM
|
 |
Major
|
|
Join Date: Feb 2009
Location: Me a viking
Posts: 1,012
Thanks: 81
Thanked 122 Times in 73 Posts
|
|
Re: Perking up the AI
Quote:
Originally Posted by llamabeast
That would indeed be great. It'd be a big project though, and not one I personally can even attempt being as SemiRandom is a windows program and (a) my server is Linux, and (b) I don't have a lot of skill in doing interesting things in Windows. Otherwise I might succumb to temptation and add it to the LlamaServer some time.
|
I can´t do programming at all so it was just a general idea, can´t say what´s possible or not. I did some basic web design in code though (html, css, java, flash etc.) and my insticts tell me it should be possible given the right knowledge.
As a compliment to the Llamaserver I beleive it could prove one of the most important improvements yet to this great game. Just think of it, compiling a "random" scenario to your liking and then seamlessly start it up on the Llamaserver with a mix of human players and predesigned AI:s to your own liking. wow.
Don´t misunderstand me I know this is perfectly possible already using the current semirand but it´d be on a whole new level of availability, like something poeple would do regularily every day.
I use osx myself and I can´t seem to overcome the hassle of emulating semirand through some yet to be installed windows partition and then ship the files back and then...
If someone would undertake this grandiose mission I´ll do my part and make cheery uneducated comments daily! promise 
|

February 23rd, 2009, 11:11 AM
|
 |
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Perking up the AI
As I wrote for another YaBasic program before, things that are compiled for Windows don't work on Linux or Mac out of the box. YaBasic is available for other platforms, though, and with the source code, the users could use the program natively as well.
Somebody expressed interest in reimplementing the SemiRand program in Python, IIRC it was pyg. Python is one of those newer hip programming languages that are "web-aware" because they are interpreted script languages that can be told to get input from and give output to a webserver. There's even the possibility to use modules that run the program in its own mini-webserver. Another programming language that comes from the realm of web applications is PHP. It is probably the one that is supported and used the most across the web. Personally, I would advise against Perl because I consider it a little bit archaic. I haven't used modperl to know if it's any different, but there are a few pitfalls with CGI programs that make it hard to develop. Instead of getting useful tracebacks, you'll more often than not will be greeted with just a "500 Server error" if there is any kind of problem with your program. I don't know much about Ruby other than the Rails framework. Another option would be C# or other programming languages from Microsoft's Sharp family, which is probably a lot more accessible for web tasks than any VB-extensions. This would once again limit you to the MS-World, though the Mono project manages to get some things across to other platforms.
As for GUIs, Python has bindings for almost every popular GUI framework there is: Qt, wx, GTK and it's own TkInter among others. They are all usable, with just some differences.
So if you are ready to learn a new programming language, I'd definitely recommend Python to you. If you want to learn as little as possible, look at Microsoft's SharpDevelop suite. Just download the latest free version of Visual Studio to start.
P.S.: I read VedalkenBear's post now, which I didn't before. Syntax-wise, PHP can be used in a multitude of ways, too. You can have a completely object oriented program, if you wish, with PHP5 it's possible to have exactly the same programming as in Java, but you can have it all very functional as well, or just use it like a minimal templating language. AFAIK there are extensions to have Java for webservers, but its biggest strength comes from being able to embed it as applets where the code isn't run on the server, but on the user's machine. This could open some interesting opportunities for some projects. The only problem might have been that Java was pushed to get widespread use long before the machines were fast enough to handle the virtual machine that it uses well, so now it has the reputation of being very slow. Nowadays Java applets aren't that much of a drag anymore. I think that it's a little hard to get into it, depending on your background maybe, but development-wise you will get very detailed tracebacks if there are problems that you run into.
Last edited by lch; February 23rd, 2009 at 11:25 AM..
|
The Following User Says Thank You to lch For This Useful Post:
|
|

February 23rd, 2009, 01:33 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Perking up the AI
Quote:
Originally Posted by Ballbarian
SemiRandom is written in Yabasic, which should work in Linux.
|
SemiRand works fine for me on my linux. I did have to make one small fix (one line didnt recognize \ vs / on a path) but I think you fixed that in later versions. That was with the source-code version which I prefer. I havent tried the exe version yet.
Quote:
I really wish that I was able to utilize a more advanced cross-platform gui solution, but I get very frustrated with not immediately knowing how to perform simple tasks.
|
Perl and Python are often recommended as step-ups from Basic.
If you want to stick with Basic there are plenty of options. Check out
http://www.thefreecountry.com/compilers/basic.shtml
There are quite a few that offer simpler and more cross-platform guis than vb.
Also there exist many cross-converters for source code. Bas to C, or bas to php, or bas to java script. And there are also compilers for VB to linux. They can be handy to write in one and convert to another. Especially if you are trying to learn the other language its handy to see how your old code would be written in the new one.
If you feel like switching, here is a fun first-stop site for checking out new languages.
http://www.99-bottles-of-beer.net/
Its the same program (99 bottles of beer on the wall) done in over 2000 programming languages. A great way to get a quick feel for how far off it is from what you already know.
Quote:
Can anyone recommend the direction of least resistance for an old windows user who started programming in basic on an TRS80 back in the early 80's and now is stuck in VB6 for his GUI needs?
|
Anything thats been around awhile has versions for each need. If you need it, someone has probably done it. There are many excellent basics still in active development. And many of them have simplified gui's using libraries that are more portable than windows dll's.
Gandalf Parker
--
For programmers: 42 = "Hello World"
|
The Following User Says Thank You to Gandalf Parker For This Useful Post:
|
|

February 23rd, 2009, 01:40 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Perking up the AI
Quote:
Originally Posted by lch
As I wrote for another YaBasic program before, things that are compiled for Windows don't work on Linux or Mac out of the box. YaBasic is available for other platforms, though, and with the source code, the users could use the program natively as well.
|
Actually the program you made that comment on ran fine for me on linux. I suspect it would on mac also. This is if wine is loaded (which it usually is). I was abit surprised since I rarely try running a windows exe from the command line on a linux machine.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|

February 23rd, 2009, 01:50 PM
|
Second Lieutenant
|
|
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
|
|
Re: Perking up the AI
Ich: The only reason I didn't suggest Java more strongly is because it is highly adapted to OOP, and VB (to my knowledge) is... not.
If someone could explain the underlying logic of SemiRandom, I could try programming it in Java.
|

February 23rd, 2009, 03:13 PM
|
 |
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
Re: Perking up the AI
I am definitely going to give Python another look (as well as Java). A lot of great information there guys! Thanks a ton.  When I get home from work, I am sure I will have some more questions if the OP doesn't mind me dragging his thread further into the depths of "off-topicness".
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|