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  Games Center / Featured Games / Re: State of Fortune on: 2014-07-26 23:53:04
Oh lord, Mike you are my hero. I love the idea of using islands.

My banter below, feel free to ignore:
I think another interesting idea if people do run out of land is to set up a sort of public fund, to create a nearby artificial island. It's way more complex, but say, you add it close enough to see, and you set up a bridge and all that, so that people will have to wait to get out to it, and will get excited for it, and have to pay into the new land to get to it. (Using in game currency they have obtained of course)

Good way to create an artificial money sink in a game like that, and you could make it so it's "government" funded partially, and over time will get completed either way, so that it doesn't limit the actual game, just gives people something to spend on. Of course, you could always just make this sort of idea as a "building a connection to a newly discovered island" instead of an artificial one, but it's an interesting way to go about it.

You could do some crazy stuff though, like adding in a literal government system and elections, giving some players the power to pass laws which get voted on by the population of their island that they govern, etc. It is called State of Fortune after all, never a bad reason to add politics and ways to spend money. At that point, it turns less about your idea of agriculture and exchange though and more into a colonization sim.


Anyway, those are just my tidbits of ideas, I'm sure whatever you do with the actual gameplay will be good, hell it already is fun to play and you're focusing on the technical side still. Hope to see more updates from you in the future.
2  Game Development / Newbie & Debugging Questions / Re: Tile rendering FPS lag on: 2014-07-25 21:58:06
LWJGL is pretty much better than Java2D in all circumstances. It's more complicated, but faster.

I wouldn't even bother writing a game in Java2D these days, since you can use something like libGdx and get better performance for about the same amount of code as regular Java2D.

I recommend looking into a graphics library and brushing up on your basic Java skills before venturing further into game development.

Also, for tile based games, why not use a regular array? Then you know what's in the bounds of the screen for much cheaper (it's 1 if call and 1 multiplication calculation, versus at least 4 if calls per bounding box) [you can actually get this to be less by just saying for(int i = playerPositionTileX + tilesToRightEdge; i > playerPositionTileX - tilesToLeftEdge; i--) and doing another loop for the Y, and just rendering out those like, 50 objects, and never having to check anything for collision, no if statements of any sort, so it's even cheaper, since on larger maps you can save thousands of calls]

I assume geometry is static, so it's not like you need to make your map bigger suddenly. Even if this was the case, you could always bump your array up a size by recasting it, it seems like a big waste of resources to use an ArrayList for your map. Entities, surely, but geometry, no.
3  Game Development / Newbie & Debugging Questions / Re: how to do something at the end of a finger drag in libgdx/android? on: 2014-07-19 00:59:49
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/InputProcessor.html

That doc tells you all about the handy dandy input processor.
4  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-07-03 13:18:37
Reminds me of the land ships from the book Leviathan.


You can check out all of the land machines from the book here: http://leviathanscottwesterfeld.wikia.com/wiki/Walker
Probably really great if you're looking for other inspiration.

Also, on the topic of airships: http://theedgechronicles.wikia.com/wiki/Sky_Ships_of_the_Edge
The ships in the edge chronicles are really cool. They fly using floating rocks!

These are just what I was immediately reminded of by your last post. Concept art looks real good, hope to see some more diversification like that in the future.
5  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Gdx.files.local doesn't seem to be finding my files. on: 2014-06-19 09:16:40
Gdx.files.local will find anything in the directory of the jar only, classpath is INSIDE the jar only. Internal turns into classpath if the file is not found, so it basically serves as both local and classpath combined. So you guys are both wrong.

Yes, what you are doing originally works fine. NORMALLY.

As for Gibbo, read the documentation before spouting nonsense:

Quote
Local files are stored relative to the application's root or working directory on desktops and relative to the internal (private) storage of the application on Android. Note that Local and internal are mostly the same on the desktop.
Except that internal turns to classpath if it can't find the file locally.


As for how folders work, those ARE the root folders when running a project in eclipse, so if he is using eclipse, anything that is at the same level as his src and bin folders WOULD be considered root, this is because things are run as if they were a jar in the project folder.

Here is the entire wiki page on filehandling:
https://github.com/libgdx/libgdx/wiki/File-handling
and here is the official documentation:
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/files/FileHandle.html
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Files.FileType.html#Internal
6  Game Development / Newbie & Debugging Questions / Re: libgdx collision detection on moving and rotating object (rectangle enemy) on: 2014-06-17 04:24:53
You're going to need more code than that. All that tells me is you're rendering 2 rectangles, doesn't say anything about where you're doing movement or collision checking.
7  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-14 04:36:33
No point doing it yourself. Use Tiled.
 (Unless you want the experience creating your own editor will bring you, in which case, make your own version of tiled, don't bother making just a basic png -> text/object type converter)

I do recommend tiled over the RGB method though. It gives you a better idea of how things will look without loading them up, and it already has all the things you need in it's export format.
8  Game Development / Newbie & Debugging Questions / Re: Spears (ENEMIES) on screen like many of them. [LibGDX] on: 2014-06-08 20:17:27
The methods there need to be wherever you render.

 You have to work out the exact details yourself, if you can't get through this simple of a thing after being given this much you probably need to work more on basics of logic and the Java language before making games. Just throwing that out there. This is all the help I can give you without me literally writing parts of the game for you at this point. (Although I already gave you a bit of code, albeit not much)
9  Game Development / Newbie & Debugging Questions / Re: Spears (ENEMIES) on screen like many of them. [LibGDX] on: 2014-06-08 19:51:41
I really don't see the issue with creating a new object for this sort of thing. If it's just a static thing though, you can just make an array of objects, and reset them. Something sort of like:
1  
2  
3  
4  
Spear spearArray[] = new Spear[5];
for(int i = 0; i < 5; i++){
     spearArray[i] = new Spear(x,y,width,height);
}

on initializing, then on update something like this:
1  
2  
3  
4  
5  
6  
7  
for(int i = 0; i < 5; i++){
     if(spearArray[i].x > 0 - spearArray[i].width){
         spearArray[i].x -= SPEAR_SPEED;
    }else{
        spearArray[i].x = screenWidth;
    }
}


with a spear class that looks like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
public class Spear{
    int x, y, width, height;
    Spear(int xx, int yy, int w, int h){
    x = xx;
    y = yy;
    width = w;
    height = h;
    }
}


You'll have to handle rendering and collision yourself.
10  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-06 19:09:24
Just going to put this out there in response to those of you who are young and trying to work together. Work alone for now. You aren't good enough at programming or cooperation to collaborate yet in most cases. I know it sounds like fun to put together a group, but it's likely you won't get anything done, or you will have issues with cohesion. Not trying to be mean, but it's unlikely to work out. If you still really want to make a team, make a plan first. Split up work properly, make contact times, set up a git repository, and continue to learn with each other. Don't flake out, put a lot of hours into it. Treat it like a job.

On Topic more:
For the scrolling background, I recommend either just making a few cloud images and making them appear in the background randomly offscreen, move in one direction, and disappear one they're offscreen, or you can make one long image that loops once it gets to the end.
11  Game Development / Newbie & Debugging Questions / Re: Collision bug in a 2D platfrom game. on: 2014-05-28 20:32:44
You can also just check the bounding volume of the intersecting bodies and say, if the player is moving toward a static body with a positive x velocity, you get the left most edge of the object it collides with, and minus the width of the player. This is pixel perfect with rectangles and doesn't require iterating per pixel, as it will just automatically push you to the left most edge of whatever you've collided with. My implementation looks 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  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
public void collisionChecks() {
                //move the player's rectangle the entire velocity
     player.rect.x += player.xvel;
                //if the player leaves the boundary of the camera, load a new map segment
     if (player.rect.x < 0 && pmx > 0) {
         pmx -= 1;
         loadRoom();
         bulletList.clear();
         player.rect.x = 1899;
      } else if (player.rect.x < 0) {
         pmx = MX - 1;
         loadRoom();
         bulletList.clear();
         player.rect.x = 1899;
      }
      if (player.rect.x > 1900 && pmx < MX - 1) {
         pmx += 1;
         loadRoom();
         bulletList.clear();
         player.rect.x = 1;
      } else if (player.rect.x > 1900) {
         pmx = 0;
         loadRoom();
         bulletList.clear();
         player.rect.x = 1;
      }
                //do actual collision check
     for (int i = 0; i < rectList.size(); i++) {
         if (player.rect.overlaps(rectList.get(i))) {
            player.rect.x -= player.xvel;
            if (player.xvel > 0) {
               player.rect.x += rectList.get(i).x - player.rect.x - 20; //20 is the player width, I'm just too lazy to use player.rect.width()
              player.xvel = 0; //set velocity to 0 as we've collided
              touchingRight = true;
            } else if (player.xvel < 0) {
               player.rect.x += rectList.get(i).x + 32 - player.rect.x; //32 is tile width, also too lazy to use rectList.get(i).width()
              player.xvel = 0; //set velocity to 0 as we've collided
              touchingLeft = true;
                       }
                                //if we know there's a collision, leave the loop
           break;
         }
                        //if there is no collision, reset touching booleans
        touchingRight = false;
         touchingLeft = false;
      }
   }
     


keep in mind this only will work if your velocity is less than the width of a tile, but you can test for that and iterate in velocity steps that are the size of tiles, so it's just less iterations, rather than per pixel.
12  Game Development / Newbie & Debugging Questions / Re: creating grid based ascii graphics for a rogue like on: 2014-05-28 19:54:54
Keep in mind you gain nothing from actually making it ASCII at this point. Once you go through the trouble of using arrays and any real graphics calls you've defeated the point of ASCII. If you're dead set on it, go for it, but keep in mind you're limiting the audience of your game severely for very little ease of programming/slightly less work.
13  Game Development / Newbie & Debugging Questions / Re: [Libgdx] Strange issue when scaling a sprite on: 2014-05-09 04:20:37
use:
1  
mSprite.setOriginCenter();

do this after setting the position, and remove your setOrigin line of code.
14  Discussions / General Discussions / Re: Publishing my game on: 2014-04-18 21:29:03
Pretty sure the majority of successful developers haven't made a lot of money based off per-sale profit, but rather through many sales/customer loyalty.
15  Discussions / General Discussions / Re: Publishing my game on: 2014-04-18 21:09:06
Kickstarter isn't a good place to put a finished product, or very nearly finished one. You're better off releasing to android/play and building a fanbase, then kickstarting your next project if people like your first.
16  Games Center / Showcase / Re: Groundskeeper 2 on: 2014-04-10 03:58:26
I think the trick is not recording from a mobile device, but rather your desktop/dev build.
17  Game Development / Game Play & Game Design / Re: Making tiles have collision detection on sprite sheets on: 2014-04-02 00:50:53
Make a tile class, and add a "isSolid" boolean to it, then do some AABB collision checking with your tiles and if isSolid = true, run a collide event, if not, move right through.
18  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-31 13:20:47
Have you thought about checking the collision of the text boxes, so that they don't overlap? A few collision checks would be very low cost, and you'd make your flavor text a lot more readable. (and I imagine they probably have some sort of importance?)
19  Game Development / Newbie & Debugging Questions / Re: Ship Building Games? on: 2014-03-28 12:58:49
If the particles coordinate are relative to the world coordinates (not the ships) and the emission force is mapped to the rotation of the ship, you shouldn't have to increase anything with the particles because the trail will get bigger as the ship moves faster and should make a nice trail behind it.

But in the event you wanted a more consistent trail, you could just increase the rate at which you create particles dependent on the speed of the ship. But yeah, generally speaking, the particles would just make a nice trail regardless. (assuming you give them some sort of time to live in frames and they stay in a spot/travel opposite the ship, in which case they will indeed just make a nice trail behind you that gets thinner the faster you go)

Of course, if you wanted to simulate power rather than speed, increasing the rate of particles is the way to go, and this would of course increases speed as well, and if you turned the thrusters down, they would have less exhaust. This is probably what you're going for.
20  Game Development / Newbie & Debugging Questions / Re: Upgrading movement to use acceleration / deceleration, rather than static values on: 2014-03-28 12:24:53
I would personally just do it the lazy way, and make a vector that holds both the x and y velocity, and then assign floats for acceleration (final float ACCEL = whatever you want, experiment), then assign another for friction (final float FRICTION = whatever you want). Each tick when not moving, use friction to decelerate, and any tick when a movement key is pressed, use accel to accelerate in that direction (so you just do something like player.velocity.x += ACCEL if say the D key was pressed,), then each tick you add the velocity to the camera vector, so Camera.x += velocity.x and camera.y += velocity.y.

An example of this lazy set up from my 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  
33  
34  
35  
public void doPlayerMovement(){
      if(Gdx.input.isKeyPressed(Keys.A)){
         if(player.xvel > -MAX_X_VEL){
            player.xvel -= accel;
         }
      }else if(Gdx.input.isKeyPressed(Keys.D)){
         if(player.xvel < MAX_X_VEL){
            player.xvel += accel;
         }
      }else{
         if(player.xvel < 0 && player.xvel < -friction){
            player.xvel += friction;
         }else if(player.xvel > 0 && player.xvel > friction){
            player.xvel -= friction;
         }else if(player.xvel < friction && player.xvel > 0){
            player.xvel = 0;
         }else if(player.xvel > -friction && player.xvel < 0){
            player.xvel = 0;
         }
      }
      if(Gdx.input.isKeyPressed(Keys.W) && grounded){
         player.yvel += 4;
         grounded = false;
      }else if(Gdx.input.isKeyPressed(Keys.W) && (touchingRight||touchingLeft) && jumpable && !grounded && player.yvel <= 2){
         player.yvel += 2;
         jumpable = false;
      }
      if(Gdx.input.isKeyPressed(Keys.S) && grounded){
         player.rect.height = 30;
      }else{
         player.rect.height = 60;
      }
      collisionChecks();
      handleJump();
   }


Mine doesn't use a vector, it uses individual floats, but a vector is better (probably). I use S to crouch and W to jump, I just add velocity for my jump, it isn't programmed any differently from my actual movement. Also, I am not moving the camera, so you would need to adjust for that, but it's very similar in set up.
21  Discussions / Miscellaneous Topics / Re: Watching anime on: 2014-03-28 12:14:05
Yeah, sometimes subs are just blatantly wrong.

As for the nakama thing, that is specifically because it's a very difficult word to properly translate. Say luffy goes in to fight Buggy the clown, and as he's about to start fighting he says something like "I'm gonna beat the hell out of you for what you did to my nakama"(This would more likely be something like 俺の仲間のためにこいつふきとばしてやる, which translates better to "I'm going to blow you away for my nakama/for the sake of my nakama"). In this sort of case, it'd be really hard to tell what he means by that, does he mean his crew or his friends, or his allies? It's really just dependent on how you want to translate it. (Unless you're a native speaker, then it might be more clear, I don't know)

Again, I am not a fluent speaker, nor do I spend enough time speaking the language to guarantee that this is an accurate sentence in the parentheses, or an accurate descriptor, but as I understand the language, this is how it seems.
22  Discussions / Miscellaneous Topics / Re: Watching anime on: 2014-03-28 11:58:23
As someone who speaks Japanese barely well enough to watch without subs (I prefer subs so I can make sure my translations are correct, but I often ignore them), I don't have the awkwardness issue that you might have when watching, the voices and stuff just make sense. However, I still think subs are a good thing. They only really detract from the show if you're fully fluent most likely, being that I'm still learning, I like having them, and think they add to my experience in that I can keep track of whats going on even if I don't understand a word or two, or if they speak too fast. The few times I have watched without subs I've spent a lot more time missing what is going on because I'm trying to remember what was said than I would with subs, because again, I don't understand every single word. (Although a lot of the words used in Anime are pretty easy to understand, as they're straight forward dialogue generally, but many plot devices and stuff aren't, just regular dialogue.)

So yeah, it depends on how well the person speaks the language most likely.

But on another note, sometimes translations aren't 100% accurate, or lose some of the flavor, so I feel like with subs even I get more out of the dialogue than someone who doesn't speak the language, because I can understand things that are intentionally not translated. Like in your case, you're watching One Piece as you said, and in One Piece they use the word "Nakama" untranslated sometimes (or at least the translation team I watched did) and in the show it can take on many different meanings, from crewmate, to friend, to ally, this is something that isn't clear to non-speakers or even non-native speakers. That said, I don't always know which type of nakama would be the best in these cases, as it's a word that has a lot of meanings to it in context.

But again, I am not a be all end all source on the language or culture, as I only speak it at an intermediate level, rather than being brand new or fluent. Finding both of those perspectives might be harder, but possibly more valuable on this topic.
23  Games Center / Android Showcase / Re: Onigiri Escape on: 2014-03-28 11:35:33
Yeah, I figured you were just bringing it up, but I just wanted to clarify. I gotta put my Japanese to use sometime.
24  Games Center / Android Showcase / Re: Onigiri Escape on: 2014-03-28 11:26:44
Oni can mean demon, giri can mean to cut. 鬼切

However, that's not generally what it means. Generally speaking it's おにぎり(onigiri/お握り) which just refers to お結び(omusubi) or rice balls.

In the case of rice balls, it means o/お as an a politeness thing, you just add it to words, and nigiri/握り as in to form with the hands. (which is why there is such thing as "nigiri sushi" or hand rolled sushi, which is 握り寿司(nigirizushi) in japanese)

So yeah, generally speaking it'll be referring to rice balls, but it could refer to a demon blade/demon slash type of thing. But that'd be the exception, not the norm.
25  Game Development / Newbie & Debugging Questions / Re: Moving something on an angle. on: 2013-12-12 04:33:32
Snip

Learn something new everyday. Totally forgot about slope being bad for cases where you need to cover all the possibilities, because ya know, slope can be undefined after all. Did not know that cosine and sine were so useful for that either.
26  Game Development / Newbie & Debugging Questions / Re: Moving something on an angle. on: 2013-12-12 04:12:21
you're setting X twice, but not ever setting Y. That'd be the inaccuracy.
27  Game Development / Newbie & Debugging Questions / Re: How to get the tiles around a player for collision detection? on: 2013-12-12 03:26:20
An AABB is a rectangle. The actual collision isn't what was even important, as all you need to know is how I choose which rectangles to check for collision.
28  Game Development / Newbie & Debugging Questions / Re: Moving something on an angle. on: 2013-12-12 03:23:38
Use rise over run. Slope is OP.
((mouse y - player y) / (mouse x - player x))
Bam, you have the slope the bullet needs to move at, now for every 1 x you move, you move slope * 1 y.
29  Game Development / Newbie & Debugging Questions / Re: How to get the tiles around a player for collision detection? on: 2013-12-12 03:20:44
This is my Array based collision code. It's not as good as it could be though.
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  
   public void playerMoveLeft(int x){
      for(int h = 0; h < x; h++){
         if(playerRect.x > 1){
         playerRect.x--;
         }else return;
            for(int i = (int)(playerRect.y / 64 - 1);i <= playerRect.y/64 + 1; i++){
               if(playerRect.overlaps(tileRect[(int) (playerRect.x/64)][i].rect)){
                  playerRect.x++;
                  return;
               }
            }
      }
   }
   public void playerMoveRight(int x){
      for(int h = 0; h < x; h++){
         if(playerRect.x < 64 * (mx - 2)){
            playerRect.x++;
            }else return;
            for(int i = (int)(playerRect.y / 64 - 1);i <= playerRect.y/64 + 1; i++){
               if(playerRect.overlaps(tileRect[(int) (playerRect.x/64 + 1)][i].rect)){
                  playerRect.x--;
                  return;
               }
            }
      }
   }
   public void playerFall(int y){
      for(int h = 0; h < y; h++){
         if(playerRect.y > 1){
         playerRect.y--;
         }else{
            reset();
            return;
         }
         for(int i = (int)(playerRect.x / 64 - 1);i <= playerRect.x/64 + 1; i++){
            if(playerRect.overlaps(tileRect[i][(int) (playerRect.y/64)].rect)){
               playerRect.y++;
               grounded = true;
               return;
            }
         }
      }
   }
   public void playerJump(int y){
      for(int h = 0; h < y; h++){
         if(playerRect.y < 64 * (my - 2)){
            playerRect.y++;
            }else return;
         for(int i = (int)(playerRect.x / 64 - 1);i <= playerRect.x/64 + 1; i++){
            if(playerRect.overlaps(tileRect[i][(int) (playerRect.y/64 + 1)].rect)){
               playerRect.y--;
               return;
            }
         }
      }
   }


It's split up because that's just how I roll.
30  Games Center / WIP games, tools & toy projects / Re: Headline Benchmark on: 2013-12-11 23:27:23
Oh well, you'll get em next time champ  Tongue

I just thought it'd be a bit plain without something in the background, I can change the color if purple isn't your style Tongue
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 (37 views)
2014-09-24 16:13:29

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

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

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

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

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

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

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

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

BurntPizza (52 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!