Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (746)
Games in Android Showcase (226)
games submitted by our members
Games in WIP (827)
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 ... 19
1  Game Development / Newbie & Debugging Questions / Re: Collision on: 2012-08-28 14:17:26
Glad you got it sorted. I've been extra busy, but let me know if you still would like to see some of the vector based collision resources as I will still be collating them for future reference anyway.
2  Game Development / Newbie & Debugging Questions / Re: Collision on: 2012-08-26 11:47:11
Firstly I think it's really helpful to have a basic grasp of vector based collision detection, at least to the point that you know how it can make things easier and also what it is able to achieve. Secondly I think it's helpful to be aware of quantisation when checking for floating point equality.

The diagram below shows a moving red box being checked for collision with a green box. On the left you can see the full extent of the relative velocity vector - and FYI if you wanted to take it further you could have a rotating square, the maths just "works". On the right is what vector based collision detection can achieve, the point in time of impact.

Now the question you might want to ask now is, "how do you find the point of collision"? I'm on my way out now, but when I get back I will find a link to one of my previous posts on this forum or another about using vector maths to solve collisions for geometric points, and I'll upload some of my old collision examples to github Smiley

Now you can see what vector collision detection looks like (at least what it takes in and what it puts out) you might notice something specific about the image on the left that might not have stuck out before. Suppose the boxes passed through each other, if you only checked for collision on specific time slices you are going to miss many collisions when velocities exceed the span of the boxes.

Edit: maybe tomorrow actually, so far I've collected links of previous topics, but it's quite a mouthful right now ...
3  Game Development / Newbie & Debugging Questions / Re: How do you paint a content pane? on: 2012-08-26 08:20:18
You need to render to an off screen image, then draw that to the Graphics object passed to you in paint.
4  Game Development / Newbie & Debugging Questions / Re: Fake 3d with only Java 2d on: 2012-08-25 20:56:14
I'd be easy just to do it in software.  Each scanline is constant du & dv.

That's exactly what my code above is. It's a scanline renderer that imitates the GBA/SNES's gfx hardware registers so that you can use mode7 code/calculations. The graphics API provides a HBL and VBL callback so that you can do all the types of tricks used for mode7 Smiley Plus it comes with example code that demonstrates mode7 x-axis rotations.

Check it out. And if you want more info in the maths, check out this awesome Mode 7 tutorial.
5  Games Center / Showcase / Re: Blasted Crates on: 2012-08-25 15:55:18
What I like about this game is how much I wanted to `solve` it, get the timing right, no matter how long it took Smiley

I must admit that the input lag did increase the excitement level a bit when it did work. The frustration provided a thrilling experience that got me more engrossed than when movement is consistent - a bit like the glitch in Street Fighter II that made the combos possible.
6  Game Development / Game Play & Game Design / Re: Simplex noise, experiments towards procedural generation on: 2012-08-25 15:29:30
This is awesome ... it's almost like programming a synth patch Cheesy
7  Game Development / Newbie & Debugging Questions / Re: Fake 3d with only Java 2d on: 2012-08-25 11:33:13
Oh cool ... I also created exactly this many years ago (like 2006).

I pretty much gave it Nintendo GBA registers and a scanline "interrupt" so that you could quite easily put Mode 7 code into it with the same arithmetic as the GBA hardware, it's tile mode too so if you'd like the code give me a shout and I'll github it. here it is:

Edit: Hmm, give me a minute, I'm just creating the repositories, etc. It comes with a demonstration of Tetris, which rotates the background mode 7 style.

p.s. it's all software rendered.
8  Game Development / Newbie & Debugging Questions / Re: Creating a run-time environment for a command-line game on: 2012-08-24 19:02:28
I just started out with Java and decided to create a fun playable command-line game as i presume it to be a good starting point for game-programming in Java. So how can i create a pop-up frame which should behave just like a compiler for the game to run inside ?

Funny you should ask that ... because not too long ago today I was taking a peek at some really old code of mine from uni where I did just that - talk about coincidences!!!

Take a look at TextConsole.Java, Command.Java and ...

// Example use of the classes
   static CmdHandler cmdClear = new CmdHandler ( "clear", true ) {

        public void action(Command command, TextConsole console) {
            console.writeln ( "players have been cleared");

// ... ...
   static CmdHandler [] menuCmd = {cmdNew, cmdViewPlayers, cmdStart, cmdQuickstart, cmdAddPlayer, cmdHelp, cmdClear};
   static CmdHandler [][] menuSet =  {menuCmd};

This made it really really easy for us to add new commands to our game. You will have to excuse some of the poor coding practices exhibited, this was a second year uni project Wink
9  Discussions / General Discussions / Re: Developpers & Art. on: 2012-08-24 08:19:56

10  Game Development / Newbie & Debugging Questions / Re: Java applet equivalent to flash's LocalStorageObject? on: 2012-08-23 20:23:59

You can use cookies, or if you want you could even interface with the JavaScript and have the JS store with a LocalStorageObject.
11  Discussions / Miscellaneous Topics / Re: Eclipse Juno on: 2012-08-20 22:25:35
Content assist is instantaneous and awesome for me. I have it tailored to my exact needs and I love it.

@princec, what's exactly crappy about Juno?

Content assist ?!? Am I the only one whose not noticing any difference between Juno and Indigo :| I dunno, maybe I'm just so distracted by the text and code and stuff, I barely notice all those details Wink
12  Game Development / Game Mechanics / Re: A game is just a real-time database with a pretty graphical front end on: 2012-08-20 22:22:22
Good question, but then let me ask this ... is life just a real-time database with a pretty distorted and sometimes blurry graphical front end  Cool ...

... the plot thickens :p
13  Discussions / Java Gaming Wiki / Re: Noise (bandpassed white) on: 2012-08-20 22:20:55
Hmm, when generating textures like clouds and terrain it helps to know a little about the effects of noise colouring, distortion and how it can be fun to mess around with to produce different results.

And thinking back to clouds, isn't the very reason you see clouds down to the low frequency bias, with the overtones creating the fuzziness.

I think it would help to show the differences visually though, or even better yet, produce an app to demonstrate it. I learned a lot just by tweaking my 2d noise generator. This could be the difference between generating really mundane levels or elaborate worlds that feel like they've been really well designed  IMO.

I agree with what philfrel said about having components at various periods, and experimentation is key. When I was at uni I remember toying around rending series upon series of sine waves, some directional, some radial, until (*I swear*) it looked like plasma. Of course that wasn't the memorable part, the memorable part was when I made a few small modifications and ... err ... it stopped looking awesome and had to investigate and figure out what on Earth was going on Cheesy Still don't know how I did it Sad

In terms of good, I think it's key to remember that these random values can be feeding into game behaviour. This could be what gives flavour to your map generation algorithm. The more applicable and relative to games the examples are the more that people will digest and be able to use it.
14  Discussions / Java Gaming Wiki / Re: Noise (bandpassed white) on: 2012-08-19 15:46:27
I've seen some sensational shaders making use of perlin noise to make some really convincing wood textures, and for scene generation it helps to have a little taste for different ways of producing controlled modulation.

Though it would help if we could arrange the structure a little to be more helpful in some way because this is a very useful topic to be covered.
15  Discussions / General Discussions / Re: What's your dev rig? on: 2012-08-04 12:31:01
iMac, March 2009 (education edition)
2Ghz Core 2 Duo
NVidia GeForce 9400 256MB
OSX Lion and Windows XP via BOOTCAMP

I've been using Ubuntu 12.04 for several months as a primary OS, gotta love the terminals, though ATM I'm mostly in OSX.
16  Discussions / Miscellaneous Topics / Re: Hello on: 2012-08-04 11:40:20
Didn't see a board for introductions (or a rules post saying no introductions allowed), so I'm just going to tell you a little bit about myself. I am driven here as I recently started developing a game idea that I had, its only on the drawing board and I've only written a little code, however I plan to take it all the way. I love this forum also, I am a big fan of SMF, and was pleased to see when I clicked this link and saw it wasn't vBulliten, or some other software, so anyways, whats up?

Also, thanks for making me feel retarded on the verification page -_-.

Greetings Smiley Hope you enjoy your time here, this is such a nice and helpful place. So have fun!
17  Discussions / Miscellaneous Topics / Re: Hello on: 2012-08-04 11:37:45
Excellent! That means it filters out unlucky people and quitters, too.

Cas Smiley
lol, hilarious
18  Discussions / Miscellaneous Topics / Re: Who would you consider a programmer? on: 2012-08-03 05:27:10
Hmm, I think we computer programmers, computer scientists, software engineers and co. have a lot in common with theoretical lexicographers in that we pretty much exercise that skill when we have to invent names for routines, design patterns, classes, frameworks and the like.

How does a dictionary and lexicography translate to the world of programming? Well they contain words that detail actions, relations of heuristic measurement, logical classification of realities and provides a framework for making sense of the world. Imagine if you removed all words that could make it possible to communicate your innocence in a court of law? Well, if you observe William Shakespeare, when he didn't have an existing word to use he would invent one (or borrow one from another language). If you alter the language of a person you in a sense alter the way he sees within and thinks of the world ...

... So lexicographers are like covert programmers for the human psyche, and programmers are lexicographers and poets to the compiler Cheesy
19  Discussions / Miscellaneous Topics / Re: Who would you consider a programmer? on: 2012-08-02 09:12:20
You can't do anything in html

You can make webpages.  Cranky

You know, the actual purpose of the language? Complaining about HTML not being (usually) able to do things beyond its purpose is like complaining a hammer is no good at sawing off wood...

... you HTML-phobe!  Tongue

Real programmers can saw wood .... with HTML ... true stories :p
20  Discussions / Miscellaneous Topics / Re: Who would you consider a programmer? on: 2012-08-02 08:56:29
It's all about the complexity of the algorithmic/structural/processing problems you are able to solve. In programming we are often solving logical problems symbolically, but a sound engineer is solving a complex processing problem visually. But that's not stopping a graphic designer from building a calculator in minecraft.

p.s. I got Geek -50 because I drink tea, listen to classical music when I work (sometimes it's Samba, Gospel or Electronica) and  persecutioncomplex some personal stuff ... yeah Wink
21  Discussions / Miscellaneous Topics / Re: Eclipse Juno on: 2012-07-31 20:13:28
Juno runs perfectly fine for me on XP (same specs). Tab switching is near instant on XP compared to the quarter second delay on OSX Lion. it's possible it's to do with Eclipse rapidly triggering automountd, which might be caused by an eclipse.ini setting, but at least it's a little progress.

IIRC I had no issues with Juno on Linux either, and it might just be down to some of the plugins I installed for PlayN.

We'll see.
22  Discussions / Miscellaneous Topics / Re: Need some help to find a word on: 2012-07-31 19:20:08

I meant as in English English (or English2  Wink ) - I know you live in the US.  It's just a bad idea to assume usage is the same on both sides of the pond.  [OT] - did read something the other day that suggested US pronunciation is closer to old English than ours is now.

Enjoy Wink
23  Discussions / Miscellaneous Topics / Re: Eclipse Juno on: 2012-07-31 19:16:26
This is ridiculous, it takes around 230ms for Juno on OSX Lion to switch tabs on a 2Ghz Core 2 Duo with 4GB or ram!

Is Eclipse just slow on OSX? I was getting around 300ms before changing to the classic theme.

I'm going to log into Windows and compare because that is just unacceptable in this day and age Angry
24  Discussions / General Discussions / Re: Garbage collector tuning on: 2012-07-31 18:28:08
- we now have fancy algorithms that JIT compilers use to pretty much rewrite your code, sometimes eliminating your `new` call completely (exhibiting pool like behaviour, depending on how you look at it)

Aside from stack allocation, which is a different thing entirely, I've only ever seen this behavior with String constants and small values of Integer or other boxed types.  I really don't believe this behavior is even possible with most objects: Java isn't referentially transparent, and even if there were a Sufficiently Smart Compilerâ„¢ that could infer it by way of noticing an aliased object is never mutated, such a compiler couldn't support separate compilation, which is a cornerstone of Java.

I was alluding to Escape Analysis there. Google's V8 is an excellent example of what can be achieved with this technology. In fact they've taken it a step further and even get a fair amount of code compiled directly into integer operations (despite Javascript's weak typing).

Main point though, is just to draw attention to what's going on and highlighting the dangers of dogmatically ignoring pooling and to create a benchmark much more accurate to the case.
25  Discussions / General Discussions / Re: Garbage collector tuning on: 2012-07-31 15:59:21
Escape analysis might have eliminated the need for GC of your actual object (though not the strings) in the sans-pool approach (messing up the results completely). To really compare them you would want to create a benchmark that better reflects the object link structures you will have in a game situation.

The basic essence of how GC works is by testing reachability from root nodes. Root nodes in this case are object references declared in currently executing functions and static class variables. The state of all of the object pointers needs to be frozen when this process is carried out, hence the use of stop the world GC's. Now that is costly, because increasing the size and complexity of object structures increases the cost of carrying out a GC mark and sweep.

Now pooling wouldn't affect GC that much in that case, but it would eliminate the memory management cost. Of course as you've seen implementations and technologies are a lot different:
 - there are incremental garbage collectors that don't need to stop the world and can operate in a separate thread, increasing the time it spends GC'ing based the behaviour of the program
 - there are generational garbage collectors that in a sense partition the structure, traversing some partitions more often than others - reducing the cost of GC'ing significantly since it traverses much less nodes and the nodes-traversed/nodes-deleted ratio is much lower (and therefore more efficient)
 - we now have fancy algorithms that JIT compilers use to pretty much rewrite your code, sometimes eliminating your `new` call completely (exhibiting pool like behaviour, depending on how you look at it)

Either way we've not yet reached a point where we don't need to manage memory or objects just yet, especially for real time applications where predictability* is crucial. So it's not to plain cut and dry as to whether pooling will or will not give you a boost. As your structures become more complex you will be able to see things in your system that G1 will not be privy to. And most important of all, trust the real world results more than theory.

In fact I once had a funny story of using floats on an embedded system. According to all available documentation on a certain 100% integer based processor a co-worker of mine insisted on using floating points rather than integers. He was not aware of or bothered with the technical workings of the device so ignored my warnings, so to show him the penalty and risks associated with using floats I made some benchmarks performing various arithmetic on random numbers. To my surprise the benchmarks showed the floating point operations to be faster than the integer operations in most (if not all) cases. I was baffled. I shared this information with other developers and they could not understand it, as it should just be impossible. There was no fault with the code and others could repeat the behaviour. Well, the moral here is that sometimes all theories and knowledge are trumped, so don't be too presumptuous. I might add (for reference), that we were using a fast floating point library with associated cache risks.

So because of the documentation, I'd hazard a guess that none of the developers on that system ever used floating points in their physics code, or even tested it. Dogma is a dangerous thing, so I'd say it would be good to listen to the real world results, or better yet, keep working on improving on your benchmark and perhaps you will be able to share with us some interesting referencial results.

*: I understand G1 has high predictability for suspending it's GC thread, still doesn't change the fact that there are associated GC costs and allocation costs that can be reduced
26  Discussions / Miscellaneous Topics / Re: Allow me to reintroduce myself ... on: 2012-07-31 12:51:14
Oh yeah, the shared code section Cheesy Nearly forgot about that.

@gimbal: well I've not made a post in a few years so perhaps I've got the most to gain here Wink And judging by your thirst for experimentation I'm sure you'll be sharing lots of interesting work. Just remember us when you're famous Wink
27  Discussions / General Discussions / Re: Question about using an engine on: 2012-07-31 09:24:30
Use whatever tools give you the greatest edge. I once heard about a programmer who wanted to use nothing but a text editor to code. Unfortunately he had the lowest productivity of the team and had to be fired.

And most importantly, stand on the shoulders of giants. By using Java you're already riding on top of Sun Microsystem's Garbage Collection, Memory Management system and Virtual Runtime Environment, not to mention the Operating System that those technologies are running on top of. So no, feel no guilt or shame, all that matters at the end of the day is the quality of your product (and of course how gratifying the experience is).
28  Discussions / Miscellaneous Topics / Allow me to reintroduce myself ... on: 2012-07-31 07:52:25
Hi everyone, just wanted to say hi to everyone on the board as I will be returning to Java development (for web based games).

A little bit about myself. I spent a couple of years coding in c++ under SEGA Europe, but have a great appreciation for Java.

I care a lot about deployment for some reason, I guess there's a part of me that can't help but think about the user experience. And I firmly believe that indies have the power to create colossal games that will surpass anything that could come from a AAA studio, and that through our autonomy that we can make a living from creating the games we are passionate about.

You can take a peek at my new blog to find out a little more about me.
29  Discussions / Business and Project Management Discussions / Re: Recommended Server Hosting? (Dedicated or VPS) on: 2012-07-31 07:38:03
If you're just starting out to play around with servers and don't have the budget to pay 20€/month then I'd suggest you try it's just 3$/month and you get your own VPS (virtual computer).

Wow! Bookmarked.
30  Games Center / Showcase / Re: Box-o-phobia! on: 2012-07-30 18:01:10
This game is amazing!!!

One feature suggestion is to resolve the behaviour of dragging a mouse over a box so quickly that the mouseMove call does not catch the mouse over the box (causing it to pretty much pass through). This can be done with a line segment collision detection by subtracting the velocity vector of the box from the velocity vector of the mouse move to form a line-segment for that mouse that you can check against the four edges of the boxes.
Pages: [1] 2 3 ... 19
xxMrPHDxx (79 views)
2017-12-31 17:17:51

xxMrPHDxx (40 views)
2017-12-31 17:15:51

xxMrPHDxx (46 views)
2017-12-28 18:11:33

Ecumene (215 views)
2017-09-30 02:57:34

theagentd (313 views)
2017-09-26 18:23:31

cybrmynd (370 views)
2017-08-02 12:28:51

cybrmynd (401 views)
2017-08-02 12:19:43

cybrmynd (371 views)
2017-08-02 12:18:09

Sralse (336 views)
2017-07-25 17:13:48

Archive (1090 views)
2017-04-27 17:45:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
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!