Last visit was: It is currently Wed Apr 17, 2024 11:23 pm


All times are UTC-05:00




Post new topic Reply to topic  [39 posts ] 
Author Message
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 2:59 am 
Literally Nine
User avatar
 

Joined:Sat Apr 02, 2005 3:31 pm
Posts:1171
Location:The vicinity of an area adjacent to a location.
State sponsored universities are the ones that are especially guilty of the heinous crime of pushing Java on their students. The university I go to, Seattle Pacific University, pushes C, C++, and assembly language.

_________________
- Tycho

Image


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 6:48 am 
User avatar
 

Joined:Sun Feb 12, 2006 8:56 pm
Posts:1019
Website:http://eddieringle.com
Location:Detroit, MI
Back in 6th grade, I was excited to hear that I would be learning QBASIC in the 8th grade (at the time, I had already known a bit of it). Then comes 8th grade and no QBASIC. But in that time I had managed to learn C++ (most of it anyways :P). The only thing I don't really understand yet is all the math and algorithms to C++, like the ones used in the previous prime challenge. Maybe it's because I'm only in Algebra, I dunno.

_________________
-- Eddie Ringle

Check out Elysian Shadows and consider backing us on Kickstarter!

====================================

Image


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 12:49 pm 
Connoisseur of the Godawful
User avatar
 

Joined:Tue Mar 01, 2005 9:00 am
Posts:456
ICQ:286315965
Website:http://rabidtinker.mine.nu/
Yahoo Messenger:alistair_lynn
AOL:Agent_Vast@mac.com
Location:127.0.0.1
Now the language in which I would love to write a game some day is Objective-C with the Foundation kit. Now Objective-C lies somewhere between Java and C++ - while the Foundation kit provides an array of classes for all sorts of purposes, because of the inheritance concept you are free to subclass anything you want and write your own implementation which works exactly the same, and for performance-critical sections, Objective-C is a proper superset of C, so you can freely mix in pure C code. Outside of that, I'd say this: interpreted languages are not, as Tycho would apparently have you believe, the very vomit of Satan himself, but there is no doubt that they are slower than C(++) or assembler. However, they tend to be a great deal easier to use than C or assembler. What I tend to do when writing games is to create the core engine - that is to say, the rendering subsystem, scene graph APIs, networking engine, sound system etc - within C++, with bindings to one of the faster scripting languages called Lua which handles the game logic. This combines the processing power you get from C with the extensibility and programming ease that comes from using a scripting language.

_________________
Alastair Lynn / Alumnus / Onlink Team


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 1:41 pm 
 
But couldnt you use Java for the Core Engine, even though it's a bit harder, and much more annoying then C++ you would get better scene graph APIs, and a networking engine because it was influenced by Objective-C, C++, Eiffel,C#, and Mesa. It was primarily influenced by C++ so then it would have the components/features of C++ (which you want for the core engine) and extra features.


Top
  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 1:44 pm 
Connoisseur of the Godawful
User avatar
 

Joined:Tue Mar 01, 2005 9:00 am
Posts:456
ICQ:286315965
Website:http://rabidtinker.mine.nu/
Yahoo Messenger:alistair_lynn
AOL:Agent_Vast@mac.com
Location:127.0.0.1
You could, but why would you want to? If you're going to stick up two fingers to performance requirements, why not go the whole hog and write the whole game in Lua?

_________________
Alastair Lynn / Alumnus / Onlink Team


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 1:47 pm 
 
Isnt Lua a bit to lightweight, I mean it dosent have all the best features that Java does, though it does have the newest programming code release I believe it was 5.1.3 three days ago.


Top
  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 2:02 pm 
Connoisseur of the Godawful
User avatar
 

Joined:Tue Mar 01, 2005 9:00 am
Posts:456
ICQ:286315965
Website:http://rabidtinker.mine.nu/
Yahoo Messenger:alistair_lynn
AOL:Agent_Vast@mac.com
Location:127.0.0.1
Which 'features' did you have in mind?

_________________
Alastair Lynn / Alumnus / Onlink Team


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 3:07 pm 
 

Joined:Thu Feb 28, 2008 2:00 am
Posts:13
Lua is a bit lightweight? I guess you think python, perl and so on are also ``scripting languages'' and lightweight as well?


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 3:32 pm 
Connoisseur of the Godawful
User avatar
 

Joined:Tue Mar 01, 2005 9:00 am
Posts:456
ICQ:286315965
Website:http://rabidtinker.mine.nu/
Yahoo Messenger:alistair_lynn
AOL:Agent_Vast@mac.com
Location:127.0.0.1
I do not dispute that as scripting languages go, Lua itself is lightweight. It is, that's a fact. This does, however, mean huge performance increases - there's also the fact that the Lua API gives you the capability to add basically whatever you want to the language, which makes the point about its minimalism a non-issue since there are just external libraries for that.

_________________
Alastair Lynn / Alumnus / Onlink Team


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 3:39 pm 
 

Joined:Thu Feb 28, 2008 2:00 am
Posts:13
I don't think the use of the word lightweight is warranted in that case. It loses meaning if you aren't including standard or easily downloadable libraries and APIs. I'd call a lot of languages lightweight in that instance, and the word does not seem to fit.

I take lightweight to mean a language that can not really produce `serious' programs, or be used in a commercial setting without the aid of other, more `heavyweight' programming languages.


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 5:29 pm 
Connoisseur of the Godawful
User avatar
 

Joined:Tue Mar 01, 2005 9:00 am
Posts:456
ICQ:286315965
Website:http://rabidtinker.mine.nu/
Yahoo Messenger:alistair_lynn
AOL:Agent_Vast@mac.com
Location:127.0.0.1
Perhaps 'minimal' would be a better term than 'lightweight' then.

_________________
Alastair Lynn / Alumnus / Onlink Team


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Fri Feb 29, 2008 6:49 pm 
 

Joined:Thu Feb 28, 2008 2:00 am
Posts:13
Oh certainly, it is nice in that way. Perl can be non-minimal in that instance ;).


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Sat Mar 01, 2008 1:53 am 
User avatar
 

Joined:Sat Jun 03, 2006 3:51 am
Posts:1186
Website:http://griffinhart.livejournal.com/
Yahoo Messenger:Squall591
AOL:FinalWarrior591
Location:Look at my horse, my horse is amazing!
In my school district, we (currently) have three levels of programming classes: Programming 1, and AP Programming 2 and 3.

Programming 1, we learn C++.

Programming 2 and 3, we learn Java.

For the students in Programming 2 who are in the class because they want to learn to program (instead of earn a tech credit towards graduation), of which I am one*, this is an utmost cruelty. My very soul weeps.

(Basically, I hate how much you need to type to print text to console, and I despise how Java can't pass by value. I want my goddamned ampersands, FFS!)

And I feel pretty sorry for my teacher, too... she has to teach introduction to tech, and Programming 1, 2, and 3. He only reprieve is that since the Programming 3 class is so small (I think it's only four or five guys), they got lumped into my Programming 2 class. (Of course, this is unfair to them, because they don't get my teacher's full attention; she's busy beating half the Programming 2 class off the Internet, because almost no one in that class actually wants to learn how to program, they just want the credit.)

Just my experiences with Java. (Or, as I like to call it, Satan's computer's hate-spawn.) I wish we could pick the language we learned... it'd help weed out the stupids.

-- Griffinhart

*: Out of two, maybe three or four. I think most kids take the class thinking it'll be an easy way to earn the credit and get to simultaneously spend time goofing off. I'm glad my programming teacher is awesome, and therefore not nice. :D

_________________
"My word is my honor. My honor is my life."
-- Demonchild, Angelkin, the Blackest Seraph, the Final Warrior

Image


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Mon Mar 03, 2008 10:40 am 
 

Joined:Fri Jan 06, 2006 12:01 am
Posts:5
Hey all, some of you might have seen me once in a while over at uplink boards.

I jut thought I'd pop in here and point a couple things out.

1) Anyone who is trying to write a game for Java: Unless you are writing it to go in a web browser, stop. Just stop. Don't look back, don't pass go, go straight to STUPID! And if you ARE writing it to go in a web browser, there are so much better interface languages available that don't hog 99% of the user's system. For example: Flash, Silverlight, PERL??? Ajax. I mean, seriously, if you are going to write a substandard game (minimizing it's value to squeeze it into a web site) then why go with a substandard language too? Shouldn't at least one part of what you're doing be intelligent?

2) If you have your heart set on a Java esque language, then ffs go with C#. It is written specifically to be nice to Java programmers who are waking up. It uses JIT compilation that, in some cases, can be as fast as native code. (I've actually seen some benchmarks where C# code ran a few cycles faster than native as it's compiler is better able to identify hotspots and optimize them more than usual on startup. This makes it great for programs that are going to be running a length of time like games.)


Top
Offline  
 Post subject:Re: Up/Onlink in Java...
PostPosted:Mon Mar 03, 2008 12:52 pm 
 

Joined:Fri Feb 29, 2008 10:34 pm
Posts:3
Quote:
2) If you have your heart set on a Java esque language, then ffs go with C#. It is written specifically to be nice to Java programmers who are waking up. It uses JIT compilation that, in some cases, can be as fast as native code. (I've actually seen some benchmarks where C# code ran a few cycles faster than native as it's compiler is better able to identify hotspots and optimize them more than usual on startup. This makes it great for programs that are going to be running a length of time like games.)
Just some points to consider:

1) Java's not that slow anymore. Yeah, I know -- you always read that "OMG Java's dog slow", etc... but that's not really true nowadays. It used to be a horrible performer, back around 1.1 -- but Sun's put in some serious work into optimization. As of 1.6, Java's fast enough for use in a desktop app. The main cost comes at JVM startup -- but once the JVM is running, it's honestly not that bad. How fast is it? Well -- the Quake 2 engine's been ported to Java, and runs at basically the same speed as the native engine. I'd say that unless you're gonna be doing something more graphics-intensive than Quake II, Java will perform just fine on a modern machine.

2) C# isn't portable. The only reason I can think of to write a game in Java is portability -- and that's one thing that C# definitely doesn't have in its favor. Yes, C# has a JIT compiler -- but that's not unique; Java has several JIT compilers available as well. GCJ can even build fully-native binaries from Java source (or from compiled .class files, for that matter.)

Personally, I can see the value of writing something in Java (of course, I am a Java dev) -- but in cases where you need more performance, faster start times, or just don't want to deal with the memory overhead of a JVM, native code's your best bet. You wouldn't stand a chance writing something like FarCry (or even Halo, for that matter) in Java.

Something like an Uplink clone, on the other hand, I think could do quite well in Java, as it's not terribly demanding, performance-wise. That said, there's the question of "why?" As was pointed out earlier, Uplink runs on all three major platforms natively -- so why bother to re-invent the wheel (other than for the learning experience / fun / sadomasochism of it.)

I could, however, see one massive benefit of writing a hacking sim in Java: Multiplayer. Java would allow you to sandbox your app, as well as ensure that buffer overflows, etc. won't result in the compromise of a player's machine. I've often toyed around with the idea of writing a multiplayer hacking sim in Java, and even got as far as writing some netcode. Then I realized that my vision of a hacking sim (far more realistic than Uplink, command-line only, etc.) would have pretty much zero interest from gamers. Oh well.


Top
Offline  
Display posts from previous: Sort by 
Post new topic Reply to topic

All times are UTC-05:00


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created by Miah with assistance from hyprnova