Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Programming - which language for this project?

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Programming - which language for this project?
Reply
 
Thread Tools
Old 21-04-2004, 15:09   #1
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
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?
Richard M is offline   Reply With Quote
Advertisement
Old 21-04-2004, 15:20   #2
philip.j.fry
Inactive
 
philip.j.fry's Avatar
 
Join Date: Jul 2003
Posts: 1,395
philip.j.fry has reached the bronze age
philip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze age
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:
Originally Posted by Richard M
C++
Good for Object Orientated programming which will be a considerable bonus from the sounds of things. Tricky to use though and you'll have to find all of the relevant libraries for networking etc.

Quote:
Anything which uses Microsoft .NET, e.g. VisualSomething
Well, out of all of the either VC++ or C# will do the job

Quote:
PHP
Perl
Python
I'd agree, a scripting language really wouldn't be suitable at all for this kind of thing.

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.
philip.j.fry is offline   Reply With Quote
Old 21-04-2004, 15:26   #3
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Programming - which language for this project?

Hmm....Visual C++ sounds good, AFAIK the .NET SDK comes with a compiler too.
Richard M is offline   Reply With Quote
Old 21-04-2004, 17:47   #4
Gareth
cf.mega poster
 
Gareth's Avatar
 
Join Date: Dec 2003
Age: 51
Posts: 7,101
Gareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny stars
Gareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny stars
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.
Gareth is offline   Reply With Quote
Old 21-04-2004, 17:56   #5
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
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
Richard M is offline   Reply With Quote
Old 21-04-2004, 18:20   #6
philip.j.fry
Inactive
 
philip.j.fry's Avatar
 
Join Date: Jul 2003
Posts: 1,395
philip.j.fry has reached the bronze age
philip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze age
Re: Programming - which language for this project?

Quote:
Originally Posted by Richard M
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
Ah, I didn't realise you didn't know much C++, my advice would be to steer well clear. I'm currently doing a module of C/C++ and I'm finding it all a bit of a nightmare with pointers, references and no garbage collection. If you take another look at Java, the syntax is very close to C++ (Algol-like syntax? I forget) but has a lot more built-in error checking and the garbage collection makes life so much easier.
philip.j.fry is offline   Reply With Quote
Old 21-04-2004, 19:14   #7
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Programming - which language for this project?

Thanks for the advice, I think I'm going to go with Java then.
Did you know that you can even use OpenGL with Java? I didn't until now:
https://jogl.dev.java.net/
Richard M is offline   Reply With Quote
Old 21-04-2004, 19:18   #8
philip.j.fry
Inactive
 
philip.j.fry's Avatar
 
Join Date: Jul 2003
Posts: 1,395
philip.j.fry has reached the bronze age
philip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze age
Re: Programming - which language for this project?

Quote:
Originally Posted by Richard M
Thanks for the advice, I think I'm going to go with Java then.
Did you know that you can even use OpenGL with Java? I didn't until now:
https://jogl.dev.java.net/
I did but I swear that project didn't exist when I looked into it about a year ago, can't remember the name of the one I looked at, it was an open-source project and had magic or wizard or something in the title

Good luck with the project, I'd be very interested in seeing it once it's done.
philip.j.fry is offline   Reply With Quote
Old 22-04-2004, 01:12   #9
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
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
punky is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 22:21.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum