Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
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 4
1  Game Development / Newbie & Debugging Questions / Re: LibGDX - Fade In problem on: 2014-09-29 09:39:41
Like jimmt said, Actions.fadeIn is a nice way to use fades for actors or a stage (actually, actions are nice for lot's of things).

If you don't use actors, you can still benefit from the actions system, as an Actor is not an abstract class. Create an actor and assign it the initial color value and add a fade in action. Call act on the actor in your update/render method. This will step the actions you have put in. Then you can get the actors color and have the updated color. You can just use the alpha component of the color. Here is some example code of how you could use it:

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  
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;

public class FadeTest {
   //Transparent color
  private static final Color TRANSPARENT = new Color(1f, 1f, 1f, 0f);
   
   private Actor fadeActor = new Actor();
   private SpriteBatch batch = new SpriteBatch();

   //Your init method
  public void create() {
      //Assign the starting value
     fadeActor.setColor(TRANSPARENT);
      // Fade in during 2 seconds
     fadeActor.addAction(Actions.fadeIn(2f));
   }

   //Your update and render method
  public void draw() {
      //Act updates the actions of an actor
     fadeActor.act(Gdx.graphics.getDeltaTime());

      //Get the current color of the actor
     batch.setColor(fadeActor.getColor());
     
      batch.begin();
      //Render stuff
     batch.end();
   }

}


It probably might be a bit overkill, but I like it because the actions enable you to easily do different transitions (even in parallel). So if you don't know actors and actions, have a look at it.
2  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-24 07:53:06
Yuppers.  They are bog standard literary criticism applied to games. About as controversial as breathing.

The reaction to them was childish, stupid, boorish, ill-educated and entirely predictable.  The problem is that literary criticism is usually consumed by academics who are interested in discussing themes in art. In this case, a bunch of people who are too stupid to understand it watched the series (or more likely got a half-baked opinion second hand from someone else who actually watched one) and figured that their sandpit was being pissed in by a big nasty bully.  Which is... indescribably wrong and muddle-headed.

As for Cas: man I loved your tirade.  Reading it, I was getting pissed off part way through, but I got your point in the end and it certainly did make for a perception shift as your point about the worth of individual customers sank in.  

You were way more provocative than Sarkeesian so I hope you've not had your family threatened, bomb threats et al?

There have been some people that have overreacted a bit. But to be honest, mentioning academics discussions and the sarkeesian videos in one sentence is a bit of a joke to me. While the topic surely would be interesting, those videos are innaccurate and very narrow sighted. Anita manages to show up the things she deems wrong but basically leaves out things that don't fit into her world view.

Seriously, have you watched some of the videos? In hitman, the goal is to murder innocent sexualized women, drag them around and put them in a box. The dragging mechanics have been implemented solely to satisfy mans need to overpower women.

But what would you expect. She has probably not played one of the games she analyzed. She reminds me very strongly of one of my old teachers. She was absolutely no fan of gaming and we had to read and analyze many articles why games are bad. In some of the articles was stated that the goal of counter strike is to kill innocent people, you get extra scores when destroying the baby stroller (wtf,i don't even know how they couls get that idea).

But this is mainly my problem with anita. People start referencing those videos and some people take everything sh says for granted. I am happy when people speak out about this. Many see their culture threatened by someone who wants to impose her own morals on a scene, she isn't even part of nor is willing to understand.

To me she is a joke, a liar, a button pusher, and probably even a fraud who prometes her agenda in a very immoral fashion and I believe that she even provokes those reactions, because there are enough gullible people who fall for the trap and give her huge support, just because she has been bullied. Worked very good for her kickstarter...

Just my 2 cents...
3  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > KICKSTARTER, GREENLIGHT AND NEW BUILD LAUNCHED < on: 2014-09-23 06:25:18
Pledged and voted... Good luck with your kickstarter
4  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Unchecked Call Warning on: 2014-09-17 13:38:14
Make following change:
1  
2  
-HeadBox = new SelectBox(skin, "equipment");
+HeadBox = new SelectBox<String>(skin, "equipment");


The select box is generic since gdx 1.0 I think and also requires a type parameter. If you supply an array of strings, then you need to set the type of the select box also to string.
5  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-26 10:45:11
Due to the lack of time (we started sunday afternoon/evening) we could not complete what we had planned as jam entry. To be honest, when we started we had in mind that it might be a bit too much, but we did get more done then I expected. Maybe we complete what we have defind as minimal launchable product for the LD. Maybe the code even get's a bit cleaner, if we don't have to hurry against a deadline Wink

But none the less we had a fun time and I even learned one or two things, that I will be using in my other projects.

Looking forward to the games that have been created for this ludum dare. I liked the theme very much and I'm hoping for some nice games Wink
6  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-24 18:58:22
It looks like we are just joining in Wink had a big barbecue yesterday and needed some time to rest... we're not sure yet if we get something completed for the jam, but we have a small idea... I will post an update, if we get something running Wink
7  Game Development / Newbie & Debugging Questions / Re: Solved - Need advice/guidance on path finding - A* on: 2014-08-24 16:47:04
What helped understanding pathfinding was to do some simple examples using a pen and paper.

Draw a small network and then pick two nodes of the network and do the pathfinding by hand.

For example you could use following network:



Start with some simple cases (what is the nearest path from A -> D, I -> E) and when you get that right than try out a longer path (A -> H). For starting you might even chose a simpler network, like the one riven has posted. The algorithm stays the same, so if you get it right with a small example you should be able to do it with a bigger, more complex one.

The most important part from my perspective is that you understand what you are doing. By your profile your coding experience is not that long. I can imagine that you might be having issues with some language specific things that don't have anything to do with the problem itself. I don't see much sense in starting to code when you don't get the theory/idea behind an algorithm. Understand the theory behind it first. If you know exactly what you want to implement you can work out the other problems more easily. (btw, this is also how we learned this in school. understanding the theory by solving some examples by hand, then getting the code up and running Wink ).

1  
2  
3  
4  
5  
  B
 / \
A---D
 \ /
  C

Start: A, Destination: D

Weight for edge A→B: 1
Weight for edge A→C: 2
Weight for edge B→D: 3
Weight for edge C→D: 1
Weight for edge A→D: 6

Correct path is A→C→D

This test-case catches most common mistakes - both in searching and in backtracking.

Hmm, interesting. Need to have a look at this.
8  Java Game APIs & Engines / Tools Discussion / Re: Overlap2D: Level/UI Editor for games with libGDX support on: 2014-08-19 09:46:04
Just tried the editor out. Some things I noticed:
- I can't scroll or pan the scene around. Don't know if it is not implemented yet or if it is a bug.
- I clicked on "root scene" and the whole scene shifted to the top right.
- I find the scroll panes a bit strange. Had the same behavior in my editor first. You have to focus the scroll pane so it scrolls, but then it scrolls even if you are outside of the scroll pane. This interferred with my zooming controls (used the mouse wheel for that). I fixed this for all my scroll panes by adding an event handler to the ui stage with following code: http://www.java-gaming.org/?action=pastebin&id=1058 ... It worked like a charm in my case.

But actually, it's cool when you start up the editor and already see this nice scene Cheesy Makes me want to try out the runtimes Wink

The node approach worked very well for me. Had to do some tweaking until I got the transformations and the rendering done correctly (and don't mentiony the cloning of an existing node with all children :|)
9  Java Game APIs & Engines / Tools Discussion / Re: Overlap2D: Level/UI Editor for games with libGDX support on: 2014-08-18 22:37:13
This is great... It is very cool to see yet another cool tool added to the libgdx content pipeline. Great to see how quick you create the scene in the youtube video (you need to have the assets first Wink ).
Looks like you have put quite some effort into this (I did something very similar for a game, but much less polished and without physics or lighting directly included, and that took me a big amount of time...).

Currently I'm stuck with tiled as it is the best pick for my current game. But I will definitely try this out when I find the time. I appreaciate the work you have put in to this.

Edit: Just for the lulz, a screenshot of my editor in action: http://i.imgur.com/vzeaAdm.png ... Basically the same thing XD
Note the very fine programmer art Wink
10  Games Center / WIP games, tools & toy projects / Re: Art To Map - Create Game Maps from Artwork on: 2014-08-13 07:44:03
Looks nice but still very basic. Is the background just an image and you added the collision boxes, or is the background also composed out of multiple parts?  And is this java2d?
Also I work with tiled but I don't assign properties to tiles. You can have object layers in tiled and draw tile objects freely or add shapes like rectangles or ellipses. I build my graphics with the tiles, but for example  the collision box of my level is simply defined with shapes. Maybe it would help you to have an in depth look at what is possible with tiled and other editors, so you can see what concepts work for you and what don't.

Some things i'd find nice to have in such a level editor:
- mirror sprites
- rotate sprites (smooth rotation and snapped to 45° increments)
- scaling
- tinting of sprites (incl. Alpha value)
- grouping/ungrouping of objects. So you can move or transform a group by only changing one of the grouped objects...
- create shape with outline. Use an image outline to create a shape...

I'd be interested in trying your tool out, but it would require a runtime which works with libgdx, android and  gwt, otherwise I don't find much use for it (don't have the time or the nerves to build another renderer XD). Keep up the work.
11  Game Development / Game Mechanics / Re: [LibGDX] Creating 2D Animations with Blender on: 2014-08-11 17:04:30
I'm not very familiar with blender and I cannot really answer your question. But have you thought about using spine2d? Maybe this could be an alternative to blender.

http://esotericsoftware.com/

Spine is made exactly for this and it also provides a runtime for libgdx (and many other game libraries), which lets you integrate your spine animations with some lines of code into your project. It costs a bit (not sure what you pay now), but it's definitely worth it, if you plan to do much animated content.
12  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Tint part of sprite on: 2014-08-04 16:01:45


I've thought that a solution can be split my texture in two textures. One texture will have the immutable colors of my texture, and the other one will be in grayscale, and tinted using sprite.setColor. However I think this is not the best solution.

Ideas are welcome  Smiley Thanks in advance.

I would do exactly that. It is simple and it works. Why bother looking for a more complicated solution.
13  Game Development / Newbie & Debugging Questions / Re: Should I move to LWJGL on: 2014-08-04 13:07:10
If you don't want to use libgdx, then simply don't use it. Why are you looking for a justification if you don't like it? Another one question. Why do you want to write everything yourself? I understand that rolling your own might be a nice learning opportunity, but if you want to make a game, concentrate on the game. Libgdx doesn't mean you write less code. It means that you can shift your focus to other things, like refining game mechanics, instead of using your valuable time to solve problems that already have been solved a tousand of times.

I'm working on a small game, using libgdx, box2d, box2d lights etc. You can believe me, while I'm using libraries where applicable, there is still enough things to code. And to be honest, it is much more interesting to develop an ai system or pathfinding algorithm, than developing an ui or input system from scratch.
14  Discussions / General Discussions / Re: Mobile Version of Forum on: 2014-07-31 07:14:08
I often browse jgo from my phone. It's not optimal but it is usable. There is only one real issue I have. Writing posts on the phone is a bit of a pain, because the textbox is wider than the screen in portrait mode and sometimes the layout has a quirk and the post and preview buttons overlay the textbox, making it very hard to write or read/edit a longer post.

Hmm. It worked fine until I hit preview. After that I got the nice overlay Smiley

http://m.imgur.com/OhijIAs
15  Games Center / Android Showcase / Re: Rocks Fall on: 2014-07-17 10:22:54
As you are lonely in a cave and try to find your way out I think this game might work well with atmospheric background music and sounds. Not too much rythm and melodies. Keep it organic and the tone should be more dark than nice Wink I just looked a bit on soundcloud and found a nice example. https://soundcloud.com/cryo-chamber/dark-ambient
Listen to the parts from ~15:00-23:00 or ~ 33:00-39:00. This music gives me a very eerie feeling and I would find something similar very fitting for the game.

Also, I would add a lot of random sound effects to it. Sounds of dripping water, howling wind, bat sounds etc. what ever could fit in the cave scenario... Don't overdo it and make sure that it fits in (play around with the volume, add reverb to it etc.) Don't try to use repeating patterns.

About the rotation. I played a game that has been made for ludum dare 29 that has a similar mechanic, where you rotate the screen and change the gravity with that. The game is a bit different but I think the rotation works quite well there and the cut is not as harsh as in your version. You can check that out and see if maybe something similar would fit for your game.

http://www.ludumdare.com/compo/ludum-dare-29/?action=preview&uid=25122
16  Games Center / Android Showcase / Re: Rocks Fall on: 2014-07-16 16:39:05
I tried your game and it's just the right thing to play on a short bus or train ride. Haven't got very far yet (lvl Cool.

Need to get of my train in some minutes so my feedback in short:
+ The idea for the game mechanic is nice and I like the puzzles so far.
+ The difficulty starts low but then i gets harder. I think after lvl 5 i wasn't able to solve a level in the first try.
+ No special permissions needed. Make an ad based free version, but there always will be some guys like me who are willing to pay a bit and in turn don't need to give the application special permissions.
- No sound
- i hit the back button. This exited the game and all my progress got lost. Tr to improve the app lifecycle here. Maybe you could autosave after each level. I can imagine that some players will be discouraged if they solved 30 levels in one session and then lose the whole progress.
- The rotation happens instantly. Sometimes I hage trouble with that. Can't describe exactly what it is. Maybe rotate the level instantly, but use an animation to rotate the player afterwards. I think this would look a bit better.

I think this game has a very good potential if you polish it a bit. I'm definitely lookin forward to beating your 123 levels Cheesy
17  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > NEW EDITOR RELEASE: 7-10-2014!! < on: 2014-07-12 20:36:27
I too like the web page but there is one thing bothering me with it. I have a full hd screen, but because of the header, logo, navigation and breadcrumbs, only the lower third of my screen is used to display actual content from your page (don't forget that the window chrome of your browser or windows taskbar also use up vertical space). You are wasting valuable space that you could use to display content. You could still make a nice home page with a big logo, but I would make the whole heading section more compact for all other pages.
Other than that your page looks neat and I think it fits nicely for your game.
18  Game Development / Newbie & Debugging Questions / Re: Tile Placing on: 2014-06-20 14:58:38
It seems to me that you are not fully understandinging what you are doing. You haven't posted all relevant code, so i can only guess. I think your problem is that you have only one instance of your skyscraper (the variable s in the second method). You don't create anything in the methods you posted. You only change the coordinates, which would explain why the existing tile is moved. You have to create an instance for each tile you want to create...
19  Discussions / Miscellaneous Topics / Re: Interesting Profile pictures on: 2014-06-18 10:26:15
Click to Play

I love londo. He and g'kar are my favorite characters from the show Smiley always liked your avatar XD
20  Game Development / Newbie & Debugging Questions / Re: Differentiating between different types of Box2D bodies in LibGDX on: 2014-06-08 14:41:44
I don't know how you handle your collisions, so I can't say much about how you could do it (maybe explain how you setup your resolution or provide some code).

About your suggestion. You can attach multiple fixtures to a body, but as far as I know you can only attach one user data object per body, so I think that your approach won't work.

In my game I too need to check what bodies have collided. I have an event queue where I can push events on to, if I found a collision that needs to be handled by one of the game systems. For this I created an implementation of the ContactListener class. In there I check the entity types of the bodies. If I find a combination of entity types that I need to handle, I simply put them into the queue. No need for global variables, as I supplied the event queue in the constructor of my ContactListener implementation.

I have put up the (stripped down) code of my implemenation: https://gist.github.com/tomvangreen/04b8d13941b9e5c3bd0f
My code is a bit special (let's call it ugly Wink ). Also my solution is by all means not optimized. There are some things I could do to improve, but currently it is out of scope for me and as long as performance is no issue I won't bother changing it Wink I hope this gives you an idea on how you could do this.
21  Game Development / Newbie & Debugging Questions / Re: Differentiating between different types of Box2D bodies in LibGDX on: 2014-06-05 20:32:46
I just have been informed that I should read a bit better next time...

You could create a hashset for each entity type and register the bodies on creation in that set. Or use a HashMap with the body as key and your entity as the value.

He just explained that some gfx lib is claiming this userdata field persecutioncomplex

Indeed. Must have have missed that whole paragraph  Roll Eyes Time to go to sleep...
22  Game Development / Newbie & Debugging Questions / Re: Differentiating between different types of Box2D bodies in LibGDX on: 2014-06-05 20:20:02
There are multiple ways to do this. The easiest way would be to user the user data property for the body. You could create an EntityType enum and then simply set the values as user data, if you only need the types:

1  
2  
3  
4  
5  
6  
7  
//Set the user object
body.setUserData(EntityType.Enemy);

//check the user object
if(EntityType.Enemy.equals(body.getUserData())){
    foo();
}


Have a look at this tutorial: http://www.aurelienribon.com/blog/2011/07/box2d-tutorial-collision-filtering/ . It explains what filter groups are. Maybe this could be also useful for you. Definitely worth checking out.
23  Discussions / Miscellaneous Topics / Re: Code-style: Cringe pics on: 2014-06-05 15:11:55
I had to maintain a js project once that had a very special way of doing things. Can't post actual code from the project, but it looked something like this:

1  
2  
3  
4  
5  
6  
7  
8  
for(var arrIndex = 0; arrIndex < arr.length; arrIndex++){
   for(var arrFooIndex = 0; arrFooIndex < arr[arrIndex].length; arrFooIndex++){
      for(var arrFooBarIndex = 0; arrFooBarIndex < arr[arrIndex][arrFooIndex].length; arrFooBarIndex++){
         arr[arrIndex][arrFooIndex][arrFooBarIndex]['Property'] = 'yay';
         //Lets loop some more ;)
     }
   }
}


Now imagine this going down up to 10 levels of nesting and add a bit of business logic into each layer, often referencing the objects of other layers. The project was very well documented and structured, but things like this required that you had to be extra careful with every little change. It didn't help that there was very much redundancy, so often you had to change multiple loop trees, if you needed to change something.

Another thing that annoys me very much (it might be a bit off topic for code style) are date parsers in javascript. Somehow people resist using already established solutions and try to roll their own. And this is really hard to get right, especially if you you take different locales into account. In one project I had to help out with a problem on the frontend with datepickers, I found three different implementations (let's call them hacks) of a dateParse method, each one used in different places of the application and one of them actually returned the correct dates sometimes... Fun thing is that this application ran on a platform, that had a js api and provided full support for localized dates and some other nice features. But hey, why not roll your own?

I once read a nice quote, sadly I can't remember where I read it, but it fits nicely for this post:

Quote
Write your code like if the person maintaining your source is a total psycho and knows your home address.
24  Game Development / Newbie & Debugging Questions / Re: [libGdx] friendly group example on: 2014-06-03 15:36:17
I have no Idea but maybe try out this:

1  
stage = new Stage(new Viewport());


The part with stage and viewport has been introduced sometime before the 1.0 release of libgdx. Viewport is just an interface as far as I know, so you can't create it directly. Check the libgdx docs which viewport would suit you best (I tend to use the ScalingViewport): https://github.com/libgdx/libgdx/wiki/Viewports
25  Game Development / Newbie & Debugging Questions / Re: LibGDX - Tiled collisions? on: 2014-06-02 10:08:13
You need to compare the coordinates of the colliding wall and on the coordinates of your player (the center of your player sprite). Then you just have to compare x and y values of both.

If the wall x is smaller, it is to the left. If the wall x is higher than player x, then it is to the east.

The same goes for y. It wall y < player y the wall is to the south.

Then just move the player in the opposite direction until the collision has been resolved.
26  Discussions / Miscellaneous Topics / Re: Random syntax tweaks! on: 2014-06-01 21:01:31
This ?? operator just tries to hide a problem instead of fixing it. Getting rid of null and using something like a Option type is way better in my opinion.

Exactly. It's called the Billion Doller Mistake by the "creator" of
null
, Tony Hoare.

While I won't comment on the issue of having null references at all (I don't know enough about the issue to make an useful statement), we have to deal with null references anyway, no matter if null references are a good design decision or not. The coalesce operator can help shortening code (at least I have seen many places in production, where this operator was applied or could have been used to make classes morre concise). So while it might be here to counter bad design decision in our programming languages, I still find it a very useful small tool. I definitely can live without it in java, but I like getting rid of useless clutter. If there is a simpler way of expressing code that has a similar readability, I'm happy to use it, and this applies to ?? if you use it at the right places.
27  Game Development / Newbie & Debugging Questions / Re: LibGDX - Tiled collisions? on: 2014-06-01 14:19:01
If you look into box2d I think the most valuable help to start is the main manual, even if the code is slightly different (c++ instead of java).

http://box2d.org/manual.pdf

The basics of box2d are very well explained. When you think you understand what is going on, you can have a look at the libgdx wiki on how to setup box2d for libgdx => https://github.com/libgdx/libgdx/wiki/Box2d
Then you can try implementing the examples from the manual.

Just so you don't mess up the game, I would create a new test project, where you try out your first steps with box2d and when you think you understand what you are doing, you can integrate it into your game.
28  Discussions / Miscellaneous Topics / Re: Random syntax tweaks! on: 2014-06-01 13:45:02
A very simple one that I miss in java is the ?? operator from C#. If used at the right places it can make the code more concise without loosing any readability.

From http://msdn.microsoft.com/en-us/library/ms173224.aspx
Quote
The ?? operator is called the null-coalescing operator. It returns the left-hand operand if the operand is not null; otherwise it returns the right hand operand.

Here is a silly example:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public class Foo
{
   private string _instance;

   public string GetInstance1(){
      if(_instance == null){
         _instance = "instance";
      }
      return _instance;
   }

   public string GetInstance2(){
      return _instance == null ? (_instance = "instance") : _instance;
   }

   public string GetInstance3(){
      return _instance ?? (_instance = "instance");
   }
}


29  Game Development / Newbie & Debugging Questions / Re: LibGDX - Tiled collisions? on: 2014-06-01 13:11:32
Detecting collisions is actually not that hard. The problem is how you resolve the collisions. Just stopping the movement will most likely get the player stuck in the wall. If you are using libgdx you could save the time on implementing something yourself and use box2d to do the heavy lifting for you. A friend has started using it for his 2d oldschool rpg (something like the first zelda games) and it works quite well. Cool part is that you can use an object layer in tiled and simply draw the collision boxes with rectangles / polygons and import them into box2d. I have done this once by hand, but since then I learned that libgdx has a class to do exactly that.

If you just want to make a simple collision detection, you could use two Rectangle (com.badlogic.gdx.math) instances. Use a loop to cycle through each neighbour tile and check if the entity intersects with it. If the checked neighbour is a wall, assign size and position of the entity (player) you want to check to the first rectangle, and the same for the wall to the second rentangle. Then you can call rect1.intersects(rect2) to check, if they overlap. Just store the walls that have intersected for later resolution.
To resolve this, you can loop through the walls that have intersected and move the player one pixel away from the walls. Do this until the player isn't stuck anymore.

This is a very basic method of doing it and only will work, if the walls are full tiles and the entity (collision box) is smaller than a tile. I'd still recommend using box2d though Wink

Quote
EDIT: I'm also not sure how to make the rectangles relevant to tile positions

As for your problem, usually you need the tile size and the x and y position in the layer to calculate the pixel based position. I modified your code to show how to get the x and y positions of a tile.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
float tileWidth = layer.getTileWidth();
float tileHeight = layer.getTileHeight();
for (int y = 0; y < layer.getHeight(); y++) {
   for (int x = 0; x < layer.getWidth(); x++) {
      Cell cell = layer.getCell(x, y);
      if (cell != null) {
         TiledMapTile tile = cell.getTile();
         if (tile != null && tile.getProperties().containsKey("Blocked")) {
            float tx = x * tileWidth;
            float ty = y * tileHeight;
         }
      }
   }
}
30  Games Center / WIP games, tools & toy projects / Re: Treasure Catcher - Mini Game on: 2014-05-31 16:40:05
Looks nice for a first game. You definitely have to add some powerups or other enemies to add more variation to the gameplay. You might consider having different speeds per lane, to make things a bit harder.
Pages: [1] 2 3 4
 

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

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (44 views)
2014-09-23 14:38:19

radar3301 (27 views)
2014-09-21 23:33:17

BurntPizza (63 views)
2014-09-21 02:42:18

BurntPizza (32 views)
2014-09-21 01:30:30

moogie (40 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!