Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

92 Neutral

About zoneweb

  • Rank
  1. zoneweb

    circular gravity

    Using a polar coordinate system for the physics should simply things a lot.
  2. zoneweb

    Ticks in PHP Games

    You need to queue the orders and process them one at a time. Read from the database only if the values have been changed. Otherwise, display it from the cache like what you've said.
  3. zoneweb

    how much faster si udp

    Even if there's no packet loss, TCP requires the receiver to send acknowledgements of received data.
  4. zoneweb

    Java or C++?

    It's so easy to blame everything on implemention. It's a catch-all phrase for defending anything that's wrong with a particular tool. One could argue that the performance issues of C/C++ is related to implementation too. If the compilers were made better, C/C++ would always be extremely far ahead of Java in performance. Java's main performance pitfall is the memory structure - it suffers because it doesn't allow explicit value objects and AFAIK little or no memory layout optimisations are done automatically. This is where 95%+ of modern performance issues are - memory layout problems causing the busy loops to fall outside the cache. [/quote] Regardless of whether or not the percentage is correct, you've admitted yourself that Java is an inadequate language, performance-wise. There's a huge difference between a little abstraction and 100% abstraction. And if Java is so good, it would've been used for coding commercial operating systems
  5. zoneweb

    AI for simple Bomberman game

    You could try one or more of the following: 1) Check the distance of the player to the bot. If the player is too close to the bot, the bot should avoid placing bombs and focus on running away. 2) Use the pathfinding algorithm (A*). If there isn't a path of escape to safety, don't put the bomb. If a path leads to a dead end, the bot should avoid it. 3) Make the map bot-friendly. Add hidden triggers or location markers on the map to make it an ideal bomb site.
  6. If you want it simple, you could just average the coordinate positions of all targets that your camera needs to look at, then have your camera focus on the averaged position.
  7. zoneweb

    2d game depth?

    You haven't mentioned what graphics API you're using, but the principle is the same regardless: sort all your sprites by the order of their appearance before drawing them or draw each sprite into a separate graphics layer then draw all the layers in order onto to the main screen.
  8. Since your space combat mode is strictly 2D, there's no reason why the standard A* algorithm can't be applied. Just use a different grid for each different ship size.
  9. This should be easy. Just use an array of flags identifying the buffs/debuffs with associated countdown timers. Have each timer decrease with each frame elapsed or poll the internal clock. Once the timers reaches zero, turn the effects off. When the buffs/debuffs are reapplied, increment the timers. Activate the effects only when the timers are greater than zero.
  10. zoneweb

    Java or C++?

    That only happens when you scale it up. Hobby games are still doable in C++ without much hassle (if you know what you're doing). You just have to avoid the gimmicks that other programmers sometimes use to make their programs appear more sophisticated than necessary (e.g., excessive use of inheritance, pointers, and unnecessary datatypes when simplier methodology would suffice). The key is to follow a programming paradigm that allows smooth porting of the program between platforms and languages.
  11. zoneweb

    Whats wrong with java?

    Your point would be valid if it weren't for the fact there aren't any Java games that have graphics and performance comparable to a modern game written in a non-Java language (e.g., Crysis). Here's a link to the only list I've found so far of commercial games made with Java: http://www.java-gami...hp/topic,3123.0 The latest game on the list, Tribal Trouble 2, has dated 3D graphics. Same situation with the rest of the games on the list too. I understand games made with Java have to work within Java's limitations but it's rather euphemistic to explain the reason for the substandard graphics that's consistent on many Java games as simply a matter of differing style. Your reference jMonkeyEngine is a good example of Java trailing behind in the graphics department. Blocky, low poly, and pixelated graphics, seriously? http://www.electroni...ative-code.html The Android NDK is a companion tool to the Android SDK that lets you build performance-critical portions of your apps in native code. It provides headers and libraries that allow you to build activities, handle user input, use hardware sensors, access application resources, and more, when programming in C or C++. If you write native code, your applications are still packaged into a .apk file and they still run inside of a virtual machine on the device. The fundamental Android application model does not change.[/quote] John Carmack acknowledges problems, but what developer never encounters problems? What programming languages never have problems? Should a developer switch to another language simply because he found his current language too hard for him instead of working things out? Carmack never mentioned switching to Java anywhere in that blog post. I'm not entirely discounting Java as a language for developing games, but with such a discouraging number of commercial games produced with Java, it doesn't support the opinion that Java is good for general game development especially if the developer wants to stay on the cutting edge. I understand there are developers who feel a sense of romanticism for certain languages because of various reasons (e.g., it's their first language), but sentimentalism shouldn't taint the arguments of why languages are good or bad. Otherwise, why deny the shortcomings of a language in spite of evidence?
  12. A simple solution would be to use the onmousemove event to control an in-game cursor.
  13. zoneweb

    Whats wrong with java?

    Slow compared to what? C++, C, Assembly? The JVM has come an awful long way in its 15+ years. And of course there are multiple vendors of JVMs now, all with different performance properties. Minecraft is written in Java, and while it might not be that much to look at, a whole mass of computations are going on under the hood. [/quote] If it was fast, then the graphics could've been done better. Java is not good for gaming unless you're content with not going beyond subpar 3D graphics. Yes, there are commercial games made with Java, but they're only a few in number (at least on PCs). That's a telling sign that it's not meant for heavy duty games. Not so much -- There's a native code SDK available too, which I'd make an educated guess is the preferred environment for pro game developers, for portability between PC and iOS if nothing else. [/quote] Programs written with the native code SDK still require a VM (for the Android OS at least), which defeats the purpose of writing in native code. A simple, self-contained library that doesn't do what you want isn't very helpful, regardless of how well its documented or clear the code is. [/quote] Multiple libraries that aren't well documented aren't very useful either. Many functions and classes are often so interlinked and esoteric that examples are required to know the proper use of them. C++ simply doesn't make any over-reaching attempts to protect you from yourself. Java and many other modern, RAD-oriented languages have extensive guardrails in place, while C++ is happy to let you walk off the end of the pier; however, that does't change the fact that good design is required regardless of language or programming paradigm. [/quote] So the best languages are the ones that act like nannies? I see that cognitive laziness and impulsiveness, but I agree with your point. Again, there's something to be said for simplicity, and I actually have a lot more respect for JavaScript than your average Joe -- but its hardly a panacea of simplicity. Javascript performance varies greatly between browsers, as does the feature-set needed to do anything interesting with games. Performance swings from one extreme to the other between even versions of the same browser. [/quote] Though JS code is prone to hanging up because of bad loops or whatnot, it won't crash in the way that compiled programs do. With the recent addition of the canvas element, making games with decent 2D graphics is possible. It's a good alternative to flash, which has even worse performance issues.
  14. zoneweb

    Jumping for AI in my platform game

    Like what one poster said you could simplify things by making some variables constant. But you could make it even easier by making almost every variable constant. Restrict yourself to a limited set of jump vectors and have the AI choose from among set one vector that best fits the situation.
  15. You could either make every sprite image the same size and hard code the offsets (easy way) or you could do on-the-fly calculations for the offsets (hard way). In the latter case, you create a standard point of reference for the sprites (e.g., center of the sprite image).
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!