Show Posts
|
|
Pages: [1] 2
|
|
5
|
Game Development / Newbie & Debugging Questions / Re: Basic Neural Net AI?
|
on: 2013-02-21 00:58:04
|
It seems like you are training on an "outside" concept. If I told you when you were out of a box, how does that help you get back in the box? It is possible to write the x and y cases seperately as your problem space has two bounds. Ignore Y for now and repeat X to handle that later. Deal with the one dimensional case of a point on a line. The one dimensional problem is still pretty difficult as there are two directions to be out of bounds. Lets imagine we had a black box. You pass the black box your X coordinate, and it tells you which direction to aim in: float input (X) > float direction (-1 left to 1 right). Calling it a float just means we have a continuous numberline. So now you can generate lots of test cases for your robot (input > output): 10 > 1 699 > -1 4000 > -1 Train your Neural net brain on those situations, and it should figure out whether to go left or right given the input. Or rather, it should have an idea of what output is expected given a particular input. Make sure your network is multilayer (1,2,1) or (1,4,1) maybe. That is likely to lead to a system which is really boring and homes in on the center of the screen, staying there or wobbling about that central point. To make it more interesting, you could make the neural net output a random chance of pointing towards the center of the screen at any point in time. So maybe we should only check the gps at random, or maybe when we check it, it has a certain chance of being wrong, so 69% of the time it will point in the correct direction. You can do that by treating the sign as the direction and the absolute value as the chance. In ye olden days, I made a virtual robot which had three input sensors for distance lasers and from that decided the outputs of the motors and explored a maze.. Then I trained its behaviour further in different mazes. Think about what behavior (outputs) you want from your stimulus (inputs), or give a network inputs and see what it can do! In moths, there is a sensory response to the air from the beat of a bat's wing that goes to the output of flying off course.. All of this is hardwired and runs outside the brain. Suddenly a very confused moth isnt dinner anymore.. 
|
|
|
|
|
6
|
Game Development / Newbie & Debugging Questions / Re: Tile Map Connected Textures
|
on: 2013-02-21 00:14:00
|
|
People also get round this with lots of layers of tilemaps.. So a bottom layer for terrain, a middle layer for features (terrain dividers), and a top layer for items (trees and the like). The different layers can have different grid sizes if you want, so terrain can blend more easily.
Investigate how to use transparency (or the opposite opacity) in your graphics programs and use image types which handle transparency, like png. If you do it right you can have your trees on any terrain background (rock/desert/grass).
|
|
|
|
|
8
|
Game Development / Newbie & Debugging Questions / Speed in Java applet viewer vs browser
|
on: 2013-02-20 23:48:53
|
|
During development, I've been testing my applet from eclipse, and that's using applet viewer (javaw). It runs smoothly, and is a beauty to behold. In a browser, it runs jerkily and is unresponsive.
Admittedly, I've added a bunch of stupid effects lately and increased the screen size, so I could understand why it was slow.. If it was slow in applet viewer as well as the browser window!
Is there anything I can do to make it run ok in the browser, rather than paring down the code or making it more efficient?
|
|
|
|
|
10
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Starkiller
|
on: 2013-02-03 23:03:47
|
Ok, added some more tricks (everything that goes offscreen in one direction comes back onscreen in another). Warning! Untrusted content: doos submitted an applet to JGO. If the applet asks for permissions, it will have full access to your system. ( read more) - If you allow to launch the applet, it will run in sandbox mode by default.
- Signed applets will popup a security-dialog, which asks for permission to full access to your system.
- The applets are launched from a seperate sub-domain, to protect you from eavesdroppers.
- Only run applets of people you trust, regardless of whether the applet asks for permissions or not.
JGO cannot be held responsible for the contents and/or behavior of the hosted applets. Enjoy!
|
|
|
|
|
11
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Starkiller
|
on: 2013-02-03 22:45:01
|
Is this control system what you're looking for? Warning! Untrusted content: doos submitted an applet to JGO. If the applet asks for permissions, it will have full access to your system. ( read more) - If you allow to launch the applet, it will run in sandbox mode by default.
- Signed applets will popup a security-dialog, which asks for permission to full access to your system.
- The applets are launched from a seperate sub-domain, to protect you from eavesdroppers.
- Only run applets of people you trust, regardless of whether the applet asks for permissions or not.
JGO cannot be held responsible for the contents and/or behavior of the hosted applets. I'm making the camera the center of the game universe and updating all objects with a rotation, rather than keeping the angles and calculating this all the time.. I just need to rotate the object movement vectors too.. At the moment it is very difficult to shoot stuff!
|
|
|
|
|
15
|
Games Center / WIP games, tools & toy projects / Re: [WIP] Starkiller
|
on: 2013-02-03 02:28:28
|
Warning! Untrusted content: doos submitted an applet to JGO. If the applet asks for permissions, it will have full access to your system. ( read more) - If you allow to launch the applet, it will run in sandbox mode by default.
- Signed applets will popup a security-dialog, which asks for permission to full access to your system.
- The applets are launched from a seperate sub-domain, to protect you from eavesdroppers.
- Only run applets of people you trust, regardless of whether the applet asks for permissions or not.
JGO cannot be held responsible for the contents and/or behavior of the hosted applets. Stuff changed: Fixed the projection equation after giving the projection screen 50 width and making the camera 50 units away from it. Fixed the ship source, ship now flies in the correct direction. More stars. Keys: WASD for movement, space for LAZARS!
|
|
|
|
|
16
|
Games Center / WIP games, tools & toy projects / [WIP] Starkiller
|
on: 2013-02-02 01:23:38
|
 Trying to do a 3d spacesim though its not working properly at the moment.. All the transforms are going wrong and the ship isnt flying in a straight line (probably the same reason!).. Its interesting that when you bank the ship it sometimes goes backwards or forwards randomly..
|
|
|
|
|
17
|
Game Development / Newbie & Debugging Questions / Re: collision detection problem
|
on: 2013-01-24 02:00:17
|
Two different peices here: if you set a missile in the array to null you can skip drawing it, and dont try doing hit detection with it either. 1 2 3 4 5 6 7 8 9 10 11 12
| Rectangle[] missles = new Rectangle[3];
for (Rectangle missile:missiles){
if (missile == null){ continue; } else { draw(missile); }
} |
And heres the other bit: Lets say you know your missile has two corners: (20,20) and (30,30). If thats so, its going to be in the first grid in your map array since your rectangles are size 50x50.. So why are you testing every single border object? You can narrow the search down. If you want to.
|
|
|
|
|
19
|
Game Development / Newbie & Debugging Questions / Re: collision detection problem
|
on: 2013-01-23 21:18:44
|
|
Making stuff disappear is easy. Just set the missile position to null in your array and skip nulls on the draw and hit steps. You've got an array of borders, have one for missiles.
I see what you're doing with all the rectangles for the map array, but you could try putting your missile rectangle into that space.. I mean, if you know that your missile is somewhere within in the grids (2,2),(2,3), (3,2), (3,3), then you only need to check the rectangles of 4 grids instead of all of them.
|
|
|
|
|
20
|
Games Center / WIP games, tools & toy projects / Re: Space
|
on: 2013-01-23 20:37:10
|
Which method are you using to fit the texture fit the planet? I'm not seeing any obvious distortions, so I'm interested. JME has this awesome class: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| ProceduralTextureGenerator pt = new ProceduralTextureGenerator( heightMap); pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader() .getResource("jmetest/data/texture/grassb.png")), -128, 0, 128); pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader() .getResource("jmetest/data/texture/dirt.jpg")), 0, 128, 255); pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader() .getResource("jmetest/data/texture/highest.jpg")), 128, 255, 384);
pt.createTexture(256); |
Basically, if you created your landscape image into greyscale (instead of your colour blend), loaded it as a heightmap in jme, then used that, it blends your terrain textures into the appropriate terrain levels.. So instead of using a colour range, it would be more detailed. You could also use the greyscale map as a bumpmap, or use the same method to make a spec map (shiny oceans). As an addition, you could also use your same technique for planets to create a transparent cloud image and draw that sphere outside your current one for atmosphere [EDIT: see you already have, nice one!]. If you post the texture from your planet generation algorithm, I can dump it into the program for you, see what you think?
|
|
|
|
|
21
|
Games Center / WIP games, tools & toy projects / [Final] Here be Dragn
|
on: 2013-01-22 23:37:24
|
I think I've got to the point in this project where I dont want to play anymore, and as I usually put a lot of gameplay hours into testing, development isnt as interesting. Last alterations: - Dragged out the dragon death. This could do with a fade to black, or maybe a greyed out screen. Sad music. Something!
- Made the AI State based. This means that when I switch between states I can play a sound effect or maybe change other things. This would be more relevant if there was a 3d animation on the objects or something other than distance to target.
- I made the warrior AI use the statebased method and tweaked it. I also added a poor signal for the sword attack (its a modified arrow that returns and it vanishes when hit).
https://www.dropbox.com/s/9ddsy8euhqo3u82/dragns6a2.jar
|
|
|
|
|
24
|
Game Development / Newbie & Debugging Questions / Re: How do play a midi file?
|
on: 2013-01-20 18:28:18
|
|
Got a link for creating soundbanks on the fly? Sounds interesting!
I'd like to point out that including an entire midi soundbank might be larger than a single mp3 or ogg and have possible licensing issues, depends how much music you want, really.. There is usually a soundbank bundled with the jre, getDefaultSoundbank worked fine for me in windows for jre7, I had to copy the gm from libs, I think in jre6 to use that one.
|
|
|
|
|
25
|
Game Development / Newbie & Debugging Questions / Re: Multiplayer top down shooter
|
on: 2013-01-20 17:30:03
|
|
Instead of sending position updates constantly, you can predict motion with an equation.
Server updates every player client with current gametime, local objects and equation of motion (object starting position, equation plots where it will be). Can give an updated snapshot of this. Every player client updates server with location, change of course and any actions of player.. Also timestamp of when this happened.
Every player client uses object list and equation of motion to update what is on screen.
Maybe server decides whether someone has been hit or not and creates objects based on timestamp and action? Maybe this is handled on individual clients and confirmed by the server?
You can also cheat by updating generic source of particle effects, rather than each particle.
I'm sure theres probably an api or tutorial for this.. Dont be afraid to read tutorial about how to network a 3d fps, as apart from the extra dimension, the problem is the same.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|