Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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]
1  Games Center / WIP games, tools & toy projects / Re: Space on: 2013-02-08 11:13:05
Nice work with shaders.

But the FPS Meter is a bit weird... it shows the average of the total and something else?

Anyway, if you want to you can use a simple FPSMeter that I have wrote for my games.
It returns frames in last 1000ms (just like Fraps fps meter).
Usage:
FPSMeter fpsMeter = new FPSMeter();
fpsMeter.getFrames(); // returns fps (you need to call it, at least from time to time so the the fps list doesn't get too big)
fpsMeter.frame(); // call it at the end of frame
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
import java.util.LinkedList;

public class FPSMeter {

   LinkedList<Long> fps = new LinkedList<Long>();

   public void frame() {
      fps.add(System.currentTimeMillis());
   }

   public int getFrames() {
      while (fps.peek() <= (System.currentTimeMillis() - 999)) {
         fps.poll();
      }
      return fps.size();
   }
}
2  Discussions / General Discussions / Re: GrepCode: Browsing source code for open source Java projects on: 2013-01-04 06:10:24
Thanks,
I haven't seen it before.
Now I will finally be able to choose the right ones as I will be able to understand whats going on and why one is slower than the other.
3  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-31 21:23:14
As the competition will be over in less than 4 hours and I still haven't got an answer.
I will give you a hint.
Game will be split into 2 factions, one on those will be high-technology organic(red gear).
The logo also show the emblem of the other one.
4  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-31 08:09:18
I have just posted on my blog.
http://infernosstudio.com/johny/218/new-logo-and-new-years-surprise/
We have a new logo and a competition, as a reward you will get into Testers group.
(first tests will be starting in 2/3 weeks)
5  Game Development / Newbie & Debugging Questions / Re: creating classes based on enum on: 2012-12-27 03:30:20
Another way would be to allow the items to be copied.
And then storing items in array based on enum.

As you will probably want to save and load the equipment. You can use it to copy items.
All you will need to do is to add 1 function to the main item class that will take in item and return a copy of that item, by saving the item passed in to a buffer and then loading the new item from that buffer.

1  
2  
3  
4  
5  
6  
7  
8  
9  
public class Item{
   //make sure you have an empty constructor (without variables)
  Item (Item in){
      //check for null input here
     Item out = in.getClass().newInstance(); // you will need to catch exceptions here
     out.loadFromBuffer(in.saveToBuffer());
      return out;
   }
}
6  Games Center / Archived Projects / Re: MetaTech, Our Forum. on: 2012-12-25 22:56:36
Okay guys so our new forum is done. Start getting your accounts ! we need as much feed back as possible to make this game awesome.
 
http://metatechgame.com/forum/
Start a forum with only 1 board. Only create new boards when there is a need for it. Otherwise your forum will feel empty, which deters people from posting.

Over next few days I will be filling it in with content, I'm aware of the fact that it fells empty.
There are 2 boards that new users can post in General Discussion and Ideas which is split into Electricity, Liquids and Gases, Transport, Weapons and Tools to keep it grouped.
I already have lots of stuff on paper, but I will need to copy it over.
7  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-24 06:37:47
I guess if there's a tech tree you could just put chemistry after alchemy.  Otherwise, I recommend keeping it a game, not a taxonomy system.
 

I'm not creating a "taxonomy system", but 6-7 tiers of technology to group alike.
Making it simpler for the player to follow the game.
I already have a rough idea on how to split the tiers, name them and what should be included in those.
Alchemy will be part of end game technology, so I can not put it before chemistry.
I would really prefer to hear your ideas about what should be included.
Then if it is suitable, I have the possibly to add it in or create the engine is such way that it is easy to add.
8  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-24 06:05:22
Really, if you have magical alchemy, then just make it all alchemy.  It was the precursor to modern day chemistry anyway.  The profusion of categories for the sake of rigorous classification does nothing for fun.

Chemistry will be there from the very start.
Alchemy will be part of meta-science, as it didn't study pre-chemistry but beyond chemistry, it will be the end game stuff.
I'm sure transmutation is closer to Nuclear engineering than to chemistry.
And that elixir of life/immortality is closer to magic or technology we haven't researched yet.
I'm aware of the fact that gunpowder, dyes and other things were considered Alchemy.
But it is mainly related to because of elixir of life, transmutation and potion making.
I'm still not sure if it will be called alchemy in the game.
9  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-23 20:16:41
Add more chemistry stuff! And don't call it alchemy.

Chemistry and alchemy are 2 different things.
Alchemy is converting 1 metal into another by using Magic(“once you research magic it becomes technology”).
Both will be added.
10  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-23 17:48:20
You should pause the ideas taken from minecraft, and create some new stuff indeed Smiley
I know the tools are necessary, but minecarts / rails is a little to much.
Maybe add something like roads first.

Your other ideas are awsome, but he minecart system will be enough to get you a lot of angry fans Smiley.

The minecarts/rails where used just as one example of research.
Minecarts where not taken from Minecraft(Minecraft didn't invent minecarts), but there were first way to transport goods from mines.
We will have much more ways of transport that that.
Sorry for not releasing the research system info as I was in previous post, but the lighting system needed a rewrite and it took all my time.
The whole tech tree will be split into part:
-Primitive
-Mechanical (minecarts, gear based elevators...)
-Electric
-Electronic
-Future
-Meta/Magic
There will be more of them and there will be stuff from biology and chemistry in it.
11  Game Development / Newbie & Debugging Questions / Re: Ok Lets Get Started --- Where to Begin on: 2012-12-18 00:13:57
Tower defense game are really simple in 2d, a bit more complicated in 3d,
making them really good starting point.
If you are making tower defense game there is few things I can tell you.

It will be easiest to start with defined path instead of true path finding.
Placing the towers in designated areas it much simple than checking for collision between towers.

Checking for distance between the tower and enemy can be CPU consuming.
Easiest solution is to find first target within radius from a LinkedList.
(As they will be ordered by insertion time it should be the closest to target as well, making the towers attack the best target, or else you will have enemies with different speeds, then you will need to implement another type of search)

Make sure you will remove the projectile when it hits enemy or leaves the map, so that there is no memory leak.
Keep the collision checking to simple box or circle instead of per-pixel (consuming lots of CPU and harder to implement).

Good luck,
And make sure to PM me when you will have a demo.
(Also keeping backups of the source code is a great idea in case you will need to revert the code)
12  Game Development / Newbie & Debugging Questions / Re: Ok Lets Get Started --- Where to Begin on: 2012-12-17 23:39:15
When I started programming I quickly found out that for me the best way to learn is to see how other people did it(not copying, but understanding).

Messing around with open source stuff, trying to see how it works.
Disable function if you don't understand it and see what have changed.
Trying to break things and then fix them(look up the solutions to the problem in google, instead of restoring the old code).
Add another step into the loop, make it for example rotate the object or rotate the camera around the object.
Try to join 2 small opengl programs.

Regarding 2d and 3d, most people will say that you should start as simple as possible.
But there are few thing you should consider when choosing between 2d and 3d:
-Do you know enough maths to work with 3d? (or if you are good at maths you can pick it up quickly)
-Do you find it easier to create a set of 2d graphics or 3d models and textures?

2d most likely will be easier, but if you have enough maths and prefer 3d models go with 3d.
If you will start with 2d you will have better understanding of the maths behind collisions, rays and selecting, which is similar in 3d except for 1 extra dimension.

What type of game would you be aiming at?
(I wanted to start off a MORPG, which obviously failed, I got stuck at inventory management, it was working but I couldn't concentrate on anything else as I though there was something missing in it and eventually I gave up. The first working one was a simple tower defense game in 2d, followed by improved and rewritten sequel, which still was really simple)
13  Game Development / Newbie & Debugging Questions / Re: Opengl file read loop on: 2012-12-17 21:22:51
The code continue to read the image but never stops.
I want it to read that file only once
You will need to move
1  
2  
3  
            int[][] pix = new int[6][6];
           
            read_file(pix);

outside of the render function.
The best place to put it would be in the init function.
14  Game Development / Newbie & Debugging Questions / Re: Whats stopping people from changing code in the client application on: 2012-12-17 02:11:41
The best you can do is run as much as humanly possible on the server, and to obfuscate using JShrink or something.

It will only stop beginners from changing the code.
But the same thing goes for c++ or any other language (you can always change stuff in assembler), and there is no way to stop it.
And if you will be able to prevent that somehow, there are still things like packet sniffer and proxy to manipulate the data send and received.
The only reason to use JShrink(or the other ones) is to make the file smaller and optimize the code a small bit.
The best thing to do is to concentrate on server side security.
15  Game Development / Newbie & Debugging Questions / Re: LWJGL Static Light Source on: 2012-12-17 00:16:21
Hi, I am having trouble with lighting.
Before I go on I have one quick question.
1  
2  
3  
[code]IntBuffer lights = BufferUtils.createIntBuffer(16);
GL11.glGetInteger(GL11.GL_MAX_LIGHTS, lights);
writeLine("Maximum number of light sources: " + lights.get(0));

That code outputs the number 8. I am sure my understanding of OpenGL lights is incorrect but how is possible that I can only create 8 lights? As in, to my understanding, games can create a lot more than 8 lights.

The 8 lights is not the maximum number of light sources you can create. It is the maximum number of active light sources.
You can switch between unlimited amount of light during rendering.

Okay and here is my attempt at setting up lights.

(Perhaps I should have uploaded a larger image) parts of quads are lit up but not others, some corners have two quads lit but not the third.


You would have to tell us what you are trying to achieve.
Will it be possible to use the closest(8 or less) light sources to light up each quad/set of quads?

The room is drawn with 6 quads and texture bound over them (I need to move on to floatBuffers).
Here is the light setup.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_LIGHT0);
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, floatBuffer(1.0f, 1.0f, 1.0f, 1.0f));
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, floatBuffer(0.1f, 0.1f, 0.1f, 1.0f));
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, floatBuffer(1.0f, 1.0f, 1.0f, 1.0f));
GL11.glLightModeli(GL11.GL_LIGHT_MODEL_TWO_SIDE, GL11.GL_TRUE);
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
GL11.glColorMaterial(GL11.GL_FRONT_AND_BACK, GL11.GL_AMBIENT_AND_DIFFUSE);
// For the last line, what is the last float used for? Shouldn't it just be x,y,z?
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, floatBuffer(-5f, -5f, -5f, 1f));
/* Rendering here. */


public FloatBuffer floatBuffer(float a, float b, float c, float d) {
   float[] data = new float[] { a, b, c, d };
   FloatBuffer fb = BufferUtils.createFloatBuffer(data.length);
   fb.put(data);
   fb.flip();
   return fb;
}


Perhaps I need to setup normals (I'm not too informed on normals) on my quads?

Thank you for your time and help.[/code]

If you really need more that 8 light sources per vertex you should look at shaders.
Otherwise try to group vertex(quads) by light sources that are affecting them, and then setup lights, render, setup lights, render, setup lights, render...
16  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-16 17:35:42
.....(removed by admin, I still think that I should reply to the second part)

Still looks like this has some potential....I really want all these project to pop up with something playable then teasing screens.  Cry Even if it is just testing the lights let me play with something  Angry

Good luck   Smiley

Thanks,
I still have few things that I will need to finish before releasing the first test version.
For example only one light type can be on at the time (I would either have to turn on normal light or unidirectional). PathFinding only works with 1 of the slope tiles(its simple to add the rest, but it will take time to test all of them).

There is only 25 different tiles (mostly "block" full tiles, few slopes and a tree).
The trees are still not finished(trees will not be "blocks" and will grow instead of just appearing) for now I have the trunk and branches working, I will still need to add leaves.

I could release the test version now but it would be pointless as all you could do would be place tiles through the "Admin Panel" and test PathFinding, well actually I'm rewriting the GUI now, so you will not be able to do anything...
Once It will be worth testing(for me and players) then I will release it.

EDIT:
Also I will need to set up a forum(almost done) for feedback before first test release.
17  Games Center / Archived Projects / Re: MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-16 01:20:43
This game looks pretty interesting. I will surely follow the progress. Wink

Will there be research "resource", all researches will be made using classic resources or in another way?

Thanks (btw. you are the first one following the game)

The research system will be major part of the game.
At first it will be simple, and as you progress through the game it will get more advanced.
It will be easiest to give few example so you can get an idea of how it will be done.

At first you will have to find small stone, break few branches off a tree and get vines.

Tier 1

Stone Axe (Pick axe, hammer, knife, chisel will follow the same procedure expect for shape)
Gathered resources: 2 stones, stick, vines/rope
1 - Shape the stone using the other stone (of find one that is already shaped)
[~50% success rate, there will be few options for the shape]
2 - Split one end of stick using the sharp stone[~30% success rate,] (or knife[~80% success rate,will increase the chance of success])
3 - Place the sharp stone and tie it up using either vines or rope [~80% success rate]
When failing to craft an item you can loose some or all of the components.

Stone "Furance"(still not sure about the name)
Gathered resources: at least 3 stones (including one that will be flat)
Stones (o) placed in this shape
oooooooo  <- 1 big stone
oo      oo   <- 2 small stone
Will create a basic "furance" that can be used to cook food or smelt ore
Adding fuel and setting it on fire will activate it


Tier 2

Will require some way of making notes:
  • Chisel/Knife(stone) and stone/wood plank
  • Paper and ink
  • Notes book
  • Computer

Mine carts (parallel with rails)
Required: Metal, Wheel(research), Axle(research), Container(research)
(all you need is research notes, but using the items will speed up the research)
Combining Wheel with Axel and Container will give you a mine cart prototype.
Then a mine cart will have to be placed on rails to test it.
Then you can start producing mine carts.

Rails (parallel with mine carts)
Required: Metal and Wood
The shape of rails will have to be researched and combined with wooden planks to create rail prototype.
Then a mine cart will have to be placed on rails to test them.
Then you can start producing rails.

This is only a brief description of the crafting and research system.
I will be posting a detailed crafting and research system notes on my blog in few days.
18  Games Center / Archived Projects / MetaTech (3rd person sandbox game mixed with RPG and RTS) on: 2012-12-15 22:04:25

The game is still in early stages, there is almost no content, but the engine is working.
I’m working with one of my friends, he is helping me with ideas, testing, marketing(making videos) and other thing.

The game is still not fully defined, I’m still gathering ideas and changing things.

Current ideas:
  • 3rd person sandbox game mixed with RPG and RTS
  • Multiplayer, the servers will be player-owned
  • From Stone Age to Future (research system)
  • Magic but not the magic you’re used to (“once you research magic it becomes technology”)

In the game you will control one main character like in RPG games.
You will also be able to give orders to computer controlled characters if you will pay/convince them.

Starting from nothing and just raw landscape, you will have to gather items and use them together to create more advances tools and machines, progressing through a tech-tree.

Few screenshots from v0.00.0126 - v0.00.0229

PathFinding + Map overview


Different size light sources


1300 Lights


Unidirectional (Laser) Light


PathFinding


For recent updates visit my blog
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Riven (6 views)
2014-07-29 12:53:52

Dwinin (7 views)
2014-07-29 10:59:34

E.R. Fleming (21 views)
2014-07-29 03:07:13

E.R. Fleming (8 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (51 views)
2014-07-17 23:47:54
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!