Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 8
1  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-18 15:19:33
Basically the name Java has forever been tainted, wrongly so, with poor performance
you shouldn't associate your commercial products, especially games with java, because it can only hurt you - since there is this prejudice

I'm not disagreeing with that, and I understand it. I just hope we could try to move past that.

Quote
Well most people are morons and approach everything in life based on prejudice.

I know, I know. I'm pretty aware I'm a total idiot myself and will sometimes ramble about things just based on my feelings about it. But hey, being aware of a flaw is the first step to overcoming it.
2  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-17 21:17:20
I'm sad to see these kinds of prejudices about Java even here on JGO.

And I'm sad about statements like this one, which implies two very wrong things:

  • That people approach languages based on prejudice rather than on rational assessment.
    If actual verifiable proof is presented of one language outperforming the other, then that's that. But way too often I see that proponents of either "side" are careful to ignore or outright dismiss whatever piece of evidence is presented that contradicts them.
  • That participating in JGO somehow makes you part of the "team" and your opinions have to conform to that of others.

Again, programming languages are tools, and discussing their strengths/weaknesses is fine. But when people start taking it personally, then it's time to take a step back.
3  Game Development / Game Mechanics / Re: Tile vs Polygon Collisions on: 2013-05-15 17:54:26
Thought I'd add some more info on what I'm planning and doing. Here's a quote from my devlog:



The animation shows, in no particular order:

  • Sector Lines: Inspired by how the original DooM handled it's map system, the sector edges handle collisions, area transitions, and a few other things.

    Up in the animation you can see the following:
    • Yellow: Solid edges.
    • Green: Non-Solid edges.
    • Cyan: Edge normals, that is, where the "wall" is facing.
    • Blue: Edge's starting point, as they are actually vectors, with the normal pointing to the right.

    No, I didn't forget about the red lines...

  • Collision Groups: One of the reasons why I chose this arrangement is to simplify collision calculations. The idea is that sector edges are organized in groups based on their normals (in other words, based on where the "walls" are facing). When an object moves, it only checks if collisions happen with edges in a group that would collide with it's movement vector. In other words, if an object moves to the left, collision will only be checked with edges facing to the right.

    In the animation this is represented by the Red edges. When the Doomie moves into a given direction, the edges being checked for collision (that is, those part of the appropriate collision group) are being painted red.

    Note that the diagonal edges light up more often, as they are part of two collision groups at once.

Next steps are as follows:

  • Merge the Sector and Tilemap code, so tilemaps are generated based on the sector's collision layout (Right now I have manually made them match, but they are unrelated pieces).

  • Improve the collision group sorting. The idea is to have the collision groups sorted front to back, or, in other words, organized based on position to avoid detecting a collision with an edge that is behind another edge.
4  Discussions / Business and Project Discussions / Re: The nightmare of taxes, and what can I do about it on: 2013-05-10 15:18:29
Oskuro I know it's the Interwebz, I'm not gonna take anything seriously here. But I really want to make this project and that's why I'm mad.

I understand this. I don't want to patronize you, just sharing experiences because it's very common for people to jump into these things without thinking them through (Yes, personal experience, not about taxes, but still).
5  Game Development / Game Play & Game Design / Re: Smooth screen scrolling? on: 2013-05-10 15:13:46
I do understand. What I'm suggesting is that, instead of drawing directly to the screen, you first do exactly what you are doing, draw it all into an intermediate surface, and then draw that image into the screen with the proper position adjustment so it is smooth.

Think of it as taking a photo of your map, and the taking that photo and placing it into the frame in the position it needs to be at.

That way, only thing you need is to add an extra step to your pipeline instead of reworking the rendering algorithm, so if you have:

 Movement -> Draw Tiles -> Screen

You'd have

 Movement -> Draw Tiles -> Move Intermediate Image -> Screen


The bit about rendering more tiles is just to make sure you don't get empty spaces when positioning the intermediate image. In essence, the intermediate image is larger than the screen area, and you're just moving it around to "frame" the parts you want.
6  Game Development / Newbie & Debugging Questions / Re: Story implementation on: 2013-05-10 12:49:06
For events.... Trigger objects.

You have a collision system, right? Just have invisible objects that, when collided, trigger the event in question.

This is exactly what first person games do, by the way, whenever an event is triggered, it is because you just crashed into an invisible object. So yes, map design ends up being similar to laying traps for players.


As for the guards and the juice, same thing. The guard triggers and event when collided, and that event checks if the character's inventory contains the needed item. If it does, take the item away and move the guard.


And surfing.... You do need to check what your character is standing on! How do you check if there's a wall in the way? Same code you use for collisions can be used to determine what type of terrain the character is on.
7  Game Development / Game Play & Game Design / Re: Game art for developers who have no artistic sense whatsoever? on: 2013-05-10 12:44:31
Most people tend to think that you need to be "talented" to draw (or write, or compose music, etc...)

That is a misconception. As the saying goes, practice makes perfect. Talent only gives you a head start (sometimes a massive one, certainly).

Just keep trying, and eventually you'll notice you are improving.

And also keep in mind that a nifty thing about videogames is that no individual part is definitive. If a part is crappy, but the sum of all the parts is a fun game, people will not care (I mean, Minecraft's graphics and character design aren't really that spectacular, are they?)
8  Discussions / Business and Project Discussions / Re: The nightmare of taxes, and what can I do about it on: 2013-05-10 12:32:34
Politics are always a complex headache, specially in these crappy times (I'm not personally happy about how things are handled here either).

Best thing you can really do is read up as much as you can on the specifics of your legislation.

The reason I bolded the word "read" is because of what Riven just said, don't rely on hearsay or forum posts. Read the actual legislation, find someone (a lawyer or something) to explain it to you if you don't understand it. Make sure you have all the facts before you make any decision.

After all, if you screw up, you'll be the one paying the consequences, not Riven, not Cero, not me, nor anyone on this forum, or anyone on the world who gave you advice.

The bottom line is: If you want to make money out of it, then you have to treat it as seriously as any job. Cutting corners will only get you trouble.


And I'm not bashing on you, it's just that this happens very often. People are frustrated, they make decisions without having all the facts, and then end up screwed. It's sad.  Sad
9  Discussions / Business and Project Discussions / Re: The nightmare of taxes, and what can I do about it on: 2013-05-10 11:56:09
I don't want to get into the politics of taxes, just saying that the amount of trouble you can get into if you evade them is not worth it.

Seriously, screwing with the government is usually a bad idea, even for big corporations with lawyers and money behind them!
10  Game Development / Game Play & Game Design / Re: Smooth screen scrolling? on: 2013-05-10 11:52:14
Maybe you need to decouple the drawing of tiles from the viewport (the camera, so to speak)

Have you tried drawing all your tiles (plus a few extra offscreen tiles) into a BufferedImage, and then position the image into the canvas based on the camera position?

Something like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
int cameraXpos = ...
int cameraYpos = ...
int cellWidth = ...

BufferedImage compositionCanvas = new BufferedImage(...);
Graphics graphicsContext = ... // Your main window rendering context

...


//Rendering Loop
while(doRender)
{
   //This method draws the tiles into the compositionCanvas image.
  //The tiles are drawn based on the tilemap coordinates
  DrawTiles(cameraXpos/cellWidth, cameraYpos/cellWidth, compositionCanvas);

   // Now draw the composed image into the app context, displacing it as needed.
  GraphicsContext.drawImage(compositionCanvas, cameraXpos, cameraYpos, null);

}


It's a very raw code example, just meant to get the idea across. Essentially, draw your tiles completely (say, if the screen shows 10*10 tiles at one time, draw 12*12) and then use the .drawImage method to position the resulting image smoothly.

You can also use this method to draw all tiles at 1:1 scale, and then scale up the resulting image by using the width and height attributes of the .drawImage method.

Am I making sense here?  persecutioncomplex
11  Discussions / Business and Project Discussions / Re: The nightmare of taxes, and what can I do about it on: 2013-05-10 11:40:15
especially not gonna pay any taxes to the current government.

Uh, bad attitude. Put your grievances with your government aside for this, because they won't care about your opinion when they bring the hammer down on you and your team for tax evasion.

I'm not getting on whether the taxation system is properly implemented in your specific country, and the fairness of it all.

Jut pointing out that tax evasion is a crime, and can land you in a lot of trouble.


Example? Around these parts (Spain), if you fail to report and pay your income taxes, when they come after you you've got to pay the debt, plus a fine.  The minimum amount for said fine is 50% of the debt, plus late charges, but it can go up to 250%!

And when I say minimum fine, I mean that, even if you didn't pay because of a silly mistake (my case some time back... involving a wrong mailing address and not being in the country when I should've received the notice), and even if you can prove that it was a honest mistake and there was no ill will on your part (as I did), they, as government employees, are legally obligated to bring the hammer down.

So the moral of my story: Don't mess with the government. If paying taxes makes the whole thing not worth the effort, then just don't do it. But please, don't ever consider tax evasion!


That... And not paying your taxes while others do makes you kind of an asshole.
12  Game Development / Performance Tuning / Re: Fast/Efficient method to filter a numeric Value on: 2013-05-09 17:38:28
I know, hence why I mentioned I know it's overkill.


Then again, my question is about how this operation, specifically, can be optimized, so I don't think it is out of place, this being the performance sub-forum and all.

13  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-09 11:12:58
+1 to what sproingie just said.

Heck, in C++ you can even have assembler blocks if you're that kind of maniac, but again, requires more effort and care on the part of the programmer to avoid making the computer explode.

My personal philosophy regarding languages is that it's not the tool that makes the project, but the programmer's skill.

I'm kind of pressured into that mindset, since in my line of work, I'm actually forced to use specific programming languages for specific devices, and performance is expected to be the same regardless.
14  Game Development / Performance Tuning / Re: Fast/Efficient method to filter a numeric Value on: 2013-05-09 01:11:09
@Everyone: Calling it a filter because it reminded me of an electrical input filter... I really suck at remembering the "proper" names of algorithms and data structures.


I think the OP doesn't mean Java generic, but 'works for each primitive type'.

Indeed. Just specified that because maybe there are some tricks that only work with specific primitive types, and that's something I want to know.

I'm really liking pitbuller's suggestion, by the way, simple, rather elegant, and only performs a single arithmetic operation. It won't work with differently sized intervals, though, but since the objective is to make an specific implementation for the task, rather than have a generic method, it can be tweaked.

Rewrote my current code like this:

1  
2  
3  
4  
5  
6  
7  
private static final double filter_interval = 1.0f/4;
private static final double[] filter_values = { filter_interval*0, filter_interval*1, filter_interval*2, filter_interval*3, filter_interval*4};
   
public static double NotReallyAFilter(double value)
{
   return filter_values[(int)(value/filter_interval)];
}


Seems to work fine.

Sorry for being such an overoptimizer tonight but... I'm guessing the compiler is already doing this, but since the value array is static, I could simply inline the array indexing and get rid of the method calling overhead too. Hmmmm.



Oh, and thanks to everyone for the comments Smiley

15  Game Development / Performance Tuning / Re: Fast/Efficient method to filter a numeric Value on: 2013-05-08 17:07:06
I'm looking for a generic approach, given that I might need different output types in different parts of the program. Just wondering if there was some smart way to do these calculations.


Also, encapsulate the code into a class and pre-calculate the 'fixed' stuff as class members.

That is of course how it will end up in the final code. The generic approach I posted is there just to make it easier to understand what the general case of my question would look like (heck, could be generalized more by using a generic variable type).

As for the intervals (slices), no, they don't necessarily have to be of equal size.


This is an (specific, for 4 equal intervals, and a range of 0.0 to 1.0) example of how I am actually using this in my code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
private static final double Filter_MIN    = 0.0f;
private static final double Filter_MAX    = 1.0f;
private static final double Filter_MEDLOW = 1.0f / 4;
private static final double Filter_MED    = 1.0f / 2;
private static final double Filter_MEDHIGH = 3*(1.0f / 4);
public static double Filter_4(double value)
{
   if(value <= Filter_MIN)       return Filter_MIN;
   if(value <= Filter_MEDLOW)    return Filter_MEDLOW;
   if(value <= Filter_MED)       return Filter_MED;
   if(value <= Filter_MEDHIGH)    return Filter_MEDHIGH;
     
   return Filter_MAX;
}


Note that, in this case, the output values match the threshold values for each step, but this doesn't need to be the case.
16  Game Development / Performance Tuning / Fast/Efficient method to filter a numeric Value on: 2013-05-08 16:02:45
Hi there.

I've come upon a situation where I need to filter a numeric value (of any type) so it falls into a predetermined set of output values.

For example, let's say we have an integer whose range is 0-200:

1  
2  
final int MIN = 0;
final int MAX = 200;


And we want to, given an input in said range, filter it out so we get one of three values:

1  
2  
3  
final int HIGH = 200;
final int MED = 100;
final int LOW = 0;


So, we would have a filter method doing something like this:

1  
2  
3  
4  
5  
6  
int filter(int input) { ... }

filter(10);    // Output: 0
filter(30);    // Output: 0
filter(110); // Output: 100
filter(180); // Output: 200


In other words:

1  
2  
3  
4  
5  
6  
7  
8  
int filter(int input)
{
   if(input < MAX/3) return LOW;

   if(input < 2*(MAX/3)) return MED;
   
   return HIGH;
}



So, my question would be.... What is the most efficient way to do this type of operation? This code is meant to be executed many (as in once per pixel at least) times per frame. Is there some bit-shifting trickery that could be used? Some arithmetic magic?



Currently, my generalized (using doubles as the value type) implementation is as follows:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
public static double filterValue(double value, int slices, double MIN, double MAX)
{
   if(value <= MIN) return MIN;
   if(value >= MAX) return MAX;
     
   double increment = MAX / slices;
     
   for(int i = 1; i < slices; i++)
   {
      if(value - (i*increment) < MIN)
      {
         return (i*increment);
      }
   }
   
   return MAX;
}


To me, it looks like there are way too many ifs, multiplications and divisions in there.  persecutioncomplex

Comments like "don't use doubles you dolt, do it with byte-shifted integers!" are the type of ideas I am looking for.


17  Java Game APIs & Engines / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-04-24 17:13:35
Intriguing. Thanks, it is now part of my "To Check Out" list  Grin
18  Java Game APIs & Engines / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-04-24 16:57:15
Oh, just meant the fancy formatting of all the data was my doing (as in manually), to avoid anyone thinking that there is some fast method to print it out like that.


Been checking NEWT. It's part of JOGL right? Is there a stand-alone version that can be plugged in into something else?

19  Java Game APIs & Engines / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-04-24 13:33:57
I don't know what you have chosen to hide when using AWT

 Huh
20  Java Game APIs & Engines / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-04-19 23:05:43
 Cool! I'll have to check it out then!


@myrealityde
Oh, by the way, here's the output for my laptop running Ubuntu 12.04:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
// Recover the Graphics Environment (usually no need to store it, but just being verbose for clarity)
java.awt.GraphicsEnvironment localEnvironment = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();

// Recover Device List
java.awt.GraphicsDevice[] deviceList = localEnvironment.getScreenDevices();

// Recover Display Modes for Device 'i'
java.awt.DisplayMode[] modeList = deviceList[i].getDisplayModes();

// Recover Graphics Configurations for Device 'i'
java.awt.GraphicsConfiguration[] gfxConfigList = deviceList[i].getConfigurations();


This is the result. The first list is a log of all the graphics modes (my laptop only returns a single device), and then the first log of the many graphics configurations (didn't want to post them all).

Note that I parse the data a bit, you can't just .toString() this stuff. Tongue

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  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
20130419-223847 - [DEBUG]: -----------------------------------------------Display Info:
Device [0]: :0.0
     nk0.doom4k.system.display.DisplayDevice@70c722ad
  Compatible Modes:
    Mode [0] Size[1920x1080] Depth[-1] Refresh[60]
    Mode [1] Size[1600x1200] Depth[-1] Refresh[60]
    Mode [2] Size[1680x1050] Depth[-1] Refresh[60]
    Mode [3] Size[1280x1024] Depth[-1] Refresh[75]
    Mode [4] Size[1280x1024] Depth[-1] Refresh[60]
    Mode [5] Size[1440x900] Depth[-1] Refresh[75]
    Mode [6] Size[1440x900] Depth[-1] Refresh[60]  ACTIVE
    Mode [7] Size[1280x960] Depth[-1] Refresh[60]
    Mode [8] Size[1280x800] Depth[-1] Refresh[60]
    Mode [9] Size[1152x864] Depth[-1] Refresh[75]
    Mode [10] Size[1024x768] Depth[-1] Refresh[75]
    Mode [11] Size[1024x768] Depth[-1] Refresh[70]
    Mode [12] Size[1024x768] Depth[-1] Refresh[60]
    Mode [13] Size[832x624] Depth[-1] Refresh[75]
    Mode [14] Size[800x600] Depth[-1] Refresh[72]
    Mode [15] Size[800x600] Depth[-1] Refresh[75]
    Mode [16] Size[800x600] Depth[-1] Refresh[60]
    Mode [17] Size[800x600] Depth[-1] Refresh[56]
    Mode [18] Size[640x480] Depth[-1] Refresh[73]
    Mode [19] Size[640x480] Depth[-1] Refresh[75]
    Mode [20] Size[640x480] Depth[-1] Refresh[67]
    Mode [21] Size[640x480] Depth[-1] Refresh[60]
    Mode [22] Size[720x400] Depth[-1] Refresh[70]

20130419-223847 - [DEBUG]: -------------------------------------Device [ :0.0 ] Info:

GraphicsConfig[0]:  DEFAULT
Configuration [ X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x21] ]:
   Bounds:                java.awt.Rectangle[x=0,y=0,width=1440,height=900]
   BufferCapabilities:    sun.awt.X11GraphicsConfig$XDBECapabilities@3cca6f82
   ColorModel:            DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0

   DefaultTransform:      AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]
                          Type:        0
                          Scale X:     1.0
                          Scale Y:     1.0
                          Shear X:     0.0
                          Shear Y:     0.0
                          Translate X: 0.0
                          Translate Y: 0.0

   ImageCapabilities:     java.awt.ImageCapabilities@1c78014a

   NormalizingTransform:  AffineTransform[[1.333333333333333, 0.0, 0.0], [0.0, 1.334033613445378, 0.0]]
                          Type:        4
                          Scale X:     1.3333333333333333
                          Scale Y:     1.3340336134453783
                          Shear X:     0.0
                          Shear Y:     0.0
                          Translate X: 0.0
                          Translate Y: 0.0

   isTranslucencyCapable: NO

   ImageCapabilities:     IsAccelerated:  YES
                          IsTrueVolatile: NO



As you can see, a pretty simple code results in a lot of data that you don't seem to be getting. Probably the drivers are to blame (HP laptop with hybrid Intel/ATI card in my case).
21  Discussions / General Discussions / Re: why are people trying to use Java2D to make games? on: 2013-04-19 11:14:00
Personally, I would rather advise people to learn the basics before using high level APIs that hide most of the complexity. Extra tools can be useful to avoid reinventing the wheel.

Yeah, I should have explained that better. I meant more or less that same thing. Understanding the basics makes using advanced tools even better.

Using the tired car metaphor, you don't need to understand how the engine works, or the basic physical properties of the vehicle, but having an understanding of those, even a cursory one, will help when you come across unexpected issues.

I know plenty of people (and been one of them too) who jump on advanced tools from the get go, and then are stumped when they run out of tutorials for specifically what they want to do.
22  Java Game APIs & Engines / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-04-18 16:27:09
My experience is that it is indeed unpredictable, probably requiring some low level wizardry to get actual results, which kind of defeats the multi-platform approach.


I did some research trying to determine the screen rotation angle, which lead me to compiling system-dependent libraries that would query the information from the system.

Something worth noting I found was that even on the official libraries, many low level features are just ignored. The rotation parameter, for example, was ignored as it wasn't completely reliable (driver issues) and wasn't very important when implemented.

With this, what I'm trying to say is that, if accessing system configuration parameters is crucial, you can't really rely on standard multi-platform libraries entirely, if only because time constraints (deadlines) probably mean the developers couldn't fit everything in.



23  Java Game APIs & Engines / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-04-18 11:20:51
I do pretty much the same. It does work, but results differ between Windows and Ubuntu.

Maybe you could try to retrieve all the display devices instead of just the default one?
24  Discussions / General Discussions / Re: why are people trying to use Java2D to make games? on: 2013-04-18 10:57:15
I blame Notch.

I was all happy about choosing a good extension for game development, when, looking into Notch (because Minecraft) I stumbled upon his Left4kDead game, and from that went on to check the Java4k page, which lead me to think:

"All these cool games are being done in plain Java?"

"And they run fine?"

"And they take 4k?"

"..."

"..."

"I must learn to do this!"  Angry



More seriously, I spent many years jumping from one framework/API/Tool to the next (bare OpenGL, Panda3d, Ogre3d, ACS, Unity...) and finally realized that I had no experience with the basics. So made the decision to buckle down, and strive to actually finish a project using no extras.

That doesn't mean I don't see the limitations, I've been tinkering with normal mapped lighting and blending modes recently and right now could punch the JVM in the face, but I still think it is a worthwhile exercise.

One one hand: Learn to crawl before you walk
On the other: The more you can do without extra tools, the better
25  Discussions / Miscellaneous Topics / Re: Is programming as a job boring? on: 2013-04-14 02:18:22
I have been in different programming jobs, and have found some boring, while others are not.

To me, it only gets boring when it becomes routine, that is, when there are no new challenges to keep me on my toes.

It also helps if the job allows for some personal creativity, rather than strict rules dictating everything you do.

Please note that there's a difference between boring and frustrating. The later happening often if the job requires any skill at all, regardless of how much you may like it.


Then again, in my experience, there are two major types of person:

 a) Those who enjoy (like) their job, and thus have the drive to grow, improve, and seek new challenges.

 b) Those who do not enjoy their jobs, and are in it for the paycheck exclusively.

I'd say the second group, regardless of what they are working on, will define their job as "boring", but mostly because they are doing it exclusively for the reward.

Would be the same with game development. If you're in it just for the paycheck /recognition, then the development process will be a pain in the arse.


Not passing judgement on any of those approaches, mind you. Not everyone has the luxury to choose a job they truly like, and even then, a lot of people simply won't enjoy work itself no matter what it is.
26  Discussions / General Discussions / Re: Why don't many of you sell your games? on: 2013-04-12 17:08:03
Lots of you on here seem to be absolute gods when it comes to programming

Not that I would say I'm a programming god (just a sex god), but in my situation, my skill and knowledge about programming comes from the fact that I have a regular job as a software engineer, and game development is a hobby.

I'm guessing that's the case for a lot of people, we'd love to live off of game development, but reality being as it is, have to make ends meet otherwise, and do not have the time to produce marketable games.


Also, don't confuse programming skill with the ability to make good games. You can churn out the most beautifully crafted code, capable of bringing tears to the eyes of a hardened war veteran with no eyes, and still be incapable of creating engaging games.

Game development is a very multidisciplinar endeavor, just being good at one of the parts, no matter how important, isn't enough to come up with a good product.



Yes, I stole a quote up there. Stare
27  Game Development / Game Mechanics / Tile vs Polygon Collisions on: 2013-04-11 14:13:15
 Howdy!

Right now I'm knee-deep into the underlying data structures for my project, namely the map/collision system. Originally I expected to make the game run on a tile-based map, so I could rip off be inspired by Notch's Minicraft (Ludum Dare entry).

But as I've got to implementing the system, and seeing how I intend to have a line-of-sight lighting system, I've been thinking it might be more optimal to have an underlying polygonal collision structure to handle both collisions and lighting, which, funny enough, would be very similar to how the original DooM games did it (For those who don't know, my project is a top-down version of DooM).

So my question would be, what is the better approach? These are some of the requirements.

  • Visual representation is still a tilemap, so polygons must adhere to "manhattan" geometry, that is, 90º or 45º angles between lines, and all line lengths are integers (multiples of the predefined cell size).
  • Must run smoothly with a large number of entities.
  • Different areas (sectors) can have a different ambient light levels.
  • Small network footprint as cooperative LAN gameplay is a major objective.
  • Maps need be procedurally generated.

I'm leaning towards polygons for several reasons. Chief among them is that it's easier to represent a polygon mathematically. Additionally, by dividing the game area in "sectors", I can sort different areas into drawing/collision lists (something like BSP or portals) for more efficiency. I even might have the fringe benefit of allowing sectors to exist over one another, or even non-euclidean map structures, simply by joining "sector" edges independently of their map coordinates.


But, as is to be expected, I'm mister noobness here, so would like the board's opinion.

Oh, few caveats:

  • Java2d Rendering: yes, I know, not optimal, etc. As I've said before, I want to implement it all by hand before I rely on pre-packaged solutions.
  • I want to implement it all: I'm already looking at Straightedge for inspiration / ideas, but I really want to manually implement everything myself to better learn the nuts and bolts of the system, so I'm not interested in API recommendations, but rather on a discussion about the theoretical advantages / disadvantages of each system. Smiley

So, discuss! (And thanks in advance)
28  Games Center / WIP games, tools & toy projects / Re: Preview of TT - Tile Tools on: 2013-04-11 11:25:53
Nicely done.


Minor thing that irks me (sorry), it's Graphics, not Grafics.  Smiley
29  Discussions / General Discussions / Re: Storing level data on: 2013-04-05 15:33:56
To simplify the concept of pagination, as explained above by StrideColossus, think of it as having two places to store your information:

  • Hard Drive
  • System Memory

Stuff stored in memory you can use "right now", while stuff in the hard drive needs to be loaded into memory first. Kind of like having books on your desk or stored in a cabinet.

The point is to find an strategy to decide what stuff is kept on memory and what stuff is stored for later, being aware that bringing stuff back from storage is sloooooow.
30  Game Development / Performance Tuning / Re: Speeding up Minecraft? on: 2013-04-05 12:44:15
If I may chip in... I get performance issues under Linux with my own test code.

A simple program that lets you move a sprite around the screen, which runs so fast on Windows the sprite becomes a blur, actually runs slowly under Ubuntu.

Same source, one using JDK7 (windows XP and 7) the other using OpenJDK7.

So yeah, I'm still of the opinion that the issue lies with the Java implementation under Linux (or how it interfaces with the hardware) than the program's code itself.

Although if there are ways to optimize the code to work better under Linux, I'd love to learn about them.

you think optimizing code is fun
you must not be human Tongue

Beware the programmer apocalypse! It's like zombies, but rather than bite brains off, we complain about proper coding practices and obscure implementation details!
Pages: [1] 2 3 ... 8
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (87 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (112 views)
2013-05-16 00:17:58

theagentd (123 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (177 views)
2013-05-12 15:36:09

UnluckyDevil (185 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.565 seconds with 20 queries.