Show Posts
|
|
Pages: [1] 2 3
|
|
1
|
Discussions / General Discussions / Re: why are people trying to use Java2D to make games?
|
on: 2012-12-26 17:25:24
|
But it must be said that if you're thinking of not bothering to learn how OpenGL works then Java is probably the wrong language for you in the first place, no?
Why is it important to learn how OpenGL works? I think the result is important, not the knowledge about the techniques under the hood. Once you released your game barely anyone will be interested in the libraries/frameworks you used and nobody will ask you about your OpenGL skills. Of course is it good to know how things work, but is it essential? I don't think so. And hell, we are programming in Java. A language that does most of the low level stuff like memory management and so on for you. It would be nice to know how OpenGL works, but I don't have the time, the will or the need to learn it. ... and this is what's wrong with a lot of programs released today.  To be blunt, as I am always blunt, knowing how things work under the hood allows you to write more solid and optimized code. Just linking things together in a way that works usually leads to a huge mess in the end, sure it runs, but you will have tons of memory leaks, extra CPU/GPU polls, and you will have no idea of how to fix those issues. A program is a work of art, not a hammer.
|
|
|
|
|
2
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Hackers' Haven
|
on: 2012-12-26 12:41:09
|
What do you mean by 'layered VBOs' ?
I really described that badly. I should have stated shared VBOs, I think. I was half asleep when I typed that out. lol Bascially, one VBO can contain several objects instead of one object per set of VBOs, using offsets and counts that are easily managed inside the mesh object classes for quick reference.
|
|
|
|
|
3
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Hackers' Haven
|
on: 2012-12-25 15:16:47
|
To give an idea of what the new rendering engine will look like:  Full armature/skeleton support for animated meshes, two texture layers, one for diffuse the other for emit. Though my library actually has capabilities for 3, to keep my target audience a little wider I opted to skip the specular highlights to reduce GPU/CPU drain, since my target audience are the generic computer users not hardcore gamers I have to accommodate a lot of low level capabilities. Most of the engine is low level stuff, using pure VBO/VAO objects, even layered VBOs as well. The "camera" object is a game camera specifically, so all movements are based on the same coordinates as objects. Object linking is hierarchical as well, and textures are fully dynamic, you can paint on them very easily. There is also a low memory, fast, texture sequence in the core engine. Working on the new GUI engine next. I will be caught back up in about a week, I think, give or take a few days.
|
|
|
|
|
4
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Hackers' Haven
|
on: 2012-12-10 23:09:03
|
|
Okay, coding in raw OpenGL ... not as annoying as I thought. I will release the graphics+game library as well, which will be open source. I have way better material settings and shaders than previously demonstrated, and they'll work on older graphics cards as well, as old as 2006 at least, as that is what I am testing it with and developing it on. I may go up to 2008 but nothing newer as I don't want to alienate too many computer users, and that's part of why I ditched jPCT for this. The library I am working on only uses pure OpenGL and mostly modern stuff, there should at least be extensions available for your card to support it. Current test runs include 8 lights per object, unlimited in the world environment, multipass rendering with and without FBOs, and a very simple but elaborate material system that mimics Blender's materials very closely, with lower quality results as it's real time and to do raytracing the exactly how Blender does would not be possible in real time. Even wrote the engine using Blender units though the Y/Z coordinates are exchanged, as I prefer that coordinate system anyway.
In other words, lots of new coming.
|
|
|
|
|
5
|
Java Game APIs & Engines / OpenGL Development / Re: Shot in the Lighting
|
on: 2012-12-04 12:26:12
|
Thank you, that PDF was extremely useful. But I'm really hoping for some examples of sending uniforms to the shaders, I'm still struggling with that part, instead of using the glLight and glMaterial commands I mean. But that PDF will be VERY useful once I get that far.
|
|
|
|
|
6
|
Java Game APIs & Engines / OpenGL Development / Shot in the Lighting
|
on: 2012-12-04 09:02:49
|
|
Okay, looking for information on the NEW light and material methods for OpenGL, specifically pure version 4 methods. So far everything I find is only the old method of lighting and I notice that both lights and materials in version OpenGL 4 are not in the list of functions, so if they're changing to a new system, I would like to keep up. Please let me know if you have any links or ideas on how to migrate from the 1.1 method to the newest one.
|
|
|
|
|
8
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Hackers' Haven
|
on: 2012-12-01 21:59:04
|
|
Slight delay, not much of one really. The library I was using for the graphics may not work out too well, so I'm probably going to do what I should have done anyway and develop my own graphics routines. Which will benefit the game a lot because there are some nifty effects I discovered a long time ago using OpenGL which are just not available on any of the libraries, not even the big ones. Such as altering the shadow and specular colors per object, just for one example, which, if done correctly, can produce better glowing effect without any extra work on the processor.
|
|
|
|
|
10
|
Games Center / WIP games, tools & toy projects / Re: My Current Project
|
on: 2012-12-01 03:01:59
|
Word of warning: please don't make the glowy art overly bright. When I play games, I'm usually already tired and don't want to look at bright flashy stuff.
lol Well, that would kind of ruin the whole look. There will be changes to make it more mellow though, and the world itself is really dark, except the lines. It's suppose to feel like 80's virtual reality but with a more modern style. On another note, I'm having issues with the scaling, working on it, but it's just not placing things correctly yet in the loader and I can't figure out why. I actually can't play these type of games, 3D games make me dizzy, so it slows development a bit when I have to take breaks just to let my head stop spinning. So if you're wondering why it's taking so long to get the demo working, it's because right now I'm working on that part that makes me dizzy to test.
|
|
|
|
|
16
|
Game Development / Performance Tuning / Re: Garbage collection / Performance issues/ Out of Memory
|
on: 2012-11-28 22:44:32
|
|
This is a problem many programmers fail to address, so simply by paying attention I am impressed.
Check how many objects you are creating, then discarding soon after using it. If it's an object that you need to use a lot, you should consider creating long term "junk" versions of the object to use in method calls, because those objects will take up less memory, especially if the method is called a lot. When you leave a method call, or some such, the objects created are not immediately reclaimed by the system, the garbage collector does that, so they continue to use up memory until the garbage collection pass, which should be left to the system. Any object that is not a primitive can cause this.
|
|
|
|
|
22
|
Game Development / Networking & Multiplayer / Re: Strings not equal after sending them over ObjectOutputStream?
|
on: 2012-11-06 22:29:33
|
Thanks, I didn't think it was too complicated, i just was very confused.
It's a nuance of Java that often takes a bit for coders from c/c++ and others to get the hang of. Everything is a pointer, basically, except primitives. Also there is no operator overloading, so comparisons always compare pointer values for everything that is not a primitive, thus the compareTo and equal methods are usually employed to compare the stuff in the objects you create, such as String. Just remember, if it's a class then operators will effect the pointer, so look for the comparison methods. You can overload equal and if you implement the comparator interface you can add a compareTo as well, which is really helpful in sorting. Personally, I prefer this nuance, it's probably my favorite aspect of Java.
|
|
|
|
|
26
|
Java Game APIs & Engines / Tools Discussion / Re: Real-time multiplayer framework
|
on: 2012-11-06 07:18:03
|
Interesting! Do you mind telling me more about what it can handle? A 3D FPS game? A strategy game? An MMO?
(EDIT: No, I'm not making a 3D FPS strategy MMO game. =S)
Hmm ... that could be a fun project, 3D, FPS, and strategy in an MMO. The AI could would have to be insane ... but ... 
|
|
|
|
|
27
|
Game Development / Newbie & Debugging Questions / Re: Int & Float, Design questions.
|
on: 2012-11-05 08:16:43
|
o,O Is it common for people to add a semicolon like so?: 1 2
| public int x, int y, int width, int height; }; <---- Right Thurr |
It's a non-issue, one of those old throwbacks that's not really important anymore. For some of us it's just an old habit, I do it sometimes without thinking.
|
|
|
|
|
28
|
Game Development / Newbie & Debugging Questions / Re: Int & Float, Design questions.
|
on: 2012-11-04 18:11:23
|
|
To your get/set notion, I base it on how volatile the the data is and what would happen if something changed it unexpectedly. If you have to control changes made then protected/private is the best method, so when a change happens the class can do the other work. But if it's just a data holding class for something where if the contents change unexpectedly you won't get an exception, then do what's comfortable. Some classes in Java I think over use the private/protected members, things like Color should be a bit more transparent than they are, but meh.
|
|
|
|
|
29
|
Game Development / Newbie & Debugging Questions / Re: Smooth walking
|
on: 2012-11-04 16:47:51
|
Time tracking and a lower sleep, say 20 or 30 milliseconds. Here's a quick time tracking class example. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| package kitt.com.swing;
public final class TimeTracker { private long lasttime = System.currentTimeMillis(); public TimeTracker() { this.lasttime = System.currentTimeMillis(); } public int getTimePassed() { long curtime = System.currentTimeMillis(); int millis = (int)(curtime - this.lasttime); this.lasttime = curtime; return millis; } } |
Just every time you pass through your loop start off by calling the getTimePassed method to get the number of milliseconds passed since the last call then interpolate your movement and animations based on that.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|