Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (748)
Games in Android Showcase (226)
games submitted by our members
Games in WIP (834)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 7 8 [9] 10
 81 
 on: 2018-02-10 19:12:29 
Started by mooneko - Last post by KevinWorkman
You'll have better luck if you post a MCVE that demonstrates the problem.

One thing that sticks out to me is that it looks like you're updating your game state on a different thread than the one that's drawing your game.

Quote
What alternatives can you recommend if I want a game loop that can ensure a relatively smooth gameplay without dealing with anything that is way too advanced?

Use a library. I really like Processing.

 82 
 on: 2018-02-10 17:13:34 
Started by BurntPizza - Last post by VaTTeRGeR
Rerendered the M4A1 sprites with "Filmic Blender" color management, it looks way better, the contrast / lighting is 100x better, like night and day!



Watch this video for an rough explanation: https://www.youtube.com/watch?v=m9AT7H4GGrA


And try it out:
https://sobotka.github.io/filmic-blender/

I don't know when/if they add this as the default option, but i hope soon!

 83 
 on: 2018-02-10 13:55:11 
Started by unenergizer - Last post by VaTTeRGeR
Sounds to me like it's working Cheesy

Have you tested it with artificially worsened conditions like increased packet loss, jitter and latency?

I don't know what else to recommend.

 84 
 on: 2018-02-10 13:30:27 
Started by unenergizer - Last post by unenergizer
I completely agree that the game logic should be handled server side. My reason for asking about a time sync is mainly for the purpose of keeping the client from sending extra packets. The server man receive them but won't process them unless X amount of time has passed. The server already rejects of extras are sent.

Here is the logic that I have come up with based on the articles you mentioned. 

1. Client wants to move.
2. Beginning walking animation to next time.
3. Sending packet move request.
4. Rejects any move request packets between tiles.
5. And fractional before the player reaches the destination time accept a move request packet so player can continue moving and the animation keeps going looking like continuous walking.
6. When the move request is received by the server check Collins and if collided, snap player back to previous time.

If you can improve on that please let me know. We have multiplayer moment but as you go from one time to another their is a small stutter because the client previously had to wait for the server to reply with accepted or rejected move information. So based on the article, we will continue to let them move and while they are bet6tiles we will wait for the reply. If something isn't right, we snap them back. To better this we are doing collision checks on both the client and the server. Previously we only checked on the server.

Thanks. And this was typed in my phone so sorry if their are any mistakes.

 85 
 on: 2018-02-09 23:16:28 
Started by BurntPizza - Last post by orange451
Wasn't happy with the UI solutions in lwjgl3, so using nanovg I started the process of creating one.
Click to Play

 86 
 on: 2018-02-09 19:29:59 
Started by Kyperbelt - Last post by Kyperbelt
Just to clarify: This is a lib for creating interactive dialogues(conversations);

Yo!

Recently while working on a project I was searching for a way to create dialogues using a third party tool and then import them into my game. I came across a  really cool language/tool called Yarn. This is the same tool used for games like Night in the Woods and Knights and Bikes.

It checked out everything I was looking for, and then some:
  • Easy Syntax
  • Branching Node based Dialogue
  • Conditional Statements(e.g <<if visited() >> do this line<<else>>do this<<endif>>)
  • Variable Continuity
  • Very Extensible


I created a port of an existing Yarn library for use with libgdx projects.

Here is a link to the YarnGDX github


Here is a link to Short Demo.

Its still not perfect , but currently gets the job done. I am trying to add documentation whenever i get the change but there is basic stuff in the getting started and also a simple example Test Class.

Hope someone finds it useful Smiley

 87 
 on: 2018-02-09 19:15:23 
Started by mooneko - Last post by mooneko
Hey. I am currently developing a 2D Java game using Swing components.
The game randomly stutters. Sometimes it runs completely smooth for the first minute and then it randomly jitters like mad, sometimes it starts of as a jittery mess.
Iv'e tried to omit certain parts of my code, thinking that they cause the lag, and now I am 100% sure that the problem lies within the way my game loop is written. Here it is:

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  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
package map;

public class GameLoop implements Runnable
{
   private Thread _gameThread;
   private MapPanel _gamePanel;
   private final double _updateCap = 1.0 / 60.0;
   private int _fps;
   
   public GameLoop(MapPanel panel)
   {
      this._gamePanel = panel;
   }
   
   public void startGame()
   {
      this._gameThread = new Thread(this);
      this._gameThread.start();
   }
   
   @Override
   public void run()
   {
      double firstTime = 0,
            lastTime = System.nanoTime() / 1000000000.0,
            passedTime = 0,
            unprocessedTime = 0,
            frameTime = 0;
      int frames = 0;
     
      while (this._gamePanel.isRunning())
      {
         firstTime = System.nanoTime() / 1000000000.0;
         passedTime = firstTime - lastTime;
         lastTime = firstTime;
         unprocessedTime += passedTime;
         frameTime += passedTime;
         
         while (unprocessedTime >= _updateCap)
         {
            unprocessedTime -= _updateCap;
            this.tick();
           
            if (frameTime >= 1.0)
            {
               frameTime = 0;
               _fps = frames;
               frames = 0;
               System.out.println("FPS: " + _fps);
            }
         }
         
         render();
         frames++;
         
         /**
          * Preventing over-consumption of the CPU -
          */

         try
         {
            Thread.sleep(1);
         }
         catch (InterruptedException e)
         {
            // TODO Auto-generated catch block
            e.printStackTrace();
         }
      }
   }
   
   private void render()
   {
      _gamePanel.repaint();
   }
   
   private void tick()
   {
      _gamePanel.setLogic();
   }
}


When am I doing wrong? What alternatives can you recommend if I want a game loop that can ensure a relatively smooth gameplay without dealing with anything that is way too advanced?
Thanks alot!

 88 
 on: 2018-02-09 19:10:03 
Started by FabulousFellini - Last post by FabulousFellini
And shit it looks like they're out of stock.

 89 
 on: 2018-02-09 17:49:30 
Started by Vierarmig - Last post by zngga
This is awesome work. Sound effects are so important. If I ever get a game complete enough, I will certainly give you a ring.

 90 
 on: 2018-02-09 15:34:26 
Started by FabulousFellini - Last post by FabulousFellini
I got them here:  https://www.amazon.com/Customized-Credit-Flash-Drive-Pendrive/dp/B071LHL31D/ref=sr_1_3?ie=UTF8&qid=1511984136&sr=8-3&keywords=50+personalized+flash+drives   They were surprisingly fast (only took about a week or so despite saying it could take up to a month), and when you have to "choose a side" to print the picture on, they let you choose both (they make it seem like you can only choose one side, but I just chose both with no additional charge).  And yeah I know its kinda weird lol, but I just wanted some sort of physical copy and this seemed cool.

Pages: 1 ... 7 8 [9] 10
 
xxMrPHDxx (296 views)
2017-12-31 17:17:51

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

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

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

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

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

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

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

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

Archive (1309 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
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!