![]() |
Programming - which language for this project?
I want to start work on a very large project soon and can't decide which language to write it in.
Basically, the program will be a "life simulator" on a very basic level - think of a group of ants running around, gathering food and giving birth to more etc. This program will run as a server and will work on it's own in the background with no need for any interaction. The way interaction will occur is by outputting lots of figures, e.g. current virtual time, number of inhabitants, ages of inhabitants, current location in the "world", via TCP/IP (local or remotely) to any client program that requests it. I imagine that I will be using MySQL (separately or the embedded version) to store all the data produced. It really gets interesting when it comes to the client software, because the server only outputs data over TCP/IP connections this means that a Perl/PHP script on a remote server can grab the data for use on a webpage or even a DirectX game could use this to give a visual display of what's going on in this virtual world (again on the local machine, on the network or on the internet). I'm a bit stuck on the language to use though, I thought about using C but dismissed this. I could use any of the following though: C++ Anything which uses Microsoft .NET, e.g. VisualSomething PHP Perl Python The last three wouldn't really be suitable though because they just execute once and that's it - they wouldn't be able to run forever in the background (with some exceptions, like Perl:Tk but even this is still calling other functions from within the main loop). Any other recommendations? |
Re: Programming - which language for this project?
Sounds like the sort of thing I'd love to do, I'm very interested in Agent Programming.
Quote:
Quote:
Quote:
My personal choice would be to go for Java, the benefits of it are that threading, tcp/ip and SQL are all part of the standard package which makes things a lot easier. On the downside, the performance isn't quite as good as C++, though recent VM's aren't lagging far behind. J2SEv.1.5 also has some nice new features. |
Re: Programming - which language for this project?
Hmm....Visual C++ sounds good, AFAIK the .NET SDK comes with a compiler too. :)
|
Re: Programming - which language for this project?
Why no Java in your list of potential languages? Assuming that you know C++, you wouldn't have any problems with Java.
|
Re: Programming - which language for this project?
I don't know C++ all that well and have only briefly played with it. ;)
I am quite experienced with PHP though, which is very similar, syntax wise. Maybe I'll look at Java too then but the first time I saw Java code, I couldn't make any sense out of it. :pp |
Re: Programming - which language for this project?
Quote:
|
Re: Programming - which language for this project?
Thanks for the advice, I think I'm going to go with Java then. :tu:
Did you know that you can even use OpenGL with Java? I didn't until now: https://jogl.dev.java.net/ :) |
Re: Programming - which language for this project?
Quote:
Good luck with the project, I'd be very interested in seeing it once it's done. |
Re: Programming - which language for this project?
Hey Richard.
It sounds like Java would probably be best for you. Sockets are a doddle. 2D graphics and images are easy to use/munipulate (3D too). You can use ODBC for Java (JDBC) if you really need to store/retrieve data in a database. TBH the data sounds pretty primative, so you could probably store it locally. Don't forget vectors which are pretty powerful and can do DB-like storage. It's all nice and high level. Next one down i'd say would be VC++. With MFC and below, sockets are alright, along with 2d graphics, but it is much more work - but a little faster and more flexible. Visual Basic does all that too, but is a bit more higher level. I wouldn't recommend using a scripting language like PHP. I don't know much about Perl, but although PHP has good Socket support and excellent MySql support, it isn't very good for something animated that is going to need refreshing pretty quick. It's also liable to let you down on graphics (You'd probably have to render the images in PHP and layer/position them in HTML - not the end of the world). HTH |
| All times are GMT. The time now is 22:14. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum