Java-Gaming.org Hi !
 Featured games (84) games approved by the League of Dukes Games in Showcase (570) Games in Android Showcase (154) games submitted by our members Games in WIP (618) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
 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 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 Quote from: Roquen on 2012-08-25 18:45:35I'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 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 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
 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: https://github.com/keldon85-avasopht/strollEdit: 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 CmdHandler.java ...

 1  2  3  4  5  6  7  8  9  10  11  12  13  14 `// Example use of the classes   static CmdHandler cmdClear = new CmdHandler ( "clear", true ) {        public void action(Command command, TextConsole console) {            config.clearPlayers();            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
 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 http://stackoverflow.com/questions/1962823/can-java-applets-not-signed-create-read-cookiesYou 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 Quote from: ra4king on 2012-08-20 22:17:48Content 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
 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  ...... 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 Still don't know how I did it 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 Duo4GB RAMNVidia GeForce 9400 256MBOSX Lion and Windows XP via BOOTCAMPI'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 Quote from: Tyb97 on 2012-08-03 03:37:55Didn'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 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 Quote from: princec on 2012-08-03 18:03:19Excellent! That means it filters out unlucky people and quitters, too.Cas 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
 19 Discussions / Miscellaneous Topics / Re: Who would you consider a programmer? on: 2012-08-02 09:12:20 Quote from: Oskuro on 2012-08-02 09:07:39Quote from: matheus23 on 2012-08-02 08:02:41You can't do anything in htmlYou can make webpages.  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!  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   some personal stuff ... yeah
 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 Quote from: nsigma on 2012-07-30 21:02:43I meant as in English English (or English2  ) - 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
 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
 24 Discussions / General Discussions / Re: Garbage collector tuning on: 2012-07-31 18:28:08 Quote from: sproingie on 2012-07-31 17:26:33Quote from: keldon85 on 2012-07-31 15:59:21 - 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.