Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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  Game Development / Newbie & Debugging Questions / Re: Question about TileMap and Tiled on: 2013-04-26 23:58:37
I think he wants the game to scale, but not stretch. If so, I think that this is a solution.
2  Game Development / Newbie & Debugging Questions / Re: LibGDX - implements ApplicationListener or Extends Game? on: 2013-04-12 05:25:45
Pretty much, but it implements ApplicationListener itself. Game is basically just a Helper class to be used with the Screen interface. This is an easy way to set up multiple screens, like a menu screen, a options screen, the actual gameplay screen, etc.

Exact implementation is here.
3  Game Development / Newbie & Debugging Questions / Re: LibGDX - implements ApplicationListener or Extends Game? on: 2013-04-12 05:04:11
Game is an abstract class that implements ApplicationListener, so you do not have to implement ApplicationListener yourself.
4  Discussions / General Discussions / Re: Managing gamestates and entities, singletons on: 2013-04-08 23:54:24
I don't know if singletons are the way to go, and certainly aren't the simplest way, but I am using singletons myself. I handle this similar to a way minecraft handles blocks. However, unlike minecraft, I use two classes; an Entity class, which holds information, and an Abstract Controller class, which does the logic.

The abstract Controller has a few static variables/functions. Here is the basic code:
1  
2  
3  
4  
5  
6  
private static Controller[] controllers = new Controller[128];

public static Controller getController(int id) {
    if(id<0 || id>controllers.length) return null;
    return controllers[id];
}

This is where minecraft stops, and where minecraft gets block/item ids (assuming you've played enough minecraft to know that).

I take it a bit further. To increase compatibility/readability, I include a static HashMap:
1  
2  
3  
4  
5  
6  
private static HashMap<String, Integer> names = new HashMap<String, Integer>();

public static Controller getController(String name) {
    if(names.containsKey(name)) return getController(names.get(name));
    return null;
}


Next, we need to make a few controllers, but first they need a way to be added to the list. So in our abstract class, add in the following constructor/variables:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public final int id;
public final String name;
public Controller(String name) {
    for(int index=0; index<controllers.length; index++) {
   if(controllers[index]==null) {
       controllers[index] = controller;
       names.put(name, index);
       id = index;
            this.name = name;
        }
    }
}


Now, anytime we make one of our singleton controllers, it will be kept in our array of controllers. The last things to do are make something for the controllers to act on, and make the controllers act on it. I handled this by first making an entity class that has its controllers id:
1  
2  
3  
public class Entity {
    public int controllerId;
}


Then I made an update function in the Controller class:
1  
2  
3  
public void update(Entity entity) {
    //do stuff
}


And an update function in the Entity class:
1  
2  
3  
public void update() {
    Controller.getController(controllerId).update(this);
}


And that is about all for basic singleton Controllers. Of course, you will have to add in more, like an x and y to the Entity class, but I think you can figure that out yourself.   Cheesy
5  Game Development / Performance Tuning / Re: Speeding up Minecraft? on: 2013-03-30 22:02:44
Perhaps it has something to do with your graphics cards drivers?
6  Game Development / Newbie & Debugging Questions / Re: Implementing modding for games on: 2013-03-14 20:22:55
I don't know it is the best library to use, but JSPF is a pretty simple.
7  Game Development / Newbie & Debugging Questions / Re: how many bytes I have to skip to be at the music payload in vorbis ogg files? on: 2013-03-14 00:34:11
I would guess not to store the levels, but to let the player choose a piece of music that they want to generate a level with. Is that it?
8  Java Game APIs & Engines / Java 2D / Re: Realtime raytracing experiments in pure Java on: 2013-01-13 02:00:01
I get 5 FPS... My computer certainly isn't the most powerful thing out there, that's for sure.
9  Discussions / Miscellaneous Topics / Re: Free "Source" Steam Game For you?! on: 2012-12-24 17:57:56
I challenge countererp to " ? ? ?" Wink

@Gjaller: I want to try DotA2, not sure if I would play it for that long though mind you.
10  Games Center / 4K Game Competition - 2013 / Re: Galactic Conquest 4K - II on: 2012-12-21 16:48:18
Loved the game! However, the game was laggy from the beginning... I think it's just my computer...
11  Game Development / Newbie & Debugging Questions / libGdx - skins on: 2012-12-21 05:15:33
I recently updated my libGdx version from 0.9.6 to 0.9.7. Right now I cannot find out how to use the new skin system. I followed their tutorial from their website as well, but even then it did work.

The error I got.
uiskin.json
Test.java

The error always shows up and I cannot figure out why. Am I missing something obvious here?
12  Game Development / Game Play & Game Design / Re: Game Engine library development on: 2012-12-09 04:51:41
(if I knew how to read a Minecraft save file that is Wink)

Base of everything mincraft save file:
NBT format
 persecutioncomplex
[/offtopic]
13  Discussions / Miscellaneous Topics / Re: Linux and Dev? on: 2012-12-08 01:05:55
I use ubuntu with no dual boot. It works fine for the games I want to play (minecraft), and any other games I can go without.

As a development environment, I haven't seen any hiccups.

I did have to follow a bunch of tutorials to get applets working though, :/. It took a few more to get the applet console up.
14  Discussions / Miscellaneous Topics / Re: What's your favorite game. on: 2012-11-10 07:44:20
As of now: Minecraft.
15  Discussions / General Discussions / Re: Game Maker and similar tools on: 2012-11-10 06:55:57
I used to use Game Maker, and I can say, I loved it. I had no clue how to do any programming, and I mean, I couldn't even understand LUA (on roblox). So when I found Game Maker it helped me learn how to program.

Now, since I have started using Java, I feel that GameMaker is very limiting. I don't want to use it for my main tool. However, it does make it take a much shorter time to finish a game using Game Maker. For example, My brother made a game in one day using game maker, and it took me an entire week to get my own java port working.

Game Maker can be very powerful for different reasons than java can, but you need to know how to use it.
16  Discussions / General Discussions / Re: Managing Relationships on: 2012-10-13 22:58:27
Thats what I meant by I backed up my code. Sorry for not being clear.
17  Discussions / General Discussions / Re: Managing Relationships on: 2012-10-13 22:51:44
Ok. Well, my code is backed up just In case I decide the old code was better. But I feel like my old way of doing things was sloppy. The new class is going to be a manager. It's main purpose is to bind together the core parts of the game, and allow other classes to access core information easily. For example, the manager will allow class to get the player entity, or get the block at a certain position.

Also, I like to simplify everything. I try to have the least amount of classes and and the greatest amount of flexibility.
18  Discussions / General Discussions / Managing Relationships on: 2012-10-13 06:29:08
So I'm making game, and all of a sudden I want to refactor. So, I start refactoring, and these refactors are a key part of the game's structure. Having deleted the old classes and preparing for a new Manager class that was missing before, I hit a roadblock. I have 3 (maybe four) main class types. I have Blocks, Entities, Items, and Script(s). This Manager class will be awesome, but I have to understand one thing first:

How do my types relate? Or: How do I want my types to relate?

I'm not exactly sure where to go with this. I want to design something that is flexible, but without unnecessary coding. I'm not sure how to visualize this, but I get the idea that a flowchart would be a good medium.

Anyways, how do you guys do it? Do you just jump in and program it? Or do you plan it out?
19  Game Development / Newbie & Debugging Questions / Re: Threads hanging themselves. on: 2012-10-13 01:51:39
Have you tried removing the randoms?
20  Games Center / WIP games, tools & toy projects / Re: WIP: Play the Alpha version of Yildiz-Online on: 2012-10-13 01:43:07
(DISCLAIMER: I am not an expert. Anything I say has liability to be completely wrong.)

Looks much better than I could do. One thing I will say though: Controls are important. If I can't control something on the small scale, I will almost always fall to the enemies. Also, although this game is 3d, do remember that most controls that we have are 2d, and a player will prefer to think of an RTS this way. One last thing:
Don't add too much Physics. Basically, don't allow the player to completely disorientate themselves. It get's very confusing that way. Add in a way for them to have a fixed direction, whether is be up, left, or towards the enemy, don't let them get lost.
21  Games Center / WIP games, tools & toy projects / Re: WIP: Play the Alpha version of Yildiz-Online on: 2012-10-12 23:05:41
It looks ok. It would be useful if you posted links, and much appreciated if you posted screenshots.
22  Games Center / WIP games, tools & toy projects / Re: [Tool] DOPE on: 2012-09-17 23:19:45
This looks interesting. Are you planning on releasing it for testing or something like that?
23  Discussions / Miscellaneous Topics / Re: Playing "The Walls" in Minecraft right now on: 2012-09-02 00:54:43
I joined. I was terrible at the game. At the end I had a 5x5 floating island in the sky with nothing useful. PvP is not my strong point.
24  Discussions / Miscellaneous Topics / Re: Playing "The Walls" in Minecraft right now on: 2012-09-01 22:07:48
Looks interesting! I'm not very good at maps like that though, so I probably wouldn't play.
25  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Making a custom game engine vs libGDX on: 2012-08-29 04:25:58
They are actually decaprecating the JOGL backend. I think it's because LWJGL gives you the ability to ship as an applet.
26  Discussions / General Discussions / Re: Not A Game! on: 2012-08-11 00:57:22
I think the best rpgs would have to be the ones that fit this music:

http://www.youtube.com/watch?v=wBzqOa9y02I
27  Games Center / WIP games, tools & toy projects / Re: Pink Point on: 2012-08-10 23:52:09
That game looks awesome! I liked the visual effects, although it looked like the blackness might get intrusive. Of course, if it is an action game, planning wouldn't be a problem.
28  Discussions / General Discussions / Re: What's your dev rig? on: 2012-08-06 04:28:54
I wanted to update my post. I just got a second monitor Cheesy



Same specs as my earlier post, but now with 2 24" 1920x1080 Viewsonic VX2453 monitors Smiley

I'm not sure if I'm more jealous of the computer or the trees in he background... Your place looks way more homely then where I work.
29  Game Development / Game Mechanics / libGdx, native error? on: 2012-07-03 05:56:45
I seem to get native code errors a lot when using libGdx, and they seem to be random. I'm not sure what causes them, but here is a pastebin of the log:

http://pastebin.java-gaming.org/54a6b9d341c
30  Game Development / Newbie & Debugging Questions / Re: y = m_1 * x + c_1? on: 2012-06-22 04:54:08
Isn't the distance formula this?
1  
distance = sqrt( (x2-x1)^2 + (y2-y1)^2)


Because I'm pretty sure that y=mx+b is a linear equation. (not sure on exact terminology)
Pages: [1] 2 3
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (87 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (112 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (185 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.174 seconds with 20 queries.