Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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
1  Discussions / General Discussions / Re: Publishing my game on: 2014-04-18 23: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.
2  Discussions / General Discussions / Re: Publishing my game on: 2014-04-18 23: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.
3  Games Center / Showcase / Re: Groundskeeper 2 on: 2014-04-10 05:58:26
I think the trick is not recording from a mobile device, but rather your desktop/dev build.
4  Game Development / Game Play & Game Design / Re: Making tiles have collision detection on sprite sheets on: 2014-04-02 02: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.
5  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-31 15: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?)
6  Game Development / Newbie & Debugging Questions / Re: Ship Building Games? on: 2014-03-28 13: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.
7  Game Development / Newbie & Debugging Questions / Re: Upgrading movement to use acceleration / deceleration, rather than static values on: 2014-03-28 13: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.
8  Discussions / Miscellaneous Topics / Re: Watching anime on: 2014-03-28 13: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.
9  Discussions / Miscellaneous Topics / Re: Watching anime on: 2014-03-28 12: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.
10  Games Center / Showcase / Re: Onigiri Escape on: 2014-03-28 12: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.
11  Games Center / Showcase / Re: Onigiri Escape on: 2014-03-28 12: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.
12  Game Development / Newbie & Debugging Questions / Re: Moving something on an angle. on: 2013-12-12 05: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.
13  Game Development / Newbie & Debugging Questions / Re: Moving something on an angle. on: 2013-12-12 05:12:21
you're setting X twice, but not ever setting Y. That'd be the inaccuracy.
14  Game Development / Newbie & Debugging Questions / Re: How to get the tiles around a player for collision detection? on: 2013-12-12 04: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.
15  Game Development / Newbie & Debugging Questions / Re: Moving something on an angle. on: 2013-12-12 04: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.
16  Game Development / Newbie & Debugging Questions / Re: How to get the tiles around a player for collision detection? on: 2013-12-12 04: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.
17  Games Center / WIP games, tools & toy projects / Re: Headline Benchmark on: 2013-12-12 00: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
18  Java Game APIs & Engines / OpenGL Development / Re: Sprites and Tiles on: 2013-12-11 05:21:32
That's the sort of situation where you put the tree on the same spritesheet as the player. It's a single sprite, so it's easy to put on the sprite sheet.
19  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-11 05:00:30
Meh, I just did it on paper and was like oh dur. You're welcome, good luck with your program.
20  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-11 04:52:58
1  
2  
3  
4  
5  
6  
7  
8  
float xOffset = (Gdx.graphics.getWidth() / 2) - (Player.getX() + (Player.getWidth() / 2));
      float yOffset =  (Gdx.graphics.getHeight() / 2)  - (Player.getY() + (Player.getHeight() / 2));
      float mouseX = Gdx.input.getX() + xOffset;
      float mouseY = (Gdx.graphics.getHeight() - Gdx.input.getY()) + yOffset;
     
      float radiansToMouse = (float) Math.atan2(mouseX -  (Gdx.graphics.getWidth() / 2) ,  (Gdx.graphics.getHeight() / 2)  - mouseY);
         float degreesToMouse = 57.2957795f*radiansToMouse;
         Player.setRotation(degreesToMouse - 90);


This works for wherever the player is.
21  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-11 04:05:35
Well your sprite center is wrong, which might be causing it. You're just giving the sprites dimensions, not it's position. You missed a step in there. You need to return Vector2(playerSprite.x + width / 2, playerSprite.y + height / 2), otherwise you're just returning a vector with coordinates of half your width and height of your sprite, likely 32x32.

both your code used for rotation and mine work for me, assuming the player is in the center of the screen. I'll try it for other positions.

Alright, the issue is the mouse position is relative to the position inside of the window, not based on the sprite location. You have to make the mouse give you it's position relative to the sprite location. I'll try to figure out how to go about this.
22  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-11 00:56:52
Alright here it is:
setRotation(360 - (float) ((Math.toDegrees( Math.atan2(mouse.x - origin.x, origin.y - mouse.y) ) + 360.0) % 360.0) + 90);

Origin is the middle of your camera. My camera is at 0,0 and it's 800 x 800, so my origin is 400,400. Mouse and origin are both vector2 objects.
23  Games Center / WIP games, tools & toy projects / Re: Headline Benchmark on: 2013-12-11 00:37:55
like this?
24  Java Game APIs & Engines / OpenGL Development / Re: Sprites and Tiles on: 2013-12-11 00:08:28
Why would you need to change the texture 10-20 times per frame?
25  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-10 23:52:11
I'll try it then. I'll post up if i figure it out. In the mean time, if anyone around here already knows how to do this... cough cough. No seriously, just post it, that'd be cool.
26  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-10 14:05:29
I dunno, google is your friend.

I've never done vector math. I would need to know more about how vectors are defined to be able to provide you an example. There's most definitely an easier way to find out, I just don't know it. I guess you could make a right triangle with your mouse coordinate and the center of the screen, and then do some trig. I haven't taken math in quite awhile. Sorry, best I can do is give you the formula, I can't teach something I don't understand myself.


EDIT: Apparently there's an easier way. Using this formula: Math.toDegrees( Math.atan2(fromLeft - originfromLeft, originFromTop - fromTop) ) + 360.0) % 360.0
You may need to change this a bit, I dunno. I will keep looking around, I might explore how it works later as well, I haven't need angles yet. I'll try setting up an example for myself to see if it works tomorrow if you can't get it to work. I'd do it now, but I need sleep.
27  Discussions / General Discussions / Re: Simple Regristration Pradiciment on: 2013-12-10 12:23:57
I actually forgot this was even a thing when registering, because it wasn't something that kept me from joining, nor did it really bother me when I did it.
28  Game Development / Newbie & Debugging Questions / Re: Rotation following the mouse on: 2013-12-10 12:21:21
http://www.wikihow.com/Find-the-Angle-Between-Two-Vectors

Make one vector originating from origin upward at 0 degrees. Get vector from origin -> mouse. Calculate.
29  Java Game APIs & Engines / OpenGL Development / Re: Sprites and Tiles on: 2013-12-10 07:41:30
You can render in whatever order you want, but from what it looks like, you would want to sort your renders by y value, so that the player can be rendered before the rock if it's below it. Otherwise the player will be partially behind the rock, despite being meant to be in front of it. Also, I don't understand what you mean by interact, any environmental interactions should be handled through collision, which you'd have to write yourself, rendering only puts things on the screen.

That said, things will be drawn to the screen in the order that they are rendered, so if you say, draw the ground after the player, the player will be invisible, because the ground will be in front of him, so you want to render your top most elements last, such as GUI. In your case, I would look into setting up an array of sprites to hold which texture they each need to render from, so that you can sort them all by their y position, then render them with their proper textures, in an order that works.
30  Game Development / Newbie & Debugging Questions / Re: My unit teleports instead of moves, A*PathFinder Slick2d on: 2013-12-10 03:45:23
There are two ways to slow the movement, either 1) Make your movement increments smaller or 2) Make a timer of some sort to handle the event. I recommend just using a byte/short here and just moving once every few frames. This means you'll need to do something like this:
1  
2  
3  
4  
5  
6  
7  
short moveFrame;
if(moveFrame < 255){
moveFrame++;
}else{
move();
moveFrame = 0;
}


Those are the ways I would do it based on glancing at your code momentarily.
Pages: [1] 2 3
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (63 views)
2014-04-15 18:08:23

BurntPizza (61 views)
2014-04-15 03:46:01

UprightPath (74 views)
2014-04-14 17:39:50

UprightPath (57 views)
2014-04-14 17:35:47

Porlus (75 views)
2014-04-14 15:48:38

tom_mai78101 (100 views)
2014-04-10 04:04:31

BurntPizza (160 views)
2014-04-08 23:06:04

tom_mai78101 (255 views)
2014-04-05 13:34:39

trollwarrior1 (208 views)
2014-04-04 12:06:45

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!