Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (581)
Games in Android Showcase (162)
games submitted by our members
Games in WIP (632)
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 ... 44
1  Games Center / WIP games, tools & toy projects / Re: Flying Cavemen - Inifinite Scroller [LibGDX][Web] on: 2015-05-16 05:16:21
It starts running normally (it seems) and then after the first try or something it seems like it slows down the same like the web version. Maybe you have leaking memory?
2  Games Center / WIP games, tools & toy projects / Re: Flying Cavemen - Inifinite Scroller [LibGDX][Web] on: 2015-05-15 20:19:19
Chrome. My hardware isn't that ancient either. Its not great, but I can play some current gen comes pretty well on low settings. (CSGO, KSP and some others)
3  Games Center / WIP games, tools & toy projects / Re: Flying Cavemen - Inifinite Scroller [LibGDX][Web] on: 2015-05-15 20:11:09
The performance is horrible. I had like 2 fps.
4  Game Development / Newbie & Debugging Questions / Re: Trying to make an object that has a sort of parent object. on: 2015-05-03 14:58:15
Hm, they really should add sroll bar to long lists of code.

Or you should use a pastebin for extraordinary long code dumps.

Quote
Got extraordinary long code dumps? Use http://www.java-gaming.org/index.php?action=pastebin&hex= to keep your thread readable. (link opens in new tab)

5  Java Game APIs & Engines / Engines, Libraries and Tools / [Libgdx] adding a source folder to build path on: 2015-05-03 10:01:46
I was trying to find how to add an additional source folder to gradle build path on google, but I seem to have failed.

Does anybody know how to add source folder to gradle build path?
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Library for rendering text. on: 2015-05-03 09:58:26
(this is kind of self-advertising)

I have made this library that will render text using FreeType in native code. The problem is that it only is available on WINDOWS, ANDROID and the .dll files take up a lot of space (9mb for windows alone).

https://www.mediafire.com/?r8uki5mk83uag1i

If you want the source code, or if you want to try to contribute:
https://github.com/gamingchris3/jfreetype

Here is some 'example' code.

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  
      JFreeType jfreetype = JFreeType.createInstance();
     
      jfreetype.initialize(true); // the parameter is whether JFreeType should attempt to load native files itself
      // if you pass in false, you need to load native files yourself.
     
      JFreeTypeOptions options = new JFreeTypeOptions();
      options.font = "C:/path/to/font.ttf"; // full path to font file on the file system
      options.text = "A generic string of text"; // the string of text you want to render
      options.size = 20; // the size of the font
      options.width = 10000; // the width at which the size of the font will be reduced if the string is bigger than this number
      options.height = 10000; // the height at which the size of the font will be reduced if the string is bigger than this number
      options.lineSpacing = 0; // when wrapping text, spacing between lines (in pixels)
     
      Bitmap bitmap = jfreetype.render(options);
      int format = bitmap.format; // this can be ignored, right now the only format is alpha (1 byte alpha)
      int width = bitmap.width; // the width of the texture
      int height = bitmap.height; // the height of the texture
      ByteBuffer pixels = bitmap.pixels; // a byte buffer of pixels (the format is 1 byte alpha)
     
      TextMetrics metrics = bitmap.textMetrics; // contains some metrics generated from rendering the string
      int descender = metrics.descender; // the maximum descender of the string
     
     
      jfreetype.setInstantLoggingEnabled(false); // if instant logging is enabled, will print errors / info instantly to default output stream
     
      // If instant logging is disabling, will 'buffer' the messages (up to 128)
      String error = null;
      while ((error = jfreetype.getLog()) != null) {
         System.out.println(error); // prints out error messages?
      }
     
      jfreetype.destroy(); // cleanup?


On the final note, if you decide to try this lib, and something doesn't work, you might want to just drop it entirely, as this is not really a production level library yet.
7  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-01 18:31:28
I would say to me a language is when you can write a 'compiler' for that 'language' using that 'language'.
8  Games Center / WIP games, tools & toy projects / Re: Tower Defense prototype on: 2015-04-30 08:41:19
@jonjava

I guess I compiled one of the jars with the latest JDK, while the game jar itself was compiled with an older version. Which version of JRE/JDK are you using right now? (The jar that causes the error was compiled with 1.8 or something)

EDIT---
Anyway, I will recompile the jar once I get home today and update the link so that people without latest java version can run it! Smiley
9  Java Game APIs & Engines / Java 2D / Re: Would appreciate if someone would critique my first game. on: 2015-04-29 18:54:07
The death sound really surprised me. Compared to the menu click sound, it was way loader.

It shouldn't ask you to enter your name after each time you die and want to play again. The 'default' way to make highscores is to allow the player to 'submit' their highscore after they finish playing and ask their name right then.

The paddle has some weird bug when it touches the ball with it's side, though I didn't think it was that bad. Its kind of nice that the ball comes back up when you hit it with its side Smiley

I would say its a nice little game you made Smiley I enjoyed playing it for couple of minutes.

10  Games Center / WIP games, tools & toy projects / Tower Defense prototype on: 2015-04-29 17:24:55
I started making this isometric tower defense prototype. This is not supposed to be a full game, but rather a play ground to try to find different code structures than to what I'm used to and get a better understanding of isometric game programming.

I also wanted to test text rendering library that I made on more machines. If the application doesn't work, please paste the stack below Smiley

So far all I have made is a 20x20 tile level. You can increase / decrease elevation by pressing X and C on the keyboard, which will change the elevation of the currently hovered tile. You can also place buildings by dragging a mouse while holding down left button and selecting some tiles. If you want to delete the building, right click on the building and it will be removed. Right now there the following patterns for buildings: 1x1, 2x2, 3x1, 1x3.
You can move using ASDW.

The prototype is very NOT optimized performance wise, so there might be performance drop on machines that don't have a proper graphics card (I had huge FPS drop on laptop with integrated-in GPU).

On the final note, this is only supposed to work on WINDOWS for now.

Here is the link. Just extract the folder to wherever you want and run the td.jar file inside!
http://www.mediafire.com/download/29ih1s6wln0al80/export.zip

--edit
whoops i just realized i put to .rar so now i changed link to .zip

11  Game Development / Newbie & Debugging Questions / Re: [LibGdx] Best way to handle textures for hundreds of objects? on: 2015-04-28 14:10:12
Have something like an asset manager that has stored all textures in a hashmap or a list and you can do AssetManager.getTexture("somettexture.png"); which would return a texture.
12  Game Development / Newbie & Debugging Questions / Re: Getting started with game programming on: 2015-04-28 13:38:31
You could start trying Libgdx first, since it is much higher level framework and it is easier to see the first results of your code, and once you are comfortable with it, you could try using LWJGL, even though Libdgx might still be a better options than LWJGL in most cases.
13  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LibGDX drawing of sprites? on: 2015-04-27 05:25:14
When SpriteBatch reaches it's limit, it will automatically flush and begin a new batch. You shouldn't worry about this though, as the batch will need to be flushed on many other occasions, such as changing shaders, changing uniform variables in the shaders and many more.

EDIT---
If your game doesn't have more than 100 draw calls per frame, I don't think you have to worry about anything yet. You could probably have up to 500 or 1000 draw calls and game would still run at  60 fps on not very good machines.
14  Game Development / Game Play & Game Design / Re: Inventory and sorting on: 2015-04-27 05:21:50
Why not use both? Smiley

I think in Minecraft you can click to transfer items automatically and drag them manually.
15  Game Development / Newbie & Debugging Questions / Re: Java2D fillRect() memory leak on: 2015-04-23 05:22:06
Do you get out of memory error eventually?
16  Game Development / Game Mechanics / Re: Using delta time messes up movement on: 2015-04-20 05:31:05
It should like something like this:
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  
if(x != newX){
    if(x > newX - 1 && x < newX + 1){
        sprite.setX(newX);
    }else{
        if(x < newX){
            sprite.setX(x + speed * delta);
        }else if(x > newX){
            sprite.setX(x - speed * delta);
        }
       
        moving = true;
    }
}

if(y != newY){
    if(y > newY - 1 && y < newY + 1){
        sprite.setY(newY);
    }else{
        if(y < newY){
            sprite.setY(y + speed * delta);
        }else if(y > newY){
            sprite.setY(y - speed * delta);
        }
       
        moving = true;
    }
}
17  Game Development / Networking & Multiplayer / Re: Kryonet - client/server works on localhost, but not on different computers on: 2015-04-19 18:10:32
I just remembered something. If I'm correct, for some modems (including mine), you cannot connect using public IP. Only computers outside the network are able to connect using public IP.
18  Game Development / Networking & Multiplayer / Re: Kryonet - client/server works on localhost, but not on different computers on: 2015-04-19 17:14:38
I'm not sure this is related, but maybe you need to forward the ports on the network you are running the server?
19  Game Development / Game Mechanics / Re: Using delta time messes up movement on: 2015-04-19 16:56:13
You need to get delta time between frames. You can do that manually, or try to find some kind of function that is already made in the framework / engine you are using. If you are using Libgdx that would be:
1  
2  
float deltaTime = Gdx.graphics.getDeltaTime(); // interpolated delta time, seconds
float deltaTime = Gdx.graphics.getRawDeltaTime(); // raw delta time, seconds


Next, you need to make a speed variable. It would mean the distance the moving object covers in 1 second. For example:
1  
float speed = 100.0f; // object will move 100 pixels per second


When updating the position of the object, you simply multiply speed by delta time and add it to the position of the object.
1  
object.position += speed * deltaTime;


This way the object will move the same amount of distance regardless of the frame rate.
20  Game Development / Game Mechanics / Smooth camera motion when following player on: 2015-04-19 16:50:44
I have been having this issue for a second day in a row. I'm using JBox2d for my game physics. In the game the camera is supposed to be on player. The problem is that box2d needs constant deltatime to update properly, and I'm not expecting very constant frame rate since the game is supposed to be played on mobile devices. To combat the issue of objects flickering while moving and jumping at non constant frame rate I implemented this:
http://www.unagames.com/blog/daniele/2010/06/fixed-time-step-implementation-box2d

I made a small test game and the results seemed to improve when running at different frame rates while targeting 60 ups. The method in the link above seems to work nicely on standalone objects, but when the camera is following the object, you start to notice the stutters on the object which are not visible when only object is moving.

Any ideas how to make smooth camera motion to follow the player?
21  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LibGDX DesktopLauncher set resolution to DesktopDisplayMode on: 2015-04-13 05:02:31
Did you check what values LwjglApplicationConfiguration.getDesktopDisplayMode() returns?
22  Discussions / General Discussions / Re: Hiring a Java developer on: 2015-04-13 05:00:59
It depends on how much money you are willing to spend. Hiring programmers online like that can be very expensive from what I have seen.

What kind of project is that? Is it supposed to be a commercial project for some kind of legit company?
23  Game Development / Newbie & Debugging Questions / Re: Libgdx 3D voxel on: 2015-04-12 06:34:07
That is not a simple map editor.
24  Game Development / Newbie & Debugging Questions / Re: how to fit a body to a sprite avoiding transparent space? on: 2015-04-11 05:40:43
How are you loading your .png file right now?
25  Game Development / Newbie & Debugging Questions / Re: how to fit a body to a sprite avoiding transparent space? on: 2015-04-10 19:36:35
What do you mean by loading .png files into memory?

You mean OpenGL or Java2D or something else?
26  Game Development / Networking & Multiplayer / Re: KryoNet Performance on: 2015-03-29 17:56:03
You can have as many as the machine that the server is running on can handle.
27  Java Game APIs & Engines / Engines, Libraries and Tools / Re: How to know if I added normals to vbo(vertex buffered object) ? on: 2015-03-29 11:44:29
The question is really obscure and hard to understand. Please provide more detail.
28  Discussions / Miscellaneous Topics / Re: Python Load Balancing. on: 2015-03-27 14:44:15
Python tries to catch its own tail.
29  Game Development / Game Play & Game Design / Re: Best Approach at HUD and Fonts on: 2015-03-23 06:42:47
Render text to a texture and display that texture like you would any other sprite.
30  Game Development / Newbie & Debugging Questions / Re: Basic enemy movement where A* isn't really needed? on: 2015-03-21 19:46:45
Please don't use state machines for AI.

http://gameprogrammingpatterns.com/contents.html

Read this book about programming patterns.
Pages: [1] 2 3 ... 44
 
MrMapcom (16 views)
2015-05-23 20:26:16

MrMapcom (22 views)
2015-05-23 20:23:34

Waterwolf (29 views)
2015-05-20 15:01:45

chrislo27 (36 views)
2015-05-20 03:42:21

BurntPizza (72 views)
2015-05-10 15:53:18

FrozenShade (56 views)
2015-05-07 09:11:21

TheLopais (219 views)
2015-05-06 13:36:48

TheLopais (202 views)
2015-05-06 13:35:14

TheLopais (207 views)
2015-05-06 13:33:39

TheLopais (228 views)
2015-05-06 13:32:48
List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00
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!