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 ... 5
1  Games Center / WIP games, tools & toy projects / Re: RPG Project on: 2014-09-12 02:50:37
Looks good. I'm doing a similar style game with a different style of play. I'm still learning though. I'm curious as to why so many packages. I've been trying to figure out how to organize everything a little better, but what are the benefits to doing it that way? Do you just import the packages you need into every class?

So far, every little game i've done has only had one package. I'm trying to figure out my next step in learning. I've made a few small games and read through my java books. I am getting ready to start reading up on entity systems so I can work on my 2d orthogonal tile-based game. I think i'm ready and work for a bit, then realize I need to read up on other methods. I've gotten a basic game that loads a map and has a player walking around but just doesn't seem organized and gets a little overwhelming to get any further.

Sorry for rambling. I don't mean to try to hijack the thread lol. To the OP, the game looks great so far!
2  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > NEW EDITOR RELEASE: 7-10-2014!! < on: 2014-07-14 00:03:25
Sorry if you've already answered this but I didn't go through all the pages. What do you use for your graphics? I've been having problems finding what I need and I don't know any artists. I'm going to attempt to make my own. Also, does anybody know of any decent websites to find artists?
3  Game Development / Newbie & Debugging Questions / Re: wtf? eclipse and libgdx problem... on: 2014-07-08 18:59:09
4  Game Development / Newbie & Debugging Questions / Re: wtf? eclipse and libgdx problem... on: 2014-07-08 18:54:01
Yes.
5  Game Development / Newbie & Debugging Questions / Re: wtf? eclipse and libgdx problem... on: 2014-07-08 18:24:42
The video had nothing to do with the issue i'm having. Basically, in eclipse, I have no run configurations. When I right click on the desktop project and go to Run As..There are no options there. It doesn't say Java Application, Android Application, or any of that..
6  Game Development / Newbie & Debugging Questions / Re: wtf? eclipse and libgdx problem... on: 2014-07-06 18:58:51
Sure didn't. Just read the guides. I'll check it out though. I figured the videos were just a copy of the guides. Can you post a link to where that is located? I must have missed it...Sorry, I had been up for about 24 hours because of work and was a little drunk when I posted that last night. I do appreciate it though!
7  Game Development / Newbie & Debugging Questions / wtf? eclipse and libgdx problem... on: 2014-07-06 05:37:23
I installed eclipse luna 64 bit and java7 as well as libgdx..I noticed libgdx is now powered by gradle which is different...Well i've made my project, but can't get it to even run the generated code...I literally imported the gradle project and right clicked on the desktop launcher..but when I go to Run As, it doesn't have the options like i'm used to. It just says Configuration..I tried to set a configuration profile up but it's not working..says could not load or find main class. I've been searching around but cannot find a solution. When I click search to try to set up a main class under the configuration, nothing comes up.

I'm so lost. I don't get it. Before, it was simple to get this to run...I'm not sure what i'm doing wrong. I miss the old way lol.
8  Game Development / Newbie & Debugging Questions / Re: Box2d and 2d tiled games on: 2014-06-29 21:35:41
Oh, sorry. I thought I wrote top-down. I could see the need for box2d in a platformer though. I'm making a 2d top down tiled game. I don't think i'll have MUCH need for physics, but possibly a little. It's the farming game i've been working on for some time. But i've heard of using box2d for collisions as well. I've been trying to find a good book or some good source materials but have not had much luck.
9  Game Development / Newbie & Debugging Questions / Box2d and 2d tiled games on: 2014-06-29 21:00:32
Is there any benefit to using box2d in a tiled map game? I plan on using box2d lights of course, to get the lighting effects...I've been coding off and on for about a year. Got a new PC and i'm getting back into it. I'm still basically a 'newbie' though. I want to finish this game this time!
10  Discussions / General Discussions / Game Code Examples on: 2014-06-29 20:25:48
I'm looking for some examples of 2d tiled games using LibGDX. Does anyone know where I can find any of them? Ive been searching around but haven't come across anything really useful yet. I just want to look over it and see how certain things have been done.
11  Game Development / Newbie & Debugging Questions / Re: Examples on: 2014-01-30 21:02:13
I've watched a few of those already. They're good tutorials and all, I would just rather play around with the code. I get bored with the videos too quickly. I watched dermetfans. Those were my favorite so far.
12  Game Development / Newbie & Debugging Questions / Examples on: 2014-01-30 20:59:13
This is an extremely dumb question and I apologize in advance...But where can I find examples of games and source code? Back in the day, when I was playing around with Visual Basic and some of the older languages, I could always go on planetsourcecode.com and see examples of how people have done things and I learned pretty quickly...I've found a few examples on the wiki but only a few games and nothing that even pertained to what i'm doing.

I'm having trouble figuring out how to organize my classes, what to make each class do, etc. For instance, for my 2d tiled game, I have a Map class which loads and renders the map...Sometimes I look at the code and think it may need to be split up, but am not really sure. Sometimes I have trouble making the classes work together. I hope I explained this correctly as i'm having trouble finding the words to explain what i'm asking lol. I'm new to Java, but I have read through a java book and I feel pretty comfortable with the code itself...It's just placement and putting it into action.

So basically, is there anything like planetsourcecode for us that I can see projects and see how they did things?

13  Game Development / Newbie & Debugging Questions / Re: Static tile properties with Tiled on: 2014-01-30 20:07:31
I didn't think about that. That's a great idea. I'll just do all of my tile properties in code at run-time. I didn't even know you could do that but that will take care of my problem i'm pretty sure.
14  Game Development / Newbie & Debugging Questions / Re: Static tile properties with Tiled on: 2014-01-27 19:40:12
you can externalised the tileset in the editor


Like he said you can right click the .txm file and edit it manually (its written in XML i think) make one tile property then copy paste it to the tles you need on different maps.


I think you are the only one who understands what i'm asking..

I already know how i'm doing my collision. Each blocked tile will have a property set as blocked. In tiled, I don't want to go through EVERY one of my maps setting EVERY tile property again. I'd rather set it once in a map or in code and not have to set the tiles properties again every time I make a new map as I have a lot of maps.

I could edit the map properties, but I don't think libgdx reads maps in XML. They are encoded.
15  Game Development / Newbie & Debugging Questions / Re: Static tile properties with Tiled on: 2014-01-25 02:55:53
I know..That's exactly what i'm doing, but I have multiple maps. I'm trying to figure out how to set it once and every map that I make with that tileset has the same properties so I don't have to set the properties a hundred times. I'm not doing anything with a collision layer. That's what syath was suggesting but it doesn't apply to my game.
16  Game Development / Newbie & Debugging Questions / Re: Static tile properties with Tiled on: 2014-01-25 02:35:48
It just seems like it would be redundant to draw a whole extra layer every time just for collision. That's how I did it in my pacman game, but being there are a lot more tiles that will always be blocked and quite a few maps...It doesn't seem like that would be a good approach for this.
17  Game Development / Newbie & Debugging Questions / Static tile properties with Tiled on: 2014-01-25 02:07:02
I've been searching around and cant seem to find it..I may be wording it wrong. Is it possible to make tile properties static? Like, for instance:

If i make a map and set a blocked property for all of the blocked tiles, then when I go to make a second map, I don't want to have to set all the same tiles with blocked again...Is there a way to do this in tiled or with code? Or do I need to learn to make my own map editor?
18  Game Development / Newbie & Debugging Questions / Re: Confused about NPC's and map editor on: 2014-01-20 03:34:39
Sorry. I'm scatter-brained right now haha. I'm making a farming game similar to harvest moon..like i've seen so many other people making...haha. I've had the idea for a few years now being a fan of the series. Just never got around to trying to make it. I'm using a tiled system with Tiled as an editor. I've already got it setup and the character walking around and everything. I know I could do it using the object layer and object properties. I could use a variable on each object specifying what type of NPC it is and the different parameters needed for that NPC..

It just seems like there is a better way. I use to develop for a game called GraalOnline and I guess i'm use to that and trying to make it similar. In the map editor you can place an NPC on the map which you can set an image for it by default or you can script it as well as the actions.
19  Game Development / Newbie & Debugging Questions / Re: Confused about NPC's and map editor on: 2014-01-20 03:13:21
Well, that's the thing. I do need to specify where they are. For instance, I have a character standing in front of a house that the player can talk to by walking up to.
20  Game Development / Newbie & Debugging Questions / Confused about NPC's and map editor on: 2014-01-20 02:16:11
I'm working on a 2d orthogonal tiled game and i'm not so sure the tiled map editor will be enough...This is my first major project..I've made a few small games like brickbreaker and pacman...I will be using 16x16 tiles and moderately small maps. Probably 64x64..So i'm going to have multiple maps. I'm not sure what to do, because I don't want to have to set the tile properties for every single map I make..What can I do?

Also, i'm not sure how to make the NPC's...I'd like to be able to have animals running around, people that you can talk to, etc. My first thought was to use an object layer...But this won't work. I'll need to be able to set images, make the NPC talk, and things like that. I know i'm going to need some type of scripting system, but i'm not sure how I can implement it into tiled to add to the maps...It seems kind of redundant to hard-code the NPC's into the game..They will change.

In the end, I want to be able to take this game online so players will be able to create maps...I'm nowhere near ready to do it online yet...Thus why i'm making it single player for now. I hope this makes sense, I tried to explain it in the best way possible.
21  Game Development / Newbie & Debugging Questions / Re: LibGDX - make motion blur for 2D game on: 2014-01-19 00:24:26
I don't know anything about shaders and am still a noob..But if I was trying to create the same effect, I would render an image of the object a few times a few pixels behind the object each time and lower the alpha of the image a little more then the one before it. Should give you the same effect...But like I said, i'm a noob..There's probably an easier way of doing it that pertains to what you're doing.
22  Game Development / Newbie & Debugging Questions / Re: Noob thinking about trying to use a library on: 2014-01-14 20:46:57
For what you're trying to do, you need to start learning LibGDX. It handles most of the redundant things for you so all you have to do is basically code your content but is still flexible enough to do anything you want. I'm working on a similar type game (By similar I mean a 2d tiled game.)

Get LibGDX up and running and watch dermetfans tiled tutorial. It's GREAT! You will learn enough to get you started.

P.S. Thanks dermetfan for the hardwork put into your tiled tutorial. I haven't had a chance to go through your other tutorials yet but thanks for those too! I spoke with you the other day on youtube. I'm the one making the farming type game. (Jman)
23  Game Development / Newbie & Debugging Questions / Re: Couple questions about camera and movement on 2d tiled game on: 2014-01-08 19:32:00
nerb-

That's almost exactly what i'm already doing in the code..I'm just having issues determining the max_x and max_y.

trollwarrior-

Thanks. That makes a little more sense. I'm not using my own camera class, just have it thrown in but i'm thinking about changing that just to make it a little easier to work with the camera. I'm not sure I follow your example 100% but it's definitely a help.
24  Game Development / Newbie & Debugging Questions / Couple questions about camera and movement on 2d tiled game on: 2014-01-08 03:53:06
Hey guys

I'm working on a 2d top-down tiled game. I'm doing it to learn but will probably turn it into a another farming game similar to harvest moon. I've got the map loaded and character displayed and all that, but i'm having a little bit of trouble with a couple things.

I've got my camera set up and it follows the player around...but i'm having trouble getting it to stop scrolling when the player gets near the end of the map. Below is my code. I've only done the x axis and i've just been playing with the values.

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  
public void render() {      
      //handleInput();
     
      GL10 gl = Gdx.graphics.getGL10();
      gl.glClearColor(0, 0, 0, 1);
      gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
      gl.glViewport((int)glViewport.x, (int)glViewport.y, (int)glViewport.width,(int) glViewport.height);
     
      map.renderer.setView(camera);
      map.render();
     
      map.renderer.getSpriteBatch().setProjectionMatrix(camera.combined);
      map.renderer.getSpriteBatch().begin();
     
     
     
      mainPlayer.Draw((SpriteBatch) map.renderer.getSpriteBatch());
     
      map.renderer.getSpriteBatch().end();

//move camera to follow player  
  if (mainPlayer.getPosition().x >= 15 && mainPlayer.getPosition().x <= 30) {
      camera.position.x = mainPlayer.getPosition().x;
     
      }
      System.out.println(camera.position.x);
      camera.position.y = mainPlayer.getPosition().y;
     
      camera.update();
      camera.apply(gl);
     
   }


below is a picture of what i'm talking about. I don't want the black area to be seen.




I've been searching around a bit and I know how i'm going to do my collision detection. I'm going to do it the same way dermetfan does it in his video tutorial. How would be the best way to keep the player on the map? Just do a check to make sure the cell isn't null? Also, i'm a bit confused as how to warp to the next map when the player hits the edges of the map.


Also, this is more of an opinion from you guys, but what should I do next? I know this is a pretty dumb question, but i'm doing this to learn as well as turning it into a game..I thought about adding particle effects next because they interest me. I still have quite a few things to implement though..time system, gui, tools, and NPC's which I still have no clue how i'm going to do.
25  Game Development / Newbie & Debugging Questions / Re: What is up with this stretching? Can't get camera right. on: 2013-12-31 21:51:04
I lied..I still haven't gotten it. all i've been able to do is move the viewport for the camera around..therefore moving the actual camera and not the level/map....
26  Game Development / Newbie & Debugging Questions / Re: What is up with this stretching? Can't get camera right. on: 2013-12-31 21:23:44
I fixed the stretching finally by applying the viewport to the render method. The wiki helped.


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public void render() {      
      GL10 gl = Gdx.graphics.getGL10();
      gl.glClearColor(1, 1, 1, 1);
      gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
      gl.glViewport((int)glViewport.x, (int)glViewport.y, (int)glViewport.width,(int) glViewport.height);
      camera.update();
      camera.apply(gl);
     
      batch.begin();
      map.render(batch);
      batch.end();
   }


It's frustrating as hell getting back into this.
27  Game Development / Newbie & Debugging Questions / What is up with this stretching? Can't get camera right. on: 2013-12-31 20:55:49
Hey guys..I've fallen off for a little while but getting back into it now..I'm having trouble getting my camera to work right..I have a 30x30 map or 32x32 tiles. I set the screen size to 960x960 as this would show all tiles...When I resize the window, it stretches or makes everything smaller if I make the window bigger or smaller. I've been searching for a while and I know it's something dumb that i'm missing, but I can't put my finger on it. I've got my main class and my map class

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
public void create() {      
     
      float w = Gdx.graphics.getWidth();
      float h = Gdx.graphics.getHeight();
     
      float aspectRatio = h/w;
     
      batch = new SpriteBatch();
     
      camera = new OrthographicCamera();
      //1 is temporary camera x and y
     camera.setToOrtho(false,(w/h)*1,(w/h)*1);
     
     
   
      camera.update();
     
      map = new map(camera,"map");
      map.setRenderView(camera);
         }


map class
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  
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.maps.*;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer;

public class map {
   OrthogonalTiledMapRenderer render;
   TiledMap currentMap;
   MapLayer mLayer1;
   
   float unitScale = 1f/32f;
   
   public map(OrthographicCamera cam, String mapName) {
     
      currentMap = new TmxMapLoader().load("data/test1.tmx");
      render = new OrthogonalTiledMapRenderer(currentMap,unitScale);
     
     
   }

   public void setRenderView(OrthographicCamera cam) {
      render.setView(cam);
   }
   
   public void render(SpriteBatch batch) {
      render.render();
     
   }
   
}


I've been messing with the code so much from searching and playing with it that now it seems like it's rendering 1 HUGE tile to the screen. i'm sure it has something to do with the SetToOrtho call but i'm not exactly sure how to fix it.
28  Game Development / Newbie & Debugging Questions / Re: How to read map for A* on: 2013-10-26 03:55:23
I was wondering the same thing..Thanks for the attempt at helping though!
29  Game Development / Newbie & Debugging Questions / Re: How to read map for A* on: 2013-10-26 03:32:47
Thanks anyways for the help! lol

I'm just reading away..hopefully I can get it figured out..
30  Game Development / Newbie & Debugging Questions / Re: How to read map for A* on: 2013-10-26 03:14:40
See, that's the problem i'm having. It's a tiled tmx map. I've figured out how to add the blocked tiles to the arraylist..but i'm not so sure how to add all tiles to a multidimensional array as I would if I hardcoded the map.
Pages: [1] 2 3 ... 5
 

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 (45 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 (33 views)
2014-09-21 01:30:30

moogie (41 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!