also @ TechSpot: Customize Your Windows 7 Start Menu Button

Read on full site | Join TechSpot! (it's free) | Bookmark / Share this


Programming Language

Jaf
04-19-2004, 02:56 PM
Hi. Im just wondering if ne1 knows the best programming language to chosse. I've tried dark basic to make 3D games. Im wondering is there any programming language that can do everything. Like make 2D and 3D games, have internet commands, registry commands, system commands. I dont think visual basic. NET can make 3D games. Ijust need some suggestions on any good programming languages.

Thanx :) :) :)

Nodsu
04-19-2004, 03:40 PM
You can make games in anything. It just depends on your skills and devotion.

If you want to make a game worth anything you should choose the language you are the most comfortable with. And also try to get a hold of some realism when judging your skills :p

You don't even have to use a programming language to make a (not so impressive) game.
Have you heard of tools like "Games Factory", "PIE 3D", Milkshape 3D?

Ad
04-19-2004, 03:40 PM

me(who else?)
04-19-2004, 04:22 PM
I've tried making a 3D game in VB, but it was crappy. As a matter of fact, all my VB games suck. So far all I've found VB good for is utilities (like shred, etc.).

Nodsu
04-20-2004, 02:33 AM
No offense, but the quality of a game depends mostly on the maker of the game, not the tools used :p

You can make your "game" look prettier by using some pre-made tools but that doesn't mean the game would be any good.

Th3M1ghtyD8
04-20-2004, 06:55 AM
Visual Basic (VB6) can be used to make 3d games using either OpenGL or DirectX, but you'll find that it is a lot easy to program either graphics api if you use C/C++. If you plan on making 3d games e.g. FPS games then the Doom and Quake Source Code are both worth a look.

Dark Basic is supposed to be pretty good at making games, as it is based on C++ AFAIK. But for making simple tools, and knocking up programs quickly, nothing comes close to VB

me(who else?)
04-20-2004, 07:25 AM
Yeah, I'd say that my VB programs are "knocked up". What language are Quake and Doom written in? Definitely not VB.

Nodsu
04-20-2004, 07:34 AM
Anything remotely serious is written in some form of C

me(who else?)
04-20-2004, 07:40 AM
Is Java anything like C? I've never done any programming in C, so I wouldn't know. Isn't there a language called TopLink which allows the two to communicate?

BrownPaper
04-20-2004, 08:10 AM
my friend is making a rpg for ps2 with c++.

java is sorta like c++, or at least so i am told by my friend. i have not gotten around to messing with java yet.

Ad
04-20-2004, 08:10 AM

Th3M1ghtyD8
04-20-2004, 08:12 AM
Originally posted by me(who else?)
What language are Quake and Doom written in?

a mixture of C and C++.

Originally posted by me(who else?)
Is Java anything like C?

There are a lot of similarities between the 2

Nodsu
04-20-2004, 08:15 AM
Java is a lot like C++ which is a lot like C. But java is very different from C.

TopLink isn't really a programming language and not quite "allowing them to communicate". It's a tool that lets you kep Java objects in databases.
That is if the TopLink that you mean is the TopLink I mean-

smtkr
04-20-2004, 09:27 AM
Use C++ with OpenGL calls

Th3M1ghtyD8
04-20-2004, 09:42 AM
Use C++ with OpenGL calls

That way we can port it Linux and other platforms easily :D

Phantasm66
04-20-2004, 03:30 PM
Originally posted by Jaf
I've tried dark basic to make 3D games.

C++ for the brave and skilled.

Dark Basic for those who's imagination exceeds their patience.

YOU MUST FOLLOW THIS LINK!!

http://darkbasic.thegamecreators.com/

YOU MUST FOLLOW THIS LINK!!

Seriously this thing is not a gimmic it was used to teach computer games programming in a University I worked at.

me(who else?)
04-20-2004, 03:46 PM
The TopLink I'm thinking of was created by BEA (or The Object People, who they bought, then dissolved)

Phantasm66
04-20-2004, 03:57 PM
Originally posted by me(who else?)
Is Java anything like C?


Most modern programming languages like C++, C#, Java and Perl are derived from C. C is the mother programming language.

C++, C#, Java and to some extent Perl are different from C in a very special way, though. They use a modern way of thinking about programming that's very powerful. They are object oriented.

You will probably be familiar with some kinds of programming, probably traditional system design where you did things like:

10print "hello world"
20 goto 10

and so forth.

Object oriented programming differs from this. In this, the code (methods) and datatypes (variables that are used) are bundled together into structures called objects - custom built programming components that contain all of the programming and interior components that they need to operate and be placed as a unifed structure into programs that we write.

Blueprints for these objects are called classes.

Code for a class may (and will) contain declarations of data types (their names, their initial values, etc) and then programming code which is destined specifically to be used with those datatypes.

Here is what a crude class looks like


---
Class person

datatypes used
---------------------

string address;
string first name;
string second name;
int age;
int dateofbirth;

program methods used
------------------------------
procedure to set the name;
procedure to set the address;
procedure to set the dateofbirth;
a procedure that's internal only for calculating the age from the date of birth;



You get the picture.

You build these objects, create various instances of them, and then make them react off of each other and off of other classes.

To some extent, you still get this sort of thing:

10Input"What is your name?", name$
20print name$
30 goto 20

But its also deeply about a completely different way of programming which, if you are not familiar with that sort of thing, or if you learned to program in the traditional way, can be a litte hard to get your head round at first.

If you are going to do ANY programming, learn some C first and then maybe move to something nicer like Java, and do the Dark Basic games programming as a side project.

LNCPapa
04-20-2004, 04:04 PM
BTW - I wouldn't try to learn VB for that right now - rumor is (I spoke directly with an MS employee) that VB will soon be reserved for MS Office only.

Phantasm66
04-20-2004, 04:07 PM
VB is pants. VB is not programming. Its rubbish. Its programming for dummies, and its utterly crap.

Learn C first, just the ABCs as a precursor, then something higher level like Java or C#. C# is the Microsoft solution, Java is everyone else. Perl is used mainly for system administration and stuff to do with text processing, etc. What you want is Java probably.

This book is good:

http://www.amazon.com/exec/obidos/tg/detail/-/0782141900/qid=1082491844/sr=1-1/ref=sr_1_1/102-5017087-0942507?v=glance&s=books

http://images.amazon.com/images/P/0782141900.01.LZZZZZZZ.jpg

MrGaribaldi
04-20-2004, 09:28 PM
I'm currently studying Java at the university, and after having been highly sceptical of it I must admit it is a very versatile language.

All programs you create will be able to work on any system that that the JVM is available on, it's quite intuitive and not too hard to get into.


I would not learn C first.
This is because, as Phantasm says, Java and C++ (and C# (if one can call that a language on it's own)) is an Object-Oriented Programming language (OOP) and thus has a radicly different approach on how to do things.

While learning C would teach you a lot you might/will use later, it would also mean learning an "outdated" programming "thinking" and then OOP.
(I had a hard time going from VB to Java, and VB is a much more OOP than C will ever be)


Why learn Java instead of C++?
Java will work on any system with a JVM on it, whereas in C++ you'll have to change your code to port from one platform to another.
Java is a language which is very much oriented towards Distributed Computing, with class libraries to get everything set up easily.
Java is a powerful language who's programs can either be run as stand-alone programs, or (with very little modification) be run in a web-browser
And lastly, Java is becoming (if it has not allready) the defacto language at universities. Thus if you learn Java, a degree could be within your grasp :)

No matter if you choose Java or C++, they're quite similar languages (with Java being based on C++) so it won't be too hard to learn one if you know the other.


When it comes to what book to use to learn programming, I have a couple of suggestions.

For C++ I've found "C++ A Beginners Guide" by "Schildt" from "Osborn publishing" to present everything in an easily grasped way. (But read in it a bit before you buy it make sure you feel the same)

For Java, I don't have a book I can recommend (although Schildt has written a book about Java too). But I have a couple I can warn you about.
Do not buy JavaGently 2ed. It is absolute crap, and should never have existed!
3rd edition is ok, but has one great let-down. It uses special classes to teach you.

When getting a book to learn programming, I highly suggest staying away from the books that uses special classes to make it easier for you. Especially if they use it for more than reading from keyboard/file and to file/screen, but also for GUI programming etc.
The reason I say this is that after you've done learning those special classes, you have to learn what Java really uses.
Yes, Java's standard might be a bit hairy in the read/write op I listed above, but you won't be finding yourself coding with commands no-one but those who's read the book know about.

If you're on the University, it's another matter again, as there you will learn the "real" way of doing it too, they're only "dumbing it down" for the first few courses.

One last thing when it comes to which book to buy. Buy a highly rated, but "slim" (5-600 pages) book.
You don't need a bible to get started in programming, and getting one will only frustrate you until you know enough to make sense of it.
Check out what is recommended at Amazon.com, then go to a regular bookstore and read a bit in the book.
If you get a book with high ratings, but you can't understand/don't like the approach it's worthless!

Also making sure you get a good book you understand will make learning the language eaiser (as you won't sit there wondering what the h... is going on as I did with Java Gently 2ed).

Hope this helps you in choosing language and book :)

me(who else?)
04-21-2004, 07:53 AM
I learned how to program in Vb when I was 11, so I already knew how to program (a bit) when I started Java. VB's really easy (4-gen I think), when you add items you place them on the form where you want them, etc. It sucks for anything complicated (calling APIs :dead: , directx, etc)but you can make simple apps with t pretty quickly.

Nodsu
04-21-2004, 08:06 AM
Adding things to the form is not a feature of the programming language - it is the feature of the programming tool. All modern languages have some sort of a visual designer.

For a beginner interested in programming, not making cool stuff fast I also suggest Java.

Pros:
It is a new language so they have had the chance to learn from others' mistakes and make it easy to learn/use.
It was built from ground up so it's neat - no obscure hacks and workarounds (mostly).
Everything's an object - you get OOP stuffed in from your ears from the beginning and you start thinking in the right patterns right away.
It is a lot like C++ so you can easily move on to a "real" programming language.
You don't have to bother with underlying OS and hardware.
Free tools that are actually usable.

Cons:
All the "cool" and "1337" people will make fun of you.
It's slow.
Calling OS APIs is tricky.

MrGaribaldi
04-21-2004, 01:29 PM
Nodsu, all the "cool" and "1337" people will make fun of you no matter what programming language you're using (except for assembler), so how that's a "Con" I don't know... (Because if they didn't make fun of you, how could they be "1337" and "cool"?)

And java isn't as slow as it was when it first was announced... Granted, it's not as efficient as C++, but it isn't all that much slower anymore. (Some programs actually runs faster in Java than C++)

No argument on the OS API part. But often it's just a matter of finding a class someone else made who does that for you...

Phantasm66
04-23-2004, 01:46 PM
Yeah, if you are wanting to learn to program then the general consensus seems to be go for Java.

It looks a little daunting at first with all this "public void" and "private static" stuff but it does actually make a great deal of sense when you learn it.

Learning C first would give you a strong background to most forms of modern programming languages, though as Mr G pointed out its not object orientated and so perhaps not worth bothering with right now since it will make OO code seem weirder later.

Yeah, go for Java.

Phantasm66
04-23-2004, 02:01 PM
YOUR FIRST JAVA PRGRAM:


public class Test
{
public static void main(String[] args)
{

System.out.println("Hello from Phantasm66!");

}
}



If you want to compile and run it, then go to

http://www.eclipse.org/

And download their FREE and excellent Java Programming Environment!

Its what I am using right now to code in Java, and its first class. It will help you compile the code and will also tell you where you are going wrong if you make a mistake. You MUST download it. Its free!

filthy_mcnasty
04-23-2004, 02:24 PM
Originally posted by MrGaribaldi
Java will work on any system with a JVM on it, whereas in C++ you'll have to change your code to port from one platform to another.


Well I wont go into all the reasons why but c++ is far and away the langauge I am most fond of and I have dealt with most of the ones discussed here. I want to just clear up this statement garibaldi, pure c++ does not need to be ported at all. It's when you start to mix into it some platform specific API calls that this need begins to arise. i think that's what you're getting at but i was like "whoa! time to defend my language!" lol =)

Phantasm66
04-23-2004, 02:31 PM
Originally posted by filthy_mcnasty
Well I wont go into all the reasons why but c++ is far and away the langauge I am most fond of and I have dealt with most of the ones discussed here. I want to just clear up this statement garibaldi, pure c++ does not need to be ported at all. It's when you start to mix into it some platform specific API calls that this need begins to arise. i think that's what you're getting at but i was like "whoa! time to defend my language!" lol =)


After reading your post I must admit I have to agree with every word.

I prefer Java but many, many programmers prefer C++, as it is possible to do some wonderful things with this that compile into fast running executables. Its a VERY powerful language and where a great deal of the magic is still going on in a big way.

And yes indeed, simple C++ does indeed work on different platforms. And also yes when one starts to use APIs this ceases to be the case, yes. I have programmed using Winsocks for network programming in C++ under UNIX and Windows and they were indeed different in many places. I can only assume other APIs differ much more greatly as well.

Nic
04-23-2004, 03:25 PM
If you plan on writing useful programs for yourself, and you don't want to spend months/years achieving something useful, then avoid C++. Its more complex and requires more programming effort to do many things supported by extensive class libraries provided in other languages, such as Java, or any of the .NET languages. Java would seem like your best bet, but I have to say that I don't like Java very much as I don't find it as intuitive as C#, or VB.NET for example (check out Microsoft Visual Studio 2003, which itself was entirely written in C# showing that the .NET languages are VERY powerful and feature rich). Java is VERY popular though, so you'll certainly find it useful to pursuing a career in software development, though IT in general isn't as safe a career bet as it once was.

Check out this excellent FREE open source development environment for C# and VB.NET development (it's written in C# and the source code is freely available for download) ...

SharpDevelop (http://www.icsharpcode.net/OpenSource/SD/)

MrGaribaldi
04-24-2004, 08:29 AM
Originally posted by filthy_mcnasty
Well I wont go into all the reasons why but c++ is far and away the langauge I am most fond of and I have dealt with most of the ones discussed here. I want to just clear up this statement garibaldi, pure c++ does not need to be ported at all. It's when you start to mix into it some platform specific API calls that this need begins to arise. i think that's what you're getting at but i was like "whoa! time to defend my language!" lol =)

Ah, quite true.
Was mixing recompiling for different cpu's (x86, alpha etc) and platform specific API's. Sorry.


Anyways, there seems to be alot of people who's got an interest in programming here, with diff opinions.

I use NetBeans (www.netbeans.org) (which is written in Java, and has support for point 'n' click GUI design), whereas Phantasm uses Eclipse (www.eclipse.org)... Both are quite good, but I never felt as at home with Ecplise as with NetBeans...

Phantasm66
04-24-2004, 08:36 AM
I've got NetBeans installed as well but I've not used it so far, only Eclipse.

Why do you feel that NetBeans is better than Eclipse??

MrGaribaldi
04-24-2004, 08:45 AM
There was something about the feel of the program...

I'm downloading eclipse again now to see if I can find anything to put my finger on....



Hmmm.. So far it crashes my jvm when I try to start it..
Guess I'll have to do a restart, so the feedback will have to wait a bit longer...

Phantasm66
04-24-2004, 08:51 AM
I had to play with Eclipse a bit to get it the way I liked it, but now it looks for all the world just like Visual Studio 2003 .net only its much better for Java IMHO.

(If you are going to do C# (highly similar to Java) then almost certainly you need Visual Studio 2003 .net, even if its just the C# bit, and certainly you need to be consulting MSDN.)

Eclipse has some really good "quick fixes" - as they are called - for some common programming blunders.

However I have not really tried NetBeans so I think I will if you think its somehow better. What do you really like about it?

Nic
04-24-2004, 08:58 AM
Originally posted by Phantasm66
... If you are going to do C# (highly similar to Java) then almost certainly you need Visual Studio 2003 .net ... Didn't you read my post regarding the FREE open source dvelopment tool (SharpDevelop). It's very similar to Visual Studio 2003 and supports both VB.Net and C#. Check out the features on the home page.

-------------------------------------------------------------------
SharpDevelop (http://www.icsharpcode.net/OpenSource/SD/)

The features we like most...

- Forms designer for C# and VB.NET
- Code completion for C# and VB.NET
- Code AutoInsert (Ctrl+W) C# to VB.NET converter
- Completely written in C#
- Compile C# and VB.NET in the IDE out-of-the-box
- Open source, GPL licensed
- Lightweight IDE
- Xml documentation preview
- User interface translated to many languages
- Everything templated: add new project or file types, or even compilers to SharpDevelop

And here are some more...

- Write C#, ASP.NET, ADO.NET, XML, HTML code
- Project or File-based development (Project Scout & File Scout)
- Rich project options
- Syntax highlighting for C#, HTML, ASP, ASP.NET, VBScript, VB.NET, XML
- Intelligent braces
- Bookmark your code
- Code template support
- Feature-rich Find & Replace dialogs
- Easily extensible with external tools
- Easily extensible with Plug-Ins

... and much more

If you like to see the features in action, then take our Feature Tour.
-------------------------------------------------------------------


PS: Eclipse looks pretty decent too, and is itself written in Java. Just goes to show what you can do with these languages if you have the skills.

MrGaribaldi
04-24-2004, 09:09 AM
Where to start...
It'll reformat my code to Sun's standard, so it's easy to keep the code well structured even if you don't use that structure...

If you've forgotten the code, it'll show you a list after a few secs:

import javax.swing.*;
import java.awt.BorderFactory.*;

class Example extends JFrame {
public static void main(String[] args) {
JPanel panelWithBorder = new JPanel("to show off EmptyBorder");

panelWithBorder.setBorder(BorderFactory.createEmptyBorder()


}
}
Where it will suggest what is in italics.

You can also get a complete list of all commands that is available for object your working on, with the javadoc comments from the API (if you have that installed).

It'll do the same for any other classes you've got in your working directory, which made it quite easy for me to create a GUI to a program I'd written earlier.

It has point 'n' click GUI creation (like in VB), though I'm not allowed to use that in my classes.
And it has a debug feature, though I haven't had time to mess around with that one yet.

It also has a small CVS client built in, and is easy to configure to use a proper CVS server if you have one up and running.

That's what springs to mind as of right now.

But it also has a feel that reminds me a bit of emacs/notepad/CrimsonEditor which I used before using netBeans, which I like quite a lot :)

BrownPaper
04-24-2004, 11:46 PM
oh gee, i probably should learn java too as well. but first i need to fully understand everything about c++.

MrGaribaldi
04-25-2004, 07:08 AM
From what I've read of C++ it is very similar to Java in semantics and feel, so if you know one, you won't have any truoble learning the other...


But back to the scheduled IDE war ;)

Here (http://www.netbeans.org/products/ide/tour.html) is a short tour of NetBeans, but it is by no means complete. In version 3.6 which was just released, they've added one thing which to me seems very practical...

Code folding. You can hide method bodies, comments, import statements, and other blocks of code by folding them in the Source Editor.

To Do window. You can easily track your tasks and TODO comments using the To Do window. You can view all tasks in a single file or in a selected directory.

Automatic insertion of closing bracket/quotes/parentheses. The Source Editor now automatically closes all open parentheses, brackets, and quotes. For example, type System.out.println( and the IDE automatically enters the closing

Tooltip error description. Hold the mouse over any text containing compilation errors to view the error in a tooltip.

Which are just a few select features that impressed/looked good to me..
Find more here (http://www.netbeans.org/community/releases/36/Whats_New.html)...


Alas, I've still not gotten Eclipse up and running... :(

Phantasm66
04-25-2004, 07:58 AM
C++ is lower level than Java. Its not more complex to understand - in a way - its just that it takes more to do certain things, that's all. But that's the key to its power. You've more control but there's more that can, I guess, go wrong.

Java and C# also do what's known as garbage collection. This means that they clean up their use of memory behind them. C++ doesn't do this so you have to do it yourself and if you don't do it properly then memory problems happen.

The code in C++ is also more alien to look at, and less uniform.

However it writes lightening fast applications and the games you are all used to will have been written in C++, using Direct X , open GL, etc that gave the programmer specific commands and functions prebuilt so that he or she could just get down and dirty with writing the game and talking to the graphics card, etc.

A lot of server side applications that are written in places like my work are already moving (and have moved) over to Java in a big way, but the less buggier and better running applications are still written by crazy C++ gurus. For now.

Java is more forward looking than C++ now. Java is really embracing aspect oriented programming which is to do with the way classes interact with each other.

Nic
04-25-2004, 09:59 AM
You can't write an OS in Java because Java runs on a Virtual Machine, which itself requires to be installed on some kind of OS. Modern OOP languages, such as Java or any of the .NET languages, are both powerful and fast, making software development less likely to suffer from bugs (e.g. memory leaks) and greatly reducing the time required to create an application. Both Java and .NET support DirectX, so 3D accelerated games should pose no problem. For commercial games/software development, then C++ is your best bet.

Nodsu
04-25-2004, 04:12 PM
Actually you can't write any OS purely in any standard programming language except assembly and Java. Java can be used because there are Java processors out there that can execute Java bytecode directly.

Nic
04-25-2004, 06:11 PM
Of course we are talking about avoiding the use of classes that use API calls to the OS in that case, so that means a heavily trimmed down version of Java. Let's not forget that no one has produced a full blown OS for desktop computers that is written in anything other than C/C++ (Linux, Windows, Unix, OSX, etc.). Java still needs a virtual machine to run on (as far as I know), though that could be implemented in hardware.

Java Processors Supercharge the Next Generation of Java-Powered Networked Consumer Electronics (http://www.sun.com/970722/cover/javace.html)

... Java processors complement the Java language and operating systems to form a complete end-to-end solution ... The picoJava family is a core licensing program designed to be the industry's best price/performance silicon design supporting the Java Virtual Machine specification ...

filthy_mcnasty
04-25-2004, 06:16 PM
just an aside on Nodsu's comment on an OS in assembler....


*GASP!* lol even the thought is mind blowing. that said, i shall now be forced to write one! (or not)

Nodsu
04-25-2004, 06:35 PM
There are no OS calling classes in standard Java sepcification. The whole point of Java is that you don't have to know anything about the OS.

VM is the thing that talks to the OS underneath. But if the VM is done in hardware then you have a platform that you can build an OS on top of using just Java.

Nic
04-26-2004, 07:28 AM
Summary ... So with C/C++ you can talk directly to hardware (no VM or OS required), but with Java you talk to a virtual machine, which in turn talks to an OS, though the OS is not necessarily required if the VM is implemented in hardware (not your average PC). Sound about right?

me(who else?)
04-26-2004, 08:12 AM
Couldn't you write an OS which uses the VM software on the Linux kernel? You can get a tiny linux install, so that might work.

Nodsu
04-26-2004, 03:54 PM
Of course you could write an "OS" running in another OS but that would sort of lose the point of an OS..

Phantasm66
04-26-2004, 04:05 PM
Linux IS the kernel, so basically it would still be Linux.

You are probably still writing any modern kernel in C, just like the Linux kernel.

Large portions of future Windows releases will almost certainly be written in C#, which uses a virtual machine of sorts - the Common Language Runtime (CLR) of .net.

But I bet the kernel is still written in C.

dsmurl
02-20-2005, 09:44 PM
Direct X and OpenGl are large and complicated with a steep learning curve. I want to write a game that has a graphics layer writtin in darkbasic to be callable from my background game logic layer writtin in C++. Is there any easy way to do this? - :chef:

Post a reply, see related topics & more

 Top Technology News

Weekend Open Forum: Your next hardware upgrade will be...?

4-Way Intel H55 Motherboard Shootout

Tech Tip of the Week: Customize Your Windows 7 Start Menu Button

MSI unveils new business-minded notebook, P600

London hospital opens to Web-addicted "screenagers"

Nintendo: DS rolling out to Japanese schools

Amazon, others to use new color E-ink displays?

HP Slate coming with Atom and Flash in June for €400?

More Tech News

 Software Downloads

Anti Trojan Elite 4.9.0

MSI Afterburner 1.5.1

Google Chrome 5.0.356.0 Beta

ChrisTV Lite 5.51

DVDStyler 1.8.0.2

Miranda IM 0.8.17

RemoveIT Pro XT - SE 19.03.2010

More Downloads



Copyright © 1998-2010 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.