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 ... 46
1  Discussions / Business and Project Management Discussions / Re: Starting a small dev company on: 2014-10-01 01:17:07
Then probably the easiest is have one of you be the "owner" and pay the other "salary."
Make sure you report taxes etc. as applicable too.

https://www.google.com/#q=how%20to%20split%20profit%20in%20a%20partnership


EDIT: keep in mind I know almost nothing about business. Do your own research, etc.
2  Discussions / Business and Project Management Discussions / Re: Starting a small dev company on: 2014-10-01 01:06:42
If you don't have this figured out, or know how to figure it out yourselves, I'll advise you take a step back if you're planning on starting an actual company. (EDIT: your profile says you're 14. Can you do this legally?)
It also depends (quite a bit) on the type of company: http://www.bizfilings.com/learn/compare-company-types.aspx
3  Discussions / Miscellaneous Topics / Re: Java won't let me time travel on: 2014-09-30 20:30:25
I don't recall them having to drive backwards...


Although this is driving straight into the maw of The Monster.
4  Game Development / Newbie & Debugging Questions / Re: LibGDX - FreeTypeFont Centering on: 2014-09-30 19:40:41
1  
2  
3  
4  
5  
6  
7  
BitmapFont font;
String s;

float width = f.getBounds(s).width;

// center text horizontally at (x,y)
draw(s, x - width / 2,  y); // something like this


Alternatively experiment with
drawWrapped(Batch batch, java.lang.CharSequence str, float x, float y, float wrapWidth, BitmapFont.HAlignment alignment)
and just set wrap width high enough. This is in http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/BitmapFont.html

Or if you're using a monospaced font you can pad with spaces like you did in the OP. That's a giant hack though.
5  Game Development / Newbie & Debugging Questions / Re: Double becomes infinity on: 2014-09-30 12:24:08
System.out.println(Math.exp(80000));


Quote
Infinity

There's your problem. e80000
6  Game Development / Newbie & Debugging Questions / Re: Boolean Methods in Libgdx InputProcessor and GestureListener on: 2014-09-30 04:14:57
It's for when you stack processors (via a multiplexer), if a listener returns true, then the event is "consumed" and no more listeners will hear of it. This is useful when in GUIs, if you don't want an event to propagate all the way through layered gui components, but be absorbed by the top-most one (that you clicked on or whatever).

http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/InputMultiplexer.html
Lower-level analogue: setBubbles() in http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Event.html
7  Game Development / Newbie & Debugging Questions / Re: Android Studio or that sexy LibGDX? on: 2014-09-28 05:08:55
Interesting, I've never had a problem, always a few clicks and then I'm down to business. That may be because I don't try to integrate Android, which usually finds a way to mess with things.
8  Game Development / Newbie & Debugging Questions / Re: Android Studio or that sexy LibGDX? on: 2014-09-28 04:49:12
I think that's a fairly unfair reason to hate the whole thing. (Unless you're just being melodramatic Tongue)
9  Game Development / Newbie & Debugging Questions / Re: Storing and getting bounding boxes. on: 2014-09-27 21:08:46
That just seems really inefficient to me

Don't fix it if it isn't broken.

That said, something like a HashMap<Point, BoundingBox> might work, your problem description is pretty vague.
There are also more advanced things like R-trees.
10  Game Development / Newbie & Debugging Questions / Re: LibGDX - How to achieve movement trail effects on: 2014-09-27 17:17:02
Either use a semi-transparent color to clear the screen with each frame, or draw multiple duplicate sprites of progressively darkening colors behind a moving sprite.
11  Game Development / Newbie & Debugging Questions / Re: New Member Trying to Choose a Path on: 2014-09-27 02:58:09
Now it's "wtf are monads?"  Pointing


But I'm laughing as I have a friend who comes to me for help is on his second year studying CS and he couldn't even implement a class :/. again I repeat his second year taking CSC and he's already on a 200 level course, but he doesn't understand how to implement classes. He din't know what overloaded methods meant, etc. How he got there, I don't know??

Friends often tell me when they get to an internship everything will be taught while they are being paid. I can't understand why people have this type of mentality.

I'm a CS major, I feel you, esp. having a 5 year or so head start on most of the people in class. Can be a bit weird at times.
I recommend against going into a job not knowing anything, not knowing job specific skills/duties is fine, but actually being willfully incompetent is never a great idea.
12  Game Development / Newbie & Debugging Questions / Re: New Member Trying to Choose a Path on: 2014-09-27 02:28:25
I initially came from javascript (the horror), I knew I needed something better but was stopped for a bit at "wtf are classes"
13  Game Development / Newbie & Debugging Questions / Re: Slow Thread for loading on: 2014-09-27 02:01:24
So precalculate data that will be used to generate a VBO? If it's actually a problem, sure. Just know that the fastest way to introduce bugs into a program is to add concurrency.
14  Game Development / Newbie & Debugging Questions / Re: Slow Thread for loading on: 2014-09-27 01:54:05
First explain what you think you mean by "load items to used by the program," this can mean a few quite different things.
15  Game Development / Newbie & Debugging Questions / Re: LibGDX - What is the best way to handle menu touch input? on: 2014-09-27 00:15:52
btn.addAction()
16  Game Development / Newbie & Debugging Questions / Re: LibGDX - What is the best way to handle menu touch input? on: 2014-09-27 00:09:05
Check each frame?
btnPlay.isPressed()
17  Game Development / Newbie & Debugging Questions / Re: LibGDX - What is the best way to handle menu touch input? on: 2014-09-27 00:05:26
Might use moveTo instead of moveBy then, and specify an absolute position, instead of a relative one.
18  Games Center / WIP games, tools & toy projects / Re: [Slick2D] JavaRA - Command&Conquer: Red Alert with taste of Java on: 2014-09-27 00:04:01
If you're still on the case of path finding, might take a look at jump point search. If you have an 8-way unweighted grid (looks like it), it's often cited as an order of magnitude faster than A*.
19  Game Development / Newbie & Debugging Questions / Re: New Member Trying to Choose a Path on: 2014-09-26 23:57:51
Well, I guess I meant the best way to become a game programmer is to be a programmer first.
If you're good that's a bonus.
20  Game Development / Newbie & Debugging Questions / Re: New Member Trying to Choose a Path on: 2014-09-26 23:52:52
The best way to be a game programmer is to be a programmer.
21  Game Development / Newbie & Debugging Questions / Re: LibGDX - What is the best way to handle menu touch input? on: 2014-09-26 23:51:49
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.moveBy;

btnPlay.addListener(new ChangeListener() {
    public void changed (ChangeEvent event, Actor actor) {
        if (btnPlay.isPressed()) {
            // button has been pressed code here
           // e.g.
           table.addAction(moveBy(0, -10, .25f)); // move 10 pixels in a quarter second
       } else {
            // button released code here
           table.addAction(moveBy(0, 10, .25f));
        }
    }
});


Note this probably makes more sense with something like a toggle button.

22  Game Development / Newbie & Debugging Questions / Re: New Member Trying to Choose a Path on: 2014-09-26 23:45:16
Yeah, watch out for youtubers and internet tutorials in general I say, too easy to be looking at either woefully outdated or just plain bad tuts and not know it because you might not know what a good one would look like.

I was helping someone who had been following a YT series and was having problems with speed, lo and behold there was stuff like linked lists everywhere, being used in the exactly worst way possible. Tutorial maker obviously didn't know the first thing about basics like time complexity, code organization, etc, and was unfortunately fairly popular IIRC.
23  Game Development / Game Mechanics / Re: Detecting islands on a 2d map? on: 2014-09-26 14:10:40
Repeats in the queue, or in the result list?
There will be some repeats in the queue, but they will get taken care of by the !coords.contains()
There shoulbn't be any repeats in the result list.
Do you still have this edit?
24  Game Development / Game Mechanics / Re: Detecting islands on a 2d map? on: 2014-09-26 13:56:41
1  
2  
3  
public boolean equals(Coord c) {
    return c.x == x && c.y == y;
}


Whole point is that two Coord objects are equal if they have the same coords, no?


This could also be "fixed" (still implement equals though, for sanity) by not creating a new object each time to add to the coords list:
1  
2  
-coords.add(new Coord(c.x, c.y));
+coords.add(c);
25  Game Development / Game Mechanics / Re: Detecting islands on a 2d map? on: 2014-09-26 13:46:09
Derp, make sure you implement public boolean equals(Coord c) in class Coord. Look at awt.Point if you don't know how.
Without it, list.contains returns false every time. (Since you are only filling it with new objects, no two objects will compare as equal, even if they have the same coords!)

(This is why I advise using provided classes where possible, to minimize the change of doing something wrong)
26  Game Development / Game Mechanics / Re: Detecting islands on a 2d map? on: 2014-09-26 13:39:25
Try this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
if(c.x >= 0 && c.x < width && c.y >= 0 && c.y < height){
    //If coord that is being checked is a land tile and isn't already owned. Add it to the owned list.
   if(tileId[c.x][c.y] == 0 && !coords.contains(c))
   {
        coords.add(new Coord(c.x, c.y));
        //Add surrounding tiles to the checking queue.
       if(tileId[c.x - 1][c.y] == 0) queue.add(new Coord(c.x - 1, c.y));
        if(tileId[c.x + 1][c.y] == 0) queue.add(new Coord(c.x + 1, c.y));
        if(tileId[c.x][c.y - 1] == 0) queue.add(new Coord(c.x, c.y - 1));
        if(tileId[c.x][c.y + 1] == 0) queue.add(new Coord(c.x, c.y + 1));
   }
}
27  Discussions / General Discussions / Re: Why are people jerks? on: 2014-09-26 13:09:54
The people attacking others for 'being assholes' are assholes. Enough said.

- Jev

Hmm...

 (I probably agree, but phrasing Tongue)
28  Game Development / Newbie & Debugging Questions / Re: LibGDX - What is the best way to handle menu touch input? on: 2014-09-26 04:24:02
You can query input state like such:
Gdx.input.isTouched();
etc, but I recommend against that.
Use InputProcessor instead: https://github.com/libgdx/libgdx/wiki/Event-handling

Even better would be to have your gui components be Scene2D.ui Actors, in which case you can do this:
1  
2  
3  
4  
5  
actor.addListener(new ChangeListener() {
    public void changed (ChangeEvent event, Actor actor) {
        System.out.println("Changed!");
    }
});

As shown here: https://github.com/libgdx/libgdx/wiki/Scene2d.ui#changeevents

If you aren't leveraging Scene2D, you're using libGDX wrong IMO.
29  Game Development / Newbie & Debugging Questions / Re: How do I create a good play button in libGDX? on: 2014-09-25 12:08:23
If you're using libGDX, Actions would be best suited to timing gui events.
30  Game Development / Performance Tuning / Re: Fps drop when viewing chunks from different positions on: 2014-09-25 05:35:12
It's probably just that his graphics card is more powerful than yours.
Pages: [1] 2 3 ... 46
 

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!