(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-01-24 10:18 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - C++ vs C# vs Java? New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Omega45889

Shyguy


 





Since: 11-18-05

Last post: 6346 days
Last view: 6360 days
Posted on 06-13-06 07:34 PM Link | Quote
Which would you prefer someone write an editor in?
DarkSlaya

930
Gamma Ray








Since: 11-17-05
From: Montreal, Canada

Last post: 6313 days
Last view: 6312 days
Posted on 06-13-06 07:53 PM Link | Quote
Haven't used C# at all, so I can't comment. But from what I know, C++ is somewhat faster. However, Java is cross-platform natively, so the editor could be used on Macs or whatever.

IMO, Java would be a better choice (despite that fact that I nearly have no expirence with it. however, I know for sure that Java can do it, since there won't be much speed difference if it's an editor).

(don't quote me on all the above, since, well, I really have real experience with C++)
neotransotaku

Sledge Brother
Liberated from school...until MLK day








Since: 11-17-05
From: In Hearst Field Annex...

Last post: 6315 days
Last view: 6313 days
Posted on 06-13-06 08:41 PM Link | Quote
C# is evil...because you have to install .NET

Java is better despite needing to install something like .NET--there are some java stuff on the internet so you do need it.

C++ is better because you often can run it without needing to install something less other than missing libraries, which isn't to hard.

C is the best because it is the most efficient of all the four languages in terms of speed.
Coby

Keese


 





Since: 11-20-05
From: Belgium

Last post: 6318 days
Last view: 6314 days
Posted on 06-14-06 06:08 AM Link | Quote
I wouldn't recommend Java, seeing how applications coded in Java tend to be memory intensive + slow.
MisterJones

Tooky








Since: 12-08-05
From: Mexico

Last post: 6402 days
Last view: 6339 days
Posted on 06-14-06 01:39 PM Link | Quote
Language choice should be kept to a matter of experience and personal preference. For the needs of an editor, nearly any language with binary I/O and graphics display support should suffice.

Originally posted by neotransotaku
C# is evil...because you have to install .NET

Java is better despite needing to install something like .NET--there are some java stuff on the internet so you do need it.

C++ is better because you often can run it without needing to install something less other than missing libraries, which isn't to hard.

C is the best because it is the most efficient of all the four languages in terms of speed.


Your perspective is seemingly lacking in terms of project management. While C may be the lowest level language in the choice, thus leading to the best performance, it is well known to cause a complicated memory management. The significant performance you may get is opaqued by the risk of overflows, in a large scale perspective.

C++, at least for the purposes of an editor, is a much better choice, as it is known to be safer, with all its specialized operators, and capabilities of invisible memory handling.

Anyway, unless the editor will require rather large amounts of power (a 3d game editor perhaps?), a higher level language (call it delphi, visual basic, heck, even lazlo or macromedia director) is in many cases, a smarter choice, at least regarding development time. Unless you have a lot of ready to use c++ libraries which require very little configuring

Please note this comes from a person who enjoys c++ a damn lot.


(edited by MisterJones on 06-14-06 12:40 PM)
sloat



 





Since: 11-18-05
From: Delaware, US

Last post: 6416 days
Last view: 6416 days
Posted on 06-14-06 02:47 PM Link | Quote
C# as a language is really nice. Very similar to Java, just with better features, better syntax, less crummy-ness.

Java and C# both require large runtimes. Java is mostly cross-platform (any OS the runtime is supported on) and C# is getting better platform support thanks to the Mono Project, which I hear is getting pretty decent.

However, for an editor, I wouldn't use either Java or C#. In my experience, the higher level the language, the harder it is to work with binary files. I honestly wouldn't even know where to begin with either C# or Java. I do remember when I was messing with stuff in VB4, binary files gave me many headaches. In contrast, with the zamn editor (written in C), I could make structs and arrays of structs and copy the data from the game almost directly in to them. And writing the data back was about as simple.

So, I would (and did) stick with C/C++. Things like memory mapped file I/O are too useful to not have. And if you code it carefully, you can have it cross platform with little effort.
MisterJones

Tooky








Since: 12-08-05
From: Mexico

Last post: 6402 days
Last view: 6339 days
Posted on 06-14-06 03:20 PM Link | Quote
Originally posted by sloat

Things like memory mapped file I/O are too useful to not have.


Are you talkimg about this: http://www.flipcode.com/articles/article_filemapping.shtml ?

Is it cross compatible? Haven't programmed for unix/macs ever, so I wouldn't knw if there is any equivalent for it.
Cellar Dweller +

Red Koopa









Since: 11-18-05
From: Arkansas

Last post: 6322 days
Last view: 6313 days
Posted on 06-14-06 04:00 PM Link | Quote
I recommend C or C++ (or some combonation of thereof) with a cross platform GUI toolkit such as GTK, FLTK, or Qt. For file IO, avoid the OS's native API and use the C standard library(fopen, fread, fclose, etc..). If you want to create a variable that is a specific size, use the types in stdint.h because the standard C types can vary in size(an int can be 16, 32, or 64 bits depeding on the target OS and architecture). Finally, use endian safe read/write techniques when dealing with game data(eg. to read an unsigned 16 bit little endian integer use "my_16_bit_value = (((uint16_t)p[0])|(((uint16_t)p[1])<<8));" where p points to the 16 bit binary data you want to read).
MisterJones

Tooky








Since: 12-08-05
From: Mexico

Last post: 6402 days
Last view: 6339 days
Posted on 06-14-06 05:33 PM Link | Quote
Originally posted by Cellar Dweller +
I recommend C or C++ (or some combonation of thereof) with a cross platform GUI toolkit such as GTK, FLTK, or Qt. For file IO, avoid the OS's native API and use the C standard library(fopen, fread, fclose, etc..).


Mixing the two is not as a good idea as it sounds. Whie you gain the advantages of both (low level, explicit sized "strings", object orientation, operator overload, templates!), you also gain weaknesses of two languages (unsafe memory handling, classes overhead, etc).

If you use C, stick to pure C (fopen, fclose, fread, fprintf, fwrite, etc). Same goes for C++ (ifstream.read(), osftream.write(), etc) .

And for a cross platform toolkit, i'd suggest wxWidgets. GTK is hooooooooooooooorrriiiiiiiiiiiiiiiiblee


Originally posted by Cellar Dweller +
If you want to create a variable that is a specific size, use the types in stdint.h because the standard C types can vary in size(an int can be 16, 32, or 64 bits depeding on the target OS and architecture).


Why not use char, short and long? I have not used much different integer size in a while, so there might be a reason I am not aware of.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6313 days
Last view: 6313 days
Posted on 06-14-06 06:12 PM Link | Quote
Java is ssssslllllooooowwwww and hogs memory. C# requires .Net. Therefore, C++ wins by default.
neotransotaku

Sledge Brother
Liberated from school...until MLK day








Since: 11-17-05
From: In Hearst Field Annex...

Last post: 6315 days
Last view: 6313 days
Posted on 06-14-06 06:57 PM Link | Quote
When it comes to memory management, C# and Java win because you don't have to worry about it. However, if there is just one person working on the code, often the case with editors, then any language works and just becomes a factor of how tuned you want your code to be.
Dan

Purple Leever


 





Since: 11-18-05

Last post: 6322 days
Last view: 6312 days
Posted on 06-15-06 07:06 AM Link | Quote
Originally posted by sloat
However, for an editor, I wouldn't use either Java or C#. In my experience, the higher level the language, the harder it is to work with binary files. I honestly wouldn't even know where to begin with either C# or Java. I do remember when I was messing with stuff in VB4, binary files gave me many headaches. In contrast, with the zamn editor (written in C), I could make structs and arrays of structs and copy the data from the game almost directly in to them. And writing the data back was about as simple.


Old VB's file access sucked. C#/VB .NET's file access isn't anything like old VB (although I do believe you can still use the old-style file access in VB .NET), it's a lot more powerful, and easier to understand.

Personally, I think you should write the editor in whatever language you know. But in my opinion, using C/C++ for something as simple as a level editor is a bit overkill. Most high-level languages (well Java/.NET/Delphi at least) come with class libraries that eclipse C and C++ standard libraries.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6313 days
Last view: 6313 days
Posted on 06-15-06 02:34 PM Link | Quote
Really the only signifigant difference between coding in C/C++ and coding in those fancy-pants high level languages is that you need to build the interfaces yourself (as opposed to VB's drag and drop that doesn't even really work; dunno about others). True they may have more advanced functions, such as string search-and-replace, but these usually aren't that hard to write, or you can find one on Google and just drop it into your code. Coding in C++ for me is almost as easy as VB, because I've already written functions to do the things VB has built in, and just include them in each program. (Eventually I'll probably release that code, but I want to finish my web site first. )
MisterJones

Tooky








Since: 12-08-05
From: Mexico

Last post: 6402 days
Last view: 6339 days
Posted on 06-15-06 03:26 PM Link | Quote
Originally posted by HyperMackerel
Really the only signifigant difference between coding in C/C++ and coding in those fancy-pants high level languages is that you need to build the interfaces yourself (as opposed to VB's drag and drop that doesn't even really work; dunno about others). True they may have more advanced functions, such as string search-and-replace, but these usually aren't that hard to write, or you can find one on Google and just drop it into your code. Coding in C++ for me is almost as easy as VB, because I've already written functions to do the things VB has built in, and just include them in each program. (Eventually I'll probably release that code, but I want to finish my web site first. )


You are forgetting the memory management, which is the grand aspect everyone is àranoid on working on low level. While most public libraries generally have their own safe (for the most part) methods, you still need at times be careful for your own routines, especially if you are dealing with a lot of pointers, and runtime generated data (ie. memalloc, new operator). Then again:

http://www.relisoft.com/book/tech/5resource.html http://www.relisoft.com/resource/resmain.html
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - C++ vs C# vs Java? |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.017 seconds; used 423.79 kB (max 533.68 kB)