Jump to content

  • Log In with Google      Sign In   
  • Create Account


ChaoSXDemon

Member Since 26 Apr 2011
Offline Last Active Jun 18 2012 09:53 PM

Posts I've Made

In Topic: Moving an image

09 June 2012 - 02:50 PM

This would be a great time to look into LWJGL (Light Weight Java Game Library) since it is a binding to OpenGL (Minecraft is using this!) it will provide relatively advanced graphics. There is nothing wrong using Swing as your backbone, and if it is, I suggest you look into "Killer Game Programmer in Java" which does a nice job of explaining game programming using Java with Swing.

CXD

In Topic: Why is C++ the industry standard?

02 June 2012 - 02:10 AM


Actually, Java using more memory can very much be a problem depending on what you're doing. Mobile devices (Android's Dalvik comes to mind) or large industry systems may see this. I have a friend who works for one of the large database providers, and with so many virtual instances running, their Java implementation constantly drives down the available system memory. Even in normal game development, Java tends to simply eat up memory, and depending on what you're doing, memory might be in short supply. I do a lot of procedural work, and end up using a lot of memory. I've hit the 4 GiB limit in the past with C++; Java would have been worse.

Java does not tend to eat up memory.
Excessive memory usage has nothing to do with Java itself, it all depends on your very own coding style and that of used libraries.
Please do not feed age-old myths.
True is, that automated garbage collection can lead to mindless programming habits, but that usually has bad consequences in each and every language and environment.


Thank you :)

In Topic: C#/XNA or Python/Pygame for Game Development (2D Side-Scrolling like Terraria)?

01 June 2012 - 11:30 PM

If you are learning Python, you should check out PyQt, PyGame, and / or PyOpenGL which are GREAT AND AWESOME for your game development :)

I'm currently working on a project that generates natural foot prints (including angels and timing) using PyOpenGL. Essentially it's OpenGL with Qt but in Python.

CXD

In Topic: Why is C++ the industry standard?

01 June 2012 - 11:22 PM



I hope someone understands this:
http://www.jelovic.c...ava_is_slow.htm

Personally, (although I am most experienced with C++) I don't like C++ much. I agree strongly with dilyan_rusev. I don't think C, either, is all that shiny enough for the C++ designers to completely ignore people's problems with it, just so they can continue to be fanatic about C's legacy. I would say C++'s contributions aren't much either. There's a chance that if you limit yourself to utilizing C++'s capabilities, you can complete your project(s) much sooner. C++'s meta-language just sucks; I disagree that it improves any of the programmer's productivity. I tried "D", but I honestly didn't try very hard, because it makes some big mistakes that Java has also made.


That is a nice article and frankly, it's got a point. However, I would like to point out that who ever wrote this is still thinking in an older mind set. Garbage Collection (GC) was a hot topic back in its birth dates just like how multi-core programming and languages that supports multi-thread optimally is a hot topic today. People back then wasn't sure if GC can be implemented on software or it needs hardware acceleration. Eventually, software was all that it needs. The point of bring this is the word "NEED". If you know your software NEEDS that 0.1s of optimization by using cache, then use C/C++ and do those crazy things! So why don't we NEED that optimization today?

The article mentioned that Java uses more memory. Is that a problem? NO...who isn't on a 64-bit machine that has more than 4096MB of RAM? Maybe people who DON'T CARE for that speed and some who just can't afford that cheap memory would still use an older system with less RAM. With that much RAM, we can AFFORD Java's heavier memory usage. Additionally, SSD are becoming more and more popular and page swapping on those isn't that bad. With that in mind, we should be focused on other things such as "Design Patterns", "Production Flow", "Prototyping" etc.

Unless you are writing some low level CORE library, honestly, WHO CARES?

CXD


Actually, Java using more memory can very much be a problem depending on what you're doing. Mobile devices (Android's Dalvik comes to mind) or large industry systems may see this. I have a friend who works for one of the large database providers, and with so many virtual instances running, their Java implementation constantly drives down the available system memory. Even in normal game development, Java tends to simply eat up memory, and depending on what you're doing, memory might be in short supply. I do a lot of procedural work, and end up using a lot of memory. I've hit the 4 GiB limit in the past with C++; Java would have been worse.

Your point about caching seems... well, wrong. Most VM/JIT implementations tend to be relatively cache unfriendly, and that can and will significantly hamper performance. Java isn't appropriate for many games because of its system-agnostic nature - the programmer can and often will write better abstraction code than a JIT will generate.

ALSO, is there a REASON that you SEEM to enjoy PLACING EMPHASIS on things USING caps so OFTEN?

Uhh... yes? lol you just can't directly manipulate them in other languages... but they ALL USE POINTERS Posted Image


Java doesn't have pointers, it has handles. They don't support manipulation, and do not necessarily point to a memory address. They point to an arbitrary object. This is why Java doesn't call them pointers - because they don't behave exactly as such. Java is still pass-by-value (just like C), but they mask away much of the functionality. Not all languages even have these pseudo-pointers - some only have concepts equivalent to C++ references, which work via pass-by-reference.


Yeah for mobile device that's probably true :) And I didn't know that about Java pointers so thanks for the info :)

CXD

In Topic: Java RPG Stats System

31 May 2012 - 09:32 PM

Before discussing about the best design possible, you should probably look more closely to your problem. What kind of effects do you want/need/plan to implement? What kind of operations on effects do you want/need/plan to support? You may for example be interested in knowing if an effect is positive or negative or what stats are changed by the effect. You may be interested if the effect should be applied once (e.g. add 2 points to dexterity) or every frame (or every n milliseconds). You may want to know if the effect is "invertible" (i.e. if the result of the effect should be removed when the effect is removed) or if it is permanent. You may want to know if the effect has a duration or if it is linked to some object. You should then decide what's data and what's code (e.g. the two effects "+2 dex for 2min" and "+5 int for 30s" may be implemented as two instances of the same effect). Finally, you should also probably try to understand how those effects will be used by your system.


Okay, I'll make a list of the things I want and try to come up with an OOP design such that it is easy to mix and extend the effects. Thanks!

PARTNERS