Outworlder

Member
  • Content count

    276
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Outworlder

  • Rank
    Member
  1. Quote:Original post by The C modest god Quote:Original post by superpig A networked 3D shooter or something? Sure, perfectly doable in a year. You think? How much time and how many people worked on battlefield 1942 for example He said a *networked 3D shooter*, not the Battlefield 2 or whatever. You'd think would learn to read before programming...
  2. how different is java from javascript?

    Quote:Original post by Gink I think all programs can have their source code viewed, regardless of whether it is compiled or not. That is true. After all, everything is turned to assembly instructions, and those can be viewed no matter what. In fact, that's how most "cracks" are made. Now, if you mean the *original* source code, then the answer would be no. A "decompiler" *can* try to guess at what the original code was, but with languages like C there are a lot of ways to accomplish the same result, or even different outputs for the same input, with something as trivial as a compiler version change. Plus variable names are often not kept (unless you've got a debug build). The reason Java (and .NET) are so easy to decompile is that they store a lot of metadata on their assemblies, and that bytecodes/MSIL are easy to translate back and forth. I like to think that choosing a language based on how easy it is to decompile is often not a wise choice. Not like that will wield a useful build :)
  3. how different is java from javascript?

    I can't for the life of me understand why they chose the name "javascript". It's as related to Java as PHP is to Ansi C. The reason anyone can see your code is that it's designed to be that way. The purpose of javascript is to add scripting capabilities to the browser, not to be a general purpose language. And pretty much everything that goes to the browser is text. Java was made to be easy to "compile". Compilation, in this case, meaning translation to bytecode. However, the other way around is also easy, and Java decompilers will produce amazing results. The only workaround for that is obfuscation. Same with C# (and all .NET languages). However, don't let this old textbook stuff confuse you. Nowadays, Java code is most likely compiled. If you've got a properly configured Sun VM, try on the command prompt: java - version You'll most likely see: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode) HotSpot is a compiler. That is, translates bytecodes to ASM instructions. Due to that, and advancements in VM itself, Java code is much faster than it's used to be. Bottom line: javascript for Web pages. Java for pretty much everything else. For a compiler: go to java.sun.com and get the JDK. That's free (the actual compiler is called javac, and is included). For a kickass IDE, if you've got a decent amount of memory, try Eclipse (www.eclipse.org).
  4. Quote:Original post by Thevenin Quote:Original post by tolaris Taken to extreme, you can reduce it to a point where when the player moves one tile left/right you only fetch single "new" column worth of data from respective direction... I would have thought the seek time would be the greatest slowdown factor. eg... Loading 1 KB = 10ms Loading 1 MB = 11ms. And it is! Take a game like Ultima VII, for example. Smardrive made a huge performance improvement, probably by avoiding unecessary disk accesses. However, if the world is, say 10000x10000, why not store a (for ex.) 200x200 region, and let's take a 20x20 visible area(I'm making these numbers up). Now, whenever the player moves, start "shifting" and prefetching tiles, preferably in a "lazy" way. Since you've got a good buffer, you don't need to start fetching tiles right away. You can give your player a small room to move about before getting crazy with tile loading. Might even have a special code to handle the worst case: a player running non-stop in a single direction. And this tile loading could be backgrounded, you could have something to predict player movement and so on. Those ideas are untested, but I've been thinking about it for some time now. It seems it would work just fine for tiles, but NPCs would give you character some trouble. My advice? Download Exult and play with it. It's a engine to replace the aging(read: impossible to run today) and proprietary Ultima VII engine. Then look at the source, you might get some good pointers.
  5. Using excruciating long names for loop variables is one bad thing, in my opinion. But i,j,k don't cut it out either. If it is a simple counter, I tend to use "counter". Sometimes, "loop", for lack of a more meaningful word in some situations. I don't think of myself as being a bad programmer because of that :)