Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (724)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (790)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 3 [4] 5 6 ... 10
 31 
 on: 2017-04-24 12:45:15 
Started by Thotep - Last post by CommanderKeith
Nice game! Worked well on windows 10 x64. Though after about 5 minutes of play where I just drove around the monsters incessantly firing I achieved a score of about 27,000 and then the game crashed. Perhaps it ran out of memory? I fired both left and right cannons non-stop so if the bullets, blood, tracks, monsters and bodies aren't disposed of, it may have overloaded the JVM memory limit.

The top-down view and effects are great. I especially like the car track effect, very satisfying  Cool

If you had time to add more weapons and a hot-seat co-op game mode where one person drives and the other shoots, perhaps with the mouse, it would be cool.

 32 
 on: 2017-04-24 12:37:02 
Started by SteveSmith - Last post by princec
It requires someone else to set it up. Next!

Cas Smiley

 33 
 on: 2017-04-24 12:34:46 
Started by SteveSmith - Last post by SteveSmith
Just thought I'd share this and see if anyone else would get the right answer.  It's a question I got at an interview (about 2 years ago now but still annoys me!).  It was part of a verbal section of the interview, so it wasn't multiple choice or a question paper or anything.  It went something like this:

"What does a Continuous Integration System (e.g. Jenkins) where the system automatically builds your software, require to do it's job?"

What would you reply, bearing in mind it was an interview, so you want to look and sound intelligent! Smiley

(EDIT: I had to put the deliberate mispelling of "Question" in the subject since I wasn't allowed to use the word "Question".)

 34 
 on: 2017-04-24 10:18:34 
Started by Ecumene - Last post by SilverTiger
While learning Vulkan I checked every result with assertions. This line of code compiled successfully:

1  
2  
3  
4  
5  
6  
7  
/* Create the vertex shader module */
VkResult result = vkCreateShaderModule(device, &vertexCreateInfo, nullptr, &shaderModules[0]);
assert(result == VK_SUCCESS);

/* Create the fragment shader module */
result = vkCreateShaderModule(device, &vertexCreateInfo, nullptr, &shaderModules[1]);
assert(result == VK_SUCCESS);

When trying to create the graphics pipeline, the validation layers stated, that there's no entry point named "main" in the fragment shader.
Double checked it and compiled the fragment shader to SPIR-V again. Same error message... took me some time to realize the mistake occured when creating the shader modules.

 35 
 on: 2017-04-24 09:56:04 
Started by Ecumene - Last post by princec
That's why I set syntax colouring up so that static vars and methods appear in a completely different colour Smiley

Cas Smiley

 36 
 on: 2017-04-24 09:24:02 
Started by Ecumene - Last post by SHC
Am making a tower defense game, and I decided to make the turrets fire to the nearest point in the path of enemies. Then I also wanted to do optimized code, that is, the nearest point will only be computed on the creation of the turret and not with every projectile created.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
if (nearestPathPoint == null)
{
    nearestPathPoint = path.get(0);

    for (Vector2 pt : path)
        if (pt.distanceSquared(this.position) < nearestPathPoint.distanceSquared(this.position))
            nearestPathPoint = pt;
}

// Now fire projectile towards nearestPathPoint after timer

But when creating the turrets, all turrets are firing towards same point. Then after an hour I realized, that I accidentally declared nearestPathPoint as static when it shouldn't be. Precious amount of time in LudumDare JAM.

 37 
 on: 2017-04-24 07:15:09 
Started by Half_NO_oB - Last post by Half_NO_oB
Hi guys

I'm still developing a platformer, but I don't get to draw a polygon on my screen. Im using a Group-Node as the root, that is used as a parent for the Scene-Object. Then canvas is then added. I'm not using a Layout/Stack-Pane/Grid-Pane...

I'm having a player object that is containing an Object of class HUD(displaying stats and stuff). I can draw Images without problems, but how can i draw a Rectangle/Polygon onto a canvas?

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  
61  
62  
63  
64  
65  
66  
67  
68  
69  
@Override
   public void start(Stage primaryStage) throws Exception
   {
      primaryStage.setTitle("Platformer");

      Group root = new Group();
     
      Scene scene = new Scene(root, WIDTH, HEIGHT);
     
      Canvas canvas = new Canvas(WIDTH,HEIGHT);
      root.getChildren().add(canvas);

      GraphicsContext gc = canvas.getGraphicsContext2D();
     
      MapManager.getInstance().loadAllMaps("maps");
     
      tileMap = MapManager.getInstance().getCurrentTileMap();
     
      player = new Player(tileMap);
      player.setX(64);
      player.setY(64);
     
      scene.setOnKeyPressed(
            event -> {
               String code = event.getCode().toString();
               
               if(code == "W")
               {
                  player.setJumping(true);
                }
               if(code == "A")
               {
                  player.setLeft(true);
               }
               if(code == "D")
               {
                  player.setRight(true);
               }
            });
     
      scene.setOnKeyReleased(
            event -> {
               String code = event.getCode().toString();
               
               if(code == "A")
               {
                  player.setLeft(false);
               }
               if(code == "D")
               {
                  player.setRight(false);
               }
            });
     
      AnimationTimer at = new AnimationTimer()
      {
         @Override
         public void handle(long now)
         {
            update();
            render(gc);
         }
         
      };
      at.start();      
     
      primaryStage.setScene(scene);
      primaryStage.show();      
   }


Any ideas how to?

Greetz HalfNoob

 38 
 on: 2017-04-23 23:39:00 
Started by Ercules76 - Last post by Ercules76
Ok i try to explain.
I've a player sprite with animations, WALKING, IDLE, JUMPING ecc.
The sprites are only with characters without nothing in his hands, now i create a shooting function and i want that when my char fire an enemy in the hand must have a gun, gun is another sprite outside player's sprite. I want something overlap a kind of child of a player object.

 39 
 on: 2017-04-23 21:07:12 
Started by Ecumene - Last post by CoDi^R
Doing a small side project with Direct State Access (DSA) in "modern" GL 4.5. About an hour of my life I won't get back...  Roll Eyes

 40 
 on: 2017-04-23 20:54:42 
Started by GameNewbie - Last post by KaiHH
I don't know whether libGDX provides you with a way to specify arbitrary affine coordinate system transformations for your sprites.
If so, then your are looking for the following transformations:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
// We start with the world coordinate system as reference
// and we would like to position our rocket at its position
// in the world and rotate it around its own origin:
translate(rocketPosition)
rotate(rocketRotation)
// Now we can draw the rocket
// ...draw it...
// Next, being in the local frame of the rocket, we want
// to position the exhaust flame at the bottom of the rocket.
// Given that the size of the rocket in its own local coordinate
// system is 'rocketHeight', and the origin is at the center
// of the rocket, we do the following now:
translate(0, -rocketHeight/2)
// ...draw exhaust flame...

Generally, you want a kind of "parent/child" relationship for transformations, where the transformation of the exhaust flame is relative to the rocket. This can be done using a scene graph. I don't know whether libGDX provides such as scene graph for 2D.

Pages: 1 2 3 [4] 5 6 ... 10
 
buddyBro (194 views)
2017-04-04 18:38:00

CopyableCougar4 (624 views)
2017-03-24 06:39:42

theagentd (618 views)
2017-03-24 06:32:08

Rule (668 views)
2017-03-19 03:43:22

Rule (642 views)
2017-03-19 03:42:17

Rule (646 views)
2017-03-19 03:36:21

theagentd (658 views)
2017-03-15 20:07:07

theagentd (593 views)
2017-03-15 13:37:06

theagentd (432 views)
2017-03-15 13:32:18

theagentd (361 views)
2017-03-15 13:31:11
List of Learning Resources
by elect
2017-03-13 05:05:44

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

SF/X Libraries
by philfrei
2017-03-01 23:45:19

SF/X Libraries
by philfrei
2017-03-01 23:44:05

SF/X Libraries
by SkyAphid
2017-03-01 21:38:56

SF/X Libraries
by SkyAphid
2017-03-01 21:38:32

SF/X Libraries
by SkyAphid
2017-03-01 21:38:05

SF/X Libraries
by SkyAphid
2017-03-01 21:37:51
java-gaming.org 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‑gaming.org
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!