Recent posts by strumpetdreams on Kongregate

Flag Post

Topic: Game Programming / A question for Java programmers

You get to specify, but they are usually relative from the root directory of the executable (i.e.: the same directory as the .class being run, the .jar, or where the java command was called from). I believe there is a way to stash it into a user’s home directory in a clever way, depending on the OS. That would require some googling.

Though I strongly recommend picking up skills like hibernate or serialization anyway, eventually. _

 
Flag Post

Topic: Game Programming / A question for Java programmers

Save to file and you yourself decide on a way to interpret the data upon reading the file.

e.g.:
Scanner s = new Scanner(new File(“savedata.txt”));
int numRobots = s.nextInt();

 
Flag Post

Topic: Game Programming / A question for Java programmers

Serialization would probably be easiest. It’s surprisingly not difficult.
http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html

 
Flag Post

Topic: Game Programming / Handling Socket Communication?

Hey guise,

I’m building a basic game using sockets & threads. Yeah. Really simple. _;

But I want it to be abstract.

I want the client to be able to ask about the game world (multiple maps) and get a perfect state for it at that moment, as well as to be able to push changes (e.g.: move my entity, attack a bush, whatev).

I’m stumped though on what sort of data to send through the socket. What is standard for multiplayer games? Serialized objects? A string header declaring an object followed by its attributes?

 
Flag Post

Topic: Game Programming / How do YOU program 2D overhead motion?

Topic says it all.

I program in Java.
I gave entities a motion component, where motion is an interface requiring the implementation of handling move objects (collecting them and creating a vector-sum) and actually moving when requested (actually make the jump to the end of the vector, tick, see below).

Entities have a tick method which handles routine actions for each “tick” of the gameclock, such as deciding their next action (be it move or attack or both) and handling such actions.

Motion is also “ticked” each round, considering that even by not moving, the object is in motion (just not changing location).

How have you implemented motion?

 
Flag Post

Topic: Game Programming / Circular hitbox Vs Tiles

That’s right. I’m trying to use a circular hit box in a semi-tile based game (engine).

Entities are not bound to tiles, but move across pixels at a provided speed. However, an entity is not (supposed to be) allowed to traverse a tile which is considered a wall.

Considering that Tiles are rectangular and entities have a circular hit box, this sort of math is getting me kind of down. Does anyone have any advice on this particular problem? Has anyone tackled it before?

Or maybe are there any other resources that could be suggested? I’m willing to do research, I just know that this doesn’t have to be as difficult as I seem to be making it.

 
Flag Post

Topic: Game Programming / Why it pays to make games for Kongregate.

Is there any way we could roughly see the quality of these games, just to get an idea of how much a given game goes for?

 
Flag Post

Topic: Game Programming / Java tutorials?

Honestly? If you’re serious, send me a message and we’ll do a little bit of discussing. If you’re serious and I can see it, I’ll teach you.

 
Flag Post

Topic: Game Programming / [Java] Trying to speed up execution

Simple once you find it, really.
I had a camera object, responsible for handling and rendering all of the sprites of the visible objects within its view.
Camera had an arraylist of sprites.
Each tick of the game heart-beat, all of the visible sprites were being added.

Made perfect sense until I realized that I never emptied out the arraylist for the next frame.
FPS problem resolved.
Java still maintains ridiculous performance despite haters.
:D

 
Flag Post

Topic: Game Programming / So I want to learn C#

Hmm. Honestly, switching to Java and trying to build basically anything complex will require that you start learning OOP very quickly. OOP isn’t very complicated, you just need to be mindful of when it’s best to have multiple instances, and be aware of a hierarchical classing system.

 
Flag Post

Topic: Game Programming / Which Program Do You Use?

Eclipse. If you haven’t heard of it, look into it.

 
Flag Post

Topic: Game Programming / [Java] Trying to speed up execution

I’m programming a basic 2d game engine in Java. All has gone well as far as (over-)abstraction, but now that I’m getting kind of heavy with it, performance is taking quite the plunge.

FPS begins to drop drastically anywhere after 10 seconds of running, and repainting becomes almost painful to watch. What can I do to improve this?