Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Alternative Civs > Clash of Civilizations > Java Game Programming
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
04.Sep: `FC` 2.0.5 COMPLETED AND RELEASED
27.Jul: `FC` 2.0.4 COMPLETED AND RELEASED
16.Jul: `FC` 2.0.3 COMPLETED AND RELEASED

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Mark_Everson is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:17
  Old Post 02-02-2002 08:50 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Java Game Programming Put an end to popups!

The Java vs C++ issue comes up every now and then...

I came across an article that looked pretty good on this, and I figured I'd start a thread on generic Java Game Programming issues. As time goes by and there are a few more things in it, and perhaps some discussion, it would be something that we can just point people to when these issues come up.

The article is Evaluating Java for Game Development

A Very useful resource is the Java Development forum at Gamedev.net

[edit, remove deadlink]

Last edited by Mark_Everson on 15-12-2002 at 01:52

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 02-02-2002 12:04
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Get a bigger avatar today!

Well, I'm learning Java... but there's nothing to learn cuz it's JUST LIKE C++. lol, unless you don't know how to use classes. I bought a J++ compiler a long time ago, I just have to get it back up, for the last few years I've been doing a lot of C++ development.

MY LATEST PROJECT: here (Just my own 3D Modeler so i can have my own model format)

Anyways, the only part I don't like about Java is that I don't think there's a way to do dynamic memory allocation.

Mark_Everson is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:17
  Old Post 02-02-2002 15:15 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Hi DJ:

Why exactly do you want to do dynamic memory allocation? It is tedious and bug-ridden and best thrown into the dustbin of history .

From the Java Hotspot Whitepaper

quote:
A major attraction of the Java programming language for programmers is that it is the first mainstream programming language to provide built-in automatic memory management, or garbage collection (GC). In traditional languages, dynamic memory allocation is done using an explicit allocate/free model. This turns out to be not only one of the largest sources of memory leaks, program bugs, and crashes in programs written in traditional languages, but it is also a performance bottleneck as well as a major impediment to modular, reusable code (determining free points across module boundaries is often nearly impossible without explicit and hard-to-understand cooperation between modules). In the Java programming language, garbage collection is also an important part of the "safe" execution semantics required to support the security model.

A garbage collector automatically handles "freeing" of object memory behind the scenes by only reclaiming an object when it can "prove" that the object is no longer accessible to the running program. Automation of this process completely eliminates not only the memory leaks caused by freeing too little, but also the program crashes and hard-to-find reference bugs caused by freeing too much.

Traditionally, garbage collection has been considered an inefficient process that impeded performance, relative to an explicit-free model. In fact, with modern garbage collection technology, performance has improved so much that performance is actually substantially better than that provided by explicit freeing.

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 02-02-2002 19:32
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Enter the AD-FREE zone

yea, but don't you feel like you have more control somehow. i do...

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 03-02-2002 02:00
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Get a bigger avatar today!

quote:
Well, I'm learning Java... but there's nothing to learn cuz it's JUST LIKE C++. lol, unless you don't know how to use classes.
What!!!!!! Java has no evil pointers, Java has automated garbage collection, Java has proper interfaces, Java got rid of evil enums, Java has reasonable GUI system (not good, but reasonable), Java is platform independent without recompiling, Java has an extensive library, Java has strings built in, Java is internet friendly.

quote:
I bought a J++ compiler a long time ago, I just have to get it back up, for the last few years I've been doing a lot of C++ development.
J++ is NOT Java, it is Microsoft's failed attempt to hijack Java. Download the basic JBuilder (it is free) from Borland. This uses the Java JDK 1.3. I am not aware of any serious programming that has ever taken place in J++.

quote:
Anyways, the only part I don't like about Java is that I don't think there's a way to do dynamic memory allocation.
All Java memory allocation is dynamic. Try:

int[] intArray = new int[100];

for example. The ONLY non-dynamic memory use in Java is for non-array primitives (unlike C++).

On the other hand, if you mean malloc and its friends, assembler does it much better and is even harder to write...

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:17
  Old Post 03-02-2002 03:51
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Gary, are you kidding? Don't you love debugging code which crashed because a delete had been done on some pointer and it wasn't null so it would only crash once in a while? Or debugging buffer overflows because you allocated a char[256] and some *#^!* typed a 260-char long string? Or discovering that type XXX is a typedef of a typedef of a #define that has been redefined in another .h you just have to include?
With java, you also miss the joy of managing multi-threaded programs by hand, so that you have to check by yourself all access to all variables instead of using a puny synchronized keyword?
And what about spending one day on a nasty bug before you realize somebody saved an int to a file and rereas it without any consideration of the fact that it was written in little-endian and read in big-endian?

No, java is a poor language, as debugging is harde than in C++. But that's because there are less bugs.

Mark_Everson is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:17
  Old Post 03-02-2002 04:09 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Lose 30 kilos (of popups)

DJ:

Should I call off the "Java Dogs" or have you not had enough yet?

This is probably not a good place to advocate the "Power of C++" which vs Java is mostly the power to shoot your own foot off...

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 03-02-2002 10:42
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Lose 30 kilos (of popups)

Hehe, nah, I dont' mind, I like to hear opinions. I still think C++ will remain more powerful tho. I think i'll stick with C/C++ after my Java classes are over. Plus, all my 3D projects are coming along fine with C++ and they're fast, (do to my unique fustrum culling and octree techniques ). I suggested to my friend (in my java class) that if he wanted to continue Java than he should join this project, but I think he's going into 3D game development with me, (hopefully publish my 3D game project I'm currently working on), and he wants to do it in C++. It's just faster and I feel it's more efficient (just my own opinion). Plus, I was told by some college kats and professors that I'm good at C++ and that I shouldn't switch because it's the "virtual god" of languages, that's what they told me, so that's what i'm doing. I'll learn java on the side tho, it's just hard for me to imagine making games with it, although I admire this game because it has potiential and I'd tell all my "java" friends that this is a good project to invest in. BTW, you only have problems with pointers if you don't know what you're doing. I myself have my own 3D engine that calls up all types of pointers and I can handle them fine. I love pointers because I can manipulate and modify so many things with them, gives me control (that thing that drives programmers). I had a problem with pointers back when I was 14 years old, and even then it wasn't as bad as you guys say it is (geez, I was so young, does this say something?). Dont' be afraid of them guys, love them and they will love you. Love assembly code and you'll be amazed at your computer's potential!

You should see the glory of democracy in C++, the great amount of freedom (that comes with some corruption). In C you are FREE! Hopefully it'll pay off when I move back to maryland

Sorry it took so long to reply, I was at work

--Sorry kids, but Java will actually stunt your growth. If you ever hope to be a "master programmer" you'd better get real dirty, real soon. At 14 I was interested in Motorola 6502 assembly programming. If your only interest at this critical stage of development for you is in becoming another Java drone, I think I can safely say to you in advance that, no, I do not want fries with that. --Doc O' Leary

Last edited by DJ on 03-02-2002 at 11:44

F_Smith is offline F_Smith
Prince
Austin, Tx 78728
May 1999
time: 05:17
  Old Post 03-02-2002 12:26
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Civilization 2

BTW, you only have problems with pointers if you don't know what you're doing.


Hmmm. Are you suggesting you've never made mistakes with pointers?


Unless I misunderstand, you're still in college. I don't mean that as a knock, just an observation. At my company, when code gets written on deadline, as it always is, mistakes always happen. Even to the best developers. We work long days, sometimes long weekends, putting releases to bed. Mistakes happen. Once out of college, you'll find that it's not so easy writing bug-free components under pressure.


Especially when you have to match up delivery times against Java developers who don't have to debug that stuff. We're finding a comparable Java component can be built in about 2/3rds the time, on average. That makes the Java component cheaper to produce, to boot.


Don't get me wrong, Java isn't for everything -- yet. It's slightly slower at certain tasks. If you do hard-core number crunching or serious 3d, you likely can't use it yet. Then again . . .


If speed is the only issue, then within just a few short years, I think technical advances in computing will completely remove that issue. Soon, these machines will be so fast that it just won't matter. And besides, if you save $50,000 on development you can just throw a honkin machine at the solution and *still* come out ahead.


So it's better all around if the language doesn't give the developers the power to shoot the consumer in the foot. It protects the consumer from the developer. Pointers are what the developer wants, of course, it gives you the power to create, and the power to destroy. Without pointers, you only have the power to create. And the consumer gets safer software.


I wonder, out of curiosity, what you think of C# and .NET?

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:17
  Old Post 03-02-2002 13:59
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Increase Your PM Length

The point is that java allows faster development than C++, and in any large scale project, there is always some bad programmation done, due to lack of skills, time, resources or foresight. And in C++, the consequences are worse than in java. However, you are right that right now C++ is faster than java and can give more control on memory. However the time you spend debugging a C++ program can be spent tweaking and tuning java, so in the end, it is not sure java will be slower.

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 03-02-2002 17:30
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Browse Apolyton AD-FREE

Yea, i see your point, I really like that "being cheaper" example, and yea, I'm still in college, so maybe I haven't seen it all when under pressure. (Can you tell I'm awake now and not so grouchy as last night coming home from work)... Anyways, I dont' have any solid views on C# or .NET as of yet, I'm really hoping to try them one day, just out of curiousity. ^_^

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 03-02-2002 22:45
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Full PM-box? Change here!

quote:
--Sorry kids, but Java will actually stunt your growth. If you ever hope to be a "master programmer" you'd better get real dirty, real soon. At 14 I was interested in Motorola 6502 assembly programming. If your only interest at this critical stage of development for you is in becoming another Java drone, I think I can safely say to you in advance that, no, I do not want fries with that. --Doc O' Leary
A quote from a moron. If making programming harder is important, program in assembler, or better still, machine code. All this mamby-pamby high level language stuff (like C or C++) will surely stunt your growth. See the entry in the New Hacker's Dictionary on "Real Programmers" for a description of how real programmers work. Of course their code can never be modified or even maintained, but is that important? After all, we real programmers never have to meet deadlines or fix defects, we just cruise in la-la land.

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 04-02-2002 00:28
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Got spare money?

i think what he was saying was that these hard languages actually hold the real power of programming, not languages that let you take the easy way out IE--VB(what will you actually learn from it hehehe?). umm.... than again, who ever said that if you work hard you'll reap great benefits? BTW, i highly doubt the Doc is a moron. When Java does get better he'll probably need to choke on his words, but until then it's just not good for major development applications. I always thought Java should stay in the internet domain, it seems better and more at home there than anywhere else. Maybe that's Java's true destiny, the internet... In the meantime allow those morons like Doc to learn their assembly code and C++ code so they can help develop Java.

F_Smith is offline F_Smith
Prince
Austin, Tx 78728
May 1999
time: 05:17
  Old Post 04-02-2002 09:33
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton buy from Amazon

When Java does get better he'll probably need to choke on his words, but until then it's just not good for major development applications.

Pssst . . . Java is now the development language of choice for new dev. You should check the jobs postings on any of the job sites. There are more Java jobs than C++ and VB jobs, and the Java jobs pay better.

There are actually more Java jobs than C++ jobs even in Seattle.

Last year, new Java projects passed new C++ projects. Java completely dominates server development, and the 1.4 release will do to desktops what the 1.2 release did to servers.

The next release, 1.4, is when Java on the desktop turns the corner. There's even a Java games and 3D api's.

You might be interested in the 3D api. It's rather amazing. You just define the objects in the world, their dimensions, surfaces, etc, and then define any light sources and where the 'eyes' of the viewer are, and all the methods for moving around in the world and viewing the world are done for you. And it's very fast, and uses any hardware acceleration, and will use OpenGL.

Plutarck is offline Plutarck
Warlord
Earth
Nov 2001
time: 23:17
  Old Post 04-02-2002 11:18
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Increase the size of your Attachments

As for the 3D power of java, MAN has it taken huge jumps forward!

Check out this: http://www.javagaming.org/

Note the Java3D(tm) Gran Prix vs F1 2001 - Electronic Arts article.

Looking at it I'm almost stunned that it's done in Java3D.


Oh, and about the Doc O' Leary quote. It brought to mind a quote from some other amazingly misguided individual about how learning VB would "ruin a programmer for life".

It's all the ancestor of the "If you keep doing that, you'll go blind/to hell!" scare-tactic, used to control the actions of people through fear of an unreasonably severe consequence; if actionX is such a minor action, but it would result in the extremely severe resultY, then actionX must be avoided at all costs - and you wouldn't want other people to suffer from resultY, so you'd better tell other people about it too.

You'll find it permeates old wives tales, urban legands, and most noticably- religion (of all kinds, including Programming). A technique passed down from time immemorial, usually leading to devastation of intellect, spirit, and psyche. In other words, repression.


But look deeper at this particular assertion. It raises the following questions:

1) How does the speaker know this?
a) Did he learn it himself? If so he must have been stunted. Do you really think such a gimped programmer should be heeded?
b) How can he chart the progress of programming skill at all? To be "stunted" means to slow down in advancement/growth, which requires there be some normative mean to use as comparison.

But there is no such valid mean to apply to programming skill. Hell, it's hard enough just to measure such skills at all.

Taking me for instance, in my early efforts to program I made little headway and quit multiple times over a few months. Looking on it could seem "stunted". That would be because you only evaluated the failures.

Yet if you took notice of advancements when I restarted learning and charted it over 1-2 years, calling any part of it "stunted" would be pointless. As in most things there were many starting failures, which gave way to considerable success (in this case, increase of my understanding of programming theory and it's application to design).

c) Just what kind of "programming" is this pointed towards? Shifting bits around is important in low-level programming and is a high-rated skill, but in high-level programming it's a skill that is almost entirely unused. A good high-level programmer is not a good low-level programmer, and vice-versa.

There is also network programming, non-UI programming (for instance, creating a thin-client), UI programming, scripting, graphics programming, audio programming, RAD, and object-oriented, procedural, and structural programing, and many many more. And all draw from many sets of general and specific skills and abilitys.

How could learning ANYTHING manage to stunt programming ability as a whole? Does that sound like a reasonable assertion?

2) He's still full of ****.



When it comes down to it, "practical programming" is about getting things done the best way possible. That means fastest, cheapest, most effective, and most robust (ie- secure, extensible, maintainable, etc).

Programming Languages are all tools, and nothing more.

There is no Perfect Tool in existance which can handle every job better than any other tool. The best tool to build a word processor or a manual-style calculator is not the best tool to build an all-out realworld physics 3D graphics engine. And when building a 3-tier design network application you'll probably use something entirely different.


But in the end, in life you rarely ever reach an Optimum anything.

Sure, building that simple website with a search engine would have been alot easier with ColdFusion, but you don't know ColdFusion, and that's about the only thing ColdFusion will ever be useful for.

Sure assembler is great, but it's only good uses are for small super-performance reliant apps, optimizing performance-reliant programs (which breaks their system independence), reverse-engineering/cracking/editing binarys, and a few ground-level coding tasks. Unless you're going to do low-level programming (which I do approximately zero of), it would be a largly useless tool, good only for your personal development while learning it.


Java is basically a high-middle level language. Not as high level as some, but it's high enough to keep your boots out of the bits - so to speak.

That makes it easier and faster to learn, easier to use, do more in less time, it's less bug-prone, more secure by nature, easier to write secure code (assuming you know what you're doing), and allows high-level broad designs to be more easily implemented.

And that's just for the level of language, not to mention any of it's features.

It's not perfect, but nothing is...*sigh*

Plutarck is offline Plutarck
Warlord
Earth
Nov 2001
time: 23:17
  Old Post 04-02-2002 11:57
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Avatar Enlargement: We've got the solution

Btw: Confucious say, "Work smarter, not harder."



As for C#, it's slated as the "Java killer". I believe that as much as I believe Delphi killed Visual Basic. (in case you didn't know...it didn't)

What I wouldn't be surprised about is if they ended up just jockeying each other back and forth on new features, kind of like the relationship of PHP to ASP.

I've heard that Java would have more to copy from C# than C# would have to copy from Java, but I have seen nothing convincing in that regard.


But I'll sum it all up right now: The idea of language-neutral code- Good Thing. In the real-world it's a Nice feature- and that's it.

It's a whole hell of a lot less important than they like to pretend, and will lead to some incredibly stupid ends. Writing a program in more than 1 language is like writing a book in more than 1 language- you can, but why the hell would anyone think that's actually a good idea?

At most you should have 1 main language and 1 minor language, like Java and C++ (for instance). But the fact is, Java not only has the potential, but it already does it! That's what the Java Native Interface is for!

But the JNI does kind of suck to use, or so I've heard, but already there are products which act like a wrapper to do the work of JNI even better, such as functionX (I think it's called that...).


Other than the fact that Microsoft is interested only in dominance and nothing more (and willing to use any tool to obtain it, which has varying effects on The Rest of Us), Java has years of a head-start and Sun has said many times they want to release it as totally open-source when the option becomes a good one (they say they haven't done so to protect some company from coming along and producing a proprietary version of it, ie- Microsoft).

In the words of a wise man, "Good software takes 10 years" http://www.joelonsoftware.com/artic...0000000017.html

And C# isn't even really "out" (ie, not beta...but then again, MS products never go out of beta...hee, hee, hee) yet, compared to Java's maturation time.

It'll be at least 2 years before C# becomes a truly Good Idea, if not 3-5 years. Assuming it "takes", which it likely will. .NET is a lot bigger of a gamble, but if MS doesn't go extinct then it will stick too. They're resilient bastards, to speak highly of them, and they'll keep releasing new versions, each time slightly growing it's popularity.


But it won't kill Java, though it may however 'kill' Delphi. But the majority of java's turf will stay under java, and the majority of MS's turf will migrate to C#, which might be good for all of us.

C# may even be worth learning, but not now, and could be a fun thing to play with or even use. But hell, Java 1.4 finally fills out almost all my demands for a language - along with all the other java development products I desire - so I'm quite positive it'll be quite the long time before C# manages that.


I do look forward to third-party support for Java in .NET though, and there are many iiiiiiinteresting plans for reverse-engineering C# itself, if not .NET along with it.

If someone adds PHP support somehow too, that'd be excellant too. But as I said, it'll be a few years before C# becomes a viable choice.

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 05-02-2002 02:39
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Inflate your Upload Space

would C# be good? I was thinking about getting a book on it once I get the new Visual C++ .Net compiler, COME OUT ON FEB 13 hehe, i'm so excited!

BTW, kestrel email:kestrel18@bigpond.com was from this forum. if so, why'd you send me a virus just now?

Last edited by DJ on 05-02-2002 at 02:48

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 06-02-2002 01:55
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Help yourself to an AD-FREE life

quote:
BTW, i highly doubt the Doc is a moron.
Perhaps not, but certainly guilty of one moronic statement.

Most places I work prefer Java because of the reduced cost, but also because it is easier to find competent Java coders than competent C++ coders. I suppose there are even fewer competent Assembler programmers, and virtually no competent machine code programmers these days.

My feeling is that Java will last until it is replaced by an even simpler and cleaner system. Judging by Microsoft's past performance, C# is likely to be "feature-rich", that is, a pain to use.

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 06-02-2002 02:34
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Support Apolyton buy from Amazon

lol, like DirectX :-p

Well, I did check out the document on it, doesn't seem to complicated. Didnt' get real deep into it tho, but I'm gonna buy a book on C# after my Java classes are over (err... I dont' think my teacher knows C++ so I have no clue as to why he's teaching Java). So far the class has been an Do-it-on-your-own basis, and everything is like C++ so I'm just breezing through it. We're writing out the programs on notepad and that's a pain cuz you dont' get the luxuries a compiler program brings.

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 07-02-2002 13:35
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Suffering from ads?

It is often said that errors which are runtime errors in C++ (plug in your favourite other language here) are compiler errors in Java.

As someone who is extremely experienced in both languages (I have actually been a C++ programmer for longer than I have been a Java programmer), I can attest that that claim is true.

On the other hand it is important to stomp on those who want to store lots of data in hash maps, without type checking. Every project gets them. If the person who wants to do that is the architect, woe to the project.

Cheers

Mark_Everson is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:17
  Old Post 07-02-2002 18:37 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Support Apolyton, buy Call to Power 2

I am guilty of using HashMaps without type checking. What is the standard approach?

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:17
  Old Post 07-02-2002 21:10
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Using HashMaps is not evil per se. It is just you don't put all your data in hashmaps, and you use hashmaps as private data so that they are only accessed by setTyped() and getTyped() methods. For example, the list of unit archetypes is a hashmap, but it is an implementation detail.

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 07-02-2002 22:00
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Increase the size of your Attachments

Hash maps are fine for lists of homogeneous data, with, as Laurent says, accessors that force the correct type.

The kind of use that is bad is the one where you have in a hash map:

Key: "time" Value: Integer
Key: "location" Value: Point
Key: "size" Value: Dimension
Key: "color" Value: Color

and variations on this theme. If something goes wrong, it shows up as a runtime exception (usually a class cast exception), rather than. as it should be, a compiler error.

Cheers

colorrr is offline colorrr
Chieftain

Jan 2002
time: 02:17
  Old Post 07-02-2002 23:53
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by DJ
... Anyways, I dont' have any solid views on C# or .NET as of yet, I'm really hoping to try them one day, just out of curiousity. ^_^

Here's a phrase from ZDNET that should help you:
Microsoft's C# is like Java with the 'reliability, productivity and security deleted'

colorrr is offline colorrr
Chieftain

Jan 2002
time: 02:17
  Old Post 08-02-2002 00:03
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Put an end to popups!

quote:
Originally posted by DJ
I always thought Java should stay in the internet domain, it seems better and more at home there than anywhere else. Maybe that's Java's true destiny, the internet...


What you are saying is exactly the opposite of what causes growth, evolution and enhanced productivity.

If everyone were to stay put in their boxes, not trying to break the limits, then we would not have Java 3D, nor Java nor C or C++ for that matter. We would still be stuck in Cobol. If programming ever existed.

I think it's time you open your eyes and explore the wide world of programming, there's a lot more to it than just programming C or C++. Personally I developed from C++ to Java, finding Java much better as it allowed me to think more in the design and less in small details, like pointer allocation/deallocation.
It was nice to be able to manipulate everyting, but with a good design, you don't really need to do 'dirty tricks' to make things work.

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 08-02-2002 02:35
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Browse Apolyton AD-FREE

umm... read that last sentence to me again... "maybe..." Come on, if you can quote surely you can read. I guess you're gonna be the one to make that next OS with java... with no dirty tricks huh! --> but, you don't need to know dirty tricks to do something like that right!?

Last edited by DJ on 08-02-2002 at 02:52

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 08-02-2002 08:46
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
umm... read that last sentence to me again... "maybe..." Come on, if you can quote surely you can read. I guess you're gonna be the one to make that next OS with java... with no dirty tricks huh! --> but, you don't need to know dirty tricks to do something like that right!?
I think that is just about the most incomprehensible post I have ever seen.
Mind explaining what you meant?

Cheers

colorrr is offline colorrr
Chieftain

Jan 2002
time: 02:17
  Old Post 08-02-2002 23:31
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Java 1.4 is out Support Apolyton buy from Amazon

Hey guys,

Java 2 SE 1.4 is just out
read the specs

Some interesting cuts from the page:

"The AWT improvements include ... high-performance graphics which draw directly to the screen. (This latter feature is the equivalent of working with DirectX on a Microsoft Windows platform or SunTM OpenGL® for SolarisTM.)"

"We know of several game vendors who are just entering the Java game business because they can now deliver full-screen games, which finally puts them on equal footing with platform-specific games vendors."

Jorgen

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:17
  Old Post 09-02-2002 00:08
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Support Apolyton or Terrorists Win

Oh hell, now I am going to have to fight off the people who want to start every method with 24 asserts.

Cheers

DJ is offline DJ
Warlord

Jul 1999
time: 05:17
  Old Post 09-02-2002 08:41
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Help yourself to an AD-FREE life

I wouldn't be too excited about the Java updates. I'd suggest you guys look into C# and the .NET framework. It's like Java, but bigger and better! Plus,with the .NET framework, it'll allow you to take different blocks of many other types of code languages, and compile them into one. Really, I think Java needs to do more than come up with small updates if they want to keep up.

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:17.
Apolyton Time is 00:17.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0676 seconds (93.74% PHP - 6.26% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net