Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (604)
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]
1  Game Development / Newbie & Debugging Questions / Re: How do I use Ashley entity framework alongside Kryonet? on: 2014-08-22 09:12:25
Hi Mike,

Thanks for that reply. So you just have a loop running in it's own thread which processes the queue? Would it be possible to post any code snippet of your loop setup?
2  Game Development / Newbie & Debugging Questions / How do I use Ashley entity framework alongside Kryonet? on: 2014-08-22 06:10:39
Hi,

I've been experimenting with both the Kryonet and Ashley frameworks separately and really like both, and now I'd like to use both in a single project.

My question is how do I hook them up together? Kryonet works with listeners and there is no 'loop', but Ashley needs a loop with a delta passed into it's update method.

I've seen a few posts where people do use a loop on the server, and Kryonet's listener simply add to a queue. This queue then gets processed during every update. Is this a good way to organise things? All of the examples in the Kryonet repository simply handle everything directly in the listener itself at the time of the event.

Thanks!
3  Game Development / Newbie & Debugging Questions / Re: 2D lighting without shaders in libgdx on: 2013-10-02 14:58:52
Box2DLights is probably the easiest way to add lights to a game in LibGDX.

Great, I'll take a look at that. Is it suitable to use even if my game doesn't make use of any box2d physics and such?
4  Game Development / Newbie & Debugging Questions / Re: 2D lighting without shaders in libgdx on: 2013-10-02 12:29:03
In this case, would my lighting mask need to be transparent though? If I draw a similar lightmask image as from that tutorial, it just draws it solid and white, with a black square background, on top of my semi-transparent overlay. I don't need to use batch.setBlendingFunction() to set it up correctly?
5  Game Development / Newbie & Debugging Questions / Re: 2D lighting without shaders in libgdx on: 2013-10-02 11:50:42
I'm not sure I follow, don't I need some sort of line of code to tell it 'use these blending modes' to make it 'subtract' the light gradient image from the 'darkness' overlay?
6  Game Development / Newbie & Debugging Questions / 2D lighting without shaders in libgdx on: 2013-10-02 05:36:16
Hi all,

I'm experimenting with lighting in libgdx, and want to achieve an effect similar to the one found in this tutorial: http://www.alcove-games.com/opengl-es-2-tutorials/lightmap-shader-fire-effect-glsl/

However, at the moment, shaders are a bit over my head. I asked around and got a few answers that it was possible to just set OpenGL blending modes when rendering stuff with a SpriteBatch, but I can't find the exact lines I need to use to get it to work.

Would anyone have a small example of how this could be done without shaders, just using mybatch.setBlendingFunction(....) etc. ?

Thanks!
7  Game Development / Newbie & Debugging Questions / Re: libgdx - how do I load local assets without an android project? on: 2013-03-30 18:59:44
Thanks all, that has helped me narrow things down to it being a problem only when I use TextureAtlas. My .atlas and .png file are in the same directory as I think libgdx expects, so I'm not sure what else could be wrong as I'm only seeing a generic NullPointerException.
8  Game Development / Newbie & Debugging Questions / Re: libgdx - how do I load local assets without an android project? on: 2013-03-30 16:43:54
There are other methods on GDX.files as well though, I wondered if one of these can be used instead? (e.g. classpath(), but I've not figured out how)

It seems odd that I must have this separate android project folder simply to store my assets in when I'm not going to be using it.
9  Game Development / Newbie & Debugging Questions / libgdx - how do I load local assets without an android project? on: 2013-03-30 16:39:03
Hi all,

I've been getting to grips with using libgdx to develop my game, but as I'm only creating this for desktop, I'm using a single project rather than the default split of base game / desktop project / android project. Now I've been trying to use the following line to load a textureatlas:

1  
atlas = new TextureAtlas(Gdx.files.internal("assets/packed/game.atlas"));
where the 'assets' directory is in the root of the project directory. However running this code just gives me a NullPointerException. From what I can gather though, GDX.files.internal is expecting there to be an assets folder in the android project directory - which I'm not using.

So my question is, how can I correctly reference and load a local file in my project? Thanks.
10  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Is Slick2D still recommended or is libgdx the way to go? on: 2013-03-16 15:53:25
I'd really like to get more input on "the docs are a mess most of the times". Can you point out a few examples and make suggestions on how to correct them?

For me at least, one thing was what I mentioned above about how to use the camera. I would have got much more out of a basic example that matheus23 gave me over the longer current page. I think many of the code samples on the wiki introduce concepts from other parts of the framework that confuse them, e.g. the camera sample includes creating a mesh, binding a texture etc.

Another thing that I couldn't find anything about was the use of the Screen class. The SimpleApp and AppLifecycle pages make no mention of Screen, or how to use it. Until I found https://code.google.com/p/libgdx-users/wiki/ScreenAndGameClasses via Google I didn't even know the feature existed.
11  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Is Slick2D still recommended or is libgdx the way to go? on: 2013-03-16 14:32:41
Thanks everyone for the replies, I'm convinced - libgdx it is Smiley
12  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Is Slick2D still recommended or is libgdx the way to go? on: 2013-03-16 12:20:12
Thank you, that's a massive help. I wish that was on the wiki page for the camera!

One small question, does it have any built in support for draw order / depth? I realise there's a PerspectiveCamera class as well, but I'm not sure if that's what I want (My view will be something similar to any old top-down RPG, Zelda, Chrono Trigger, etc.) In Slick2D I would just sort my entities list by their 'y' position (faked depth) first before they're drawn, but I'd rather do things the 'correct libgdx' way if I'm going to be using it Smiley
13  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Is Slick2D still recommended or is libgdx the way to go? on: 2013-03-16 12:02:37
Perhaps it's me not giving it enough of a chance Smiley So as an example, one thing I've found difficult to find some basic examples of is how to use the cameras.

In java2d / Slick2D, I'd just create a camera class which follows the player, and when things are drawn to the screen, they're offset by the camera position. It's pretty simple and not much code. However, the wiki page for the OrthographicCamera in libgdx is just plain confusing and has so much stuff that's just not relevant to me, I'm not even sure where to begin.
14  Java Game APIs & Engines / Engines, Libraries and Tools / Is Slick2D still recommended or is libgdx the way to go? on: 2013-03-16 10:44:44
Hi all,

I've been playing around with both Slick2D and libgdx for a while now, trying to decide which to use for my game. What's the general consensus these days on which one to use?

My thoughts:

Slick2D

+ Easier to start using, more familiar to people who've used java 2d etc.
+ Does the basics and doesn't have a whole lot of extra stuff I don't need
+ The recent Mojang 'Mojam' seems to have made the forums busier again
- Not really being maintained any more, the maintainer himself has suggested libgdx to people


libgdx

+ Newer, maintained and still being developed
+ Seems to have plenty of featres...
- ... if you can find them in the semi-complete docs. It's hard to find how to do even basic things at times
- Almost seems to do 'too much' for my needs - I'm just creating a desktop game


So I guess my questions are, if I feel more comfortable using Slick2D, should I? Or should I put the time in to learn the 'libgdx way' of doing things?

Thanks!
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (36 views)
2014-12-15 09:26:44

Mr.CodeIt (29 views)
2014-12-14 19:50:38

BurntPizza (61 views)
2014-12-09 22:41:13

BurntPizza (98 views)
2014-12-08 04:46:31

JscottyBieshaar (58 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (76 views)
2014-11-29 21:32:03

toopeicgaming1999 (136 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (37 views)
2014-11-26 15:20:08
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

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!