Java-Gaming.org Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (734)
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 ... 10
1  Discussions / General Discussions / Re: XHON: eXtensible Human Object Notation on: 2016-05-14 22:04:01
Go for registration with IANA! Wink
Would be an awesome experience if your media type got accepted. Who knows.

Just a few little things that caught my attention:

1. Please back all of your syntactic elements with a grammar definition
-snip-
2. Is a Java "type structure" really necessary?
-snip-

I'm not even going to think about submitting a registration request. Just take a look at that formular! Not gonna do that.
Yes, I will put a grammar definition to any and all elements (tomorrow); and remove the java examples while I do so.

It's a good thing I learned EBNF a few weeks ago!

Edit: I stayed up until 3:30 in the morning and added grammar definitions to pretty much all elements; Updated PDF, link is the same.
2  Discussions / General Discussions / Re: XHON: eXtensible Human Object Notation on: 2016-05-14 20:29:17
The reason .json is so bad when editing it by hand is because it was not designed for that purpose. It was meant to be used to pass data around applications. The data in .json is supposed to be program generated, not hand written.

Are you going to have an example implementation with some code examples? It would be nice to have code examples of situations where certain aspects of the language are useful.

SHC is working on a prototype implementation currently (he's learning to write parsers).

Sadly, I am very (very) bad with thinking of examples, so it might take quite a while until I have some good examples.

EDIT: I will start implementing an actual parser as reference implementation tomorrow.
3  Discussions / General Discussions / XHON: eXtensible Human Object Notation on: 2016-05-14 19:56:50
Hello everyone!

After roughly 5 weeks of writing and lots & lots of thinking and tinkering, I finally finished the file format specification for a format I invented: XHON.
The name is a amalgation of 'XML' and 'JSON' and means 'eXtensible Human Object Notation'.

I created XHON because I wanted a format like JSON, but with comments, graphs, s-expressions and a few more things. Since extending JSON is not possible due to it being standardized and all other formats (like YAML, Hjson, EDN and XML) are either way too damn complicated, use significant whitespace (which I absolutely hate) or have weird limitations like not supporting comments (Why JSON, why?), I decided to invent my own format for my projects that doesn't have these problems; the result being XHON.

XHON is a superset of JSON and is thus fully backwards compatible to it but at the same time extending it with quite a bunch of features.

To give you a basic idea on whats in store, here is what XHON has on top of JSON:
  • Quoteless Keys
  • Comments (which can be stacked)
  • A more complete numerical type (that supports NaN and Infinity).
  • Strings that can go over multiple lines.
  • A byte array type for embedding binary data inside a plain text format.
  • An actual datetime type loosely based on the Joda-Time library.
  • A special 'unit' type for numbers to allow things like 200m².
  • A key/value type that allows duplication of keys and empty keys.
  • A type for writing paths made of elements instead of just strings.
  • A s-expression type ala LISP, making it possible to store expressions w/o strings.
  • A graph type for storing undirected/directed graphs in a format similar to TGF.
  • Parser function callbacks to allow easy extension and extension by macros.

...and all of this while still keeping the whole thing easely readable by both humans and computers.

Right now there is no parser implemented for XHON, though SHC is being awesome and is working on one!

Following is the link to the 19 page long PDF file that is the specification (hosted on google drive):
https://drive.google.com/file/d/0B66SwOYHam6UMkNhVmMyR18tX2M/view?usp=sharing

The specification is feature frozen, so the only thing left to do is to fix grammatical mistakes and (possibly) logical errors in the definitions.
So, if you happen to read the specification and stumble upon a grammar mistake or a logical error, please tell me!

Thank you and have a nice day!

- Lars Longor K

PS: I'm pretty darn happy that I managed to finish this specification. Yay!
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-14 13:14:31
-snip-

And here is a railroad diagram generator for EBNF while we are at it:
http://bottlecaps.de/rr/ui
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-14 13:02:59
- snip -

I'm now gonna try out extending this to support Longor's XHON.

Just so you guys know what he is talking about:
The XHON file format is a superset (with nifty features) of JSON that I developed.
The specification is pretty much complete (all features are in) and can be found here:
https://drive.google.com/file/d/0B66SwOYHam6UMkNhVmMyR18tX2M/view?usp=sharing
6  Discussions / General Discussions / Re: Analytics on JGO? on: 2016-05-09 13:51:19
http://www.java-gaming.org/content/social  and  http://www.java-gaming.org/index.php?action=mlist might be interesting then.

EDIT: Messed up the links.
7  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java Library written IN Java on: 2016-03-21 21:02:23
Writing custom renderers just for fun is cool, you just need to realize that you only do it for fun and it will not be usable in any real world scenarios.

Actually, there is a good use for software rendering: Occlusion Culling by Software Depth Testing.

Draw a bunch of occlusion bounding boxes with a software renderer into a depthbuffer, then check with another pass if the bounding boxes of any object are hidden by the pixels in the software depthbuffer. Its one of the fastest ways to do occlusion culling; the company Umbra is selling a library that uses this technique.

Someone should write a software renderer for occlusion culling in java...
8  Game Development / Newbie & Debugging Questions / Re: Procedural (never ending) map generation on: 2016-03-17 18:20:27
Perlin-Noise can be used as-is for infinite maps. You just got to

1  
  randomValue = perlin2D(chunk.x + inner.x, chunk.z + inner.z)


That is, add the position of your chunk and the position of your point inside the chunk and pass that to the noise-function in question.
The result should be a smooth, never-ending terrain.
9  Game Development / Newbie & Debugging Questions / Re: (Individual Tile Classes vs Method Stacking) and Storing Tile Data on: 2016-03-15 18:04:13
Actually, Minecraft uses the flyweight design pattern for its blockdata.
The whole thing with the 'strings as IDs' is simply an abstraction on top of the whole thing;
Minecraft will forever use this exact system for managing its blocks.

So... Here's a simplified version of the entire thing:

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  
  class BlockStorage {
    int[] blocks = new int[width * height * length]; // this is where your block are actually stored
    List<TileEntity> tileEntities = new ...; // this is where tile-entities are stored (can be a hashmap)
   
    // Returns the 'raw' data of the block as a integer at the given position.
    public int getBlockRaw(x, y, z) {
        return (y * width * length) + (z * width) + (x);
    }
   
    // Returns a flyweight Block-object for the block at the given position.
    public Block getBlock(x, y, z) {
        return BlockList.blockList[getBlock(x,y,z)];
    }
  }
 
  // Contains a list (/array) of all flyweight Block objects.
  class BlockList {
    public static final Block[] blockList = new Block[...];
    static {
      blockList[0] = new BlockAir();
      blockList[1] = new BlockStone();
      blockList[2] = new BlockOven();
    }
  }
 
  // This class represents a simple abstract flyweight Block with metadata.
  abstract class Block {}
 
  // This is a block that can have a tile-entity.
  abstract class BlockContainer extends Block {
    abstract TileEntity createNewTileEntity();
  }
 
  // The three classes represent actual Block types.
  class BlockAir extends Block {}
  class BlockStone extends Block {}
 
  class BlockOven extends BlockContainer {
    TileEntity createNewTileEntity() {
      return new OvenTileEntity();
    }
  }
10  Java Game APIs & Engines / OpenGL Development / Re: UV of a LightMap. on: 2016-03-02 18:17:12
You should be able to calculate the texture coordinates for your light mesh like this:
1  
2  
 (pseudocode)
 lightmaptexcoord.xy = normalize((light.xy - vertex.xy) / light.radius) + 1.0 * 0.5


Do this for every vertex of the image you provided above and it should work.
11  Discussions / Miscellaneous Topics / Re: Happy 2016 on: 2016-01-01 13:35:44
Yay, new year!

Goals:
- Try to not be so forgetful.
- Spend less time on reddit.
- Finally enter the coding phase of my TC project after 6 years of planning. :'D
12  Game Development / Performance Tuning / Re: Float Division vs Multiplication on: 2015-12-21 14:52:21
*benchmarks too*

Quote
Slow: 9.542 ms
Fast: 6.202 ms
13  Games Center / WIP games, tools & toy projects / Re: Suzzle on: 2015-09-29 11:22:34
I'm running Xubuntu Linux 14.04, Oracle Java 1.8.0_45 and it worked mostly fine.

When I first did the java -jar on the Suzzle.jar, it crashed with an UnsatisfiedLinkError, so me being lazy and not wanting to deal with command line voodoo magic, I used Ninja Cave's Jarsplice to pack all the resources and run it.

I really like the minimalistic art style. It's really cool  Grin

I was happily playing along and got to the level that said "Ha ha" with the jump and the spinning laser, so I jumped over the laser and the game crashed. The crash dump is here.

I have some questions though!
1. Why are you using JS and what for?
2. How did you get the screen shake when running?

I'm very impressed that it runs smoothly on my awful 2 GB Celeron laptop while having Ecipse, a million tabs in Chrome, Skype, various folders, Sublime Text and two terminals open. Well done!

1. The art style is minimalistic because I am a terrible artist.
2. The crash is normal. If the next level cannot be loaded the game just crashes. I should make it go to the mainmenu instead...
3. I redid the level loading system. JavaScript is no longer used from the next version on (I am using a simplified LISP now). Also means I will have to redo all levels.
4. Thats 'view bobbing'; though in this case its called 'DynamicCrazyBob'.
5. It runs smoothly mostly because there is barely anything drawn, and there is (pretty much) zero memory allocations.

Thanks for playtesting Suzzle. Expect a new version (hopefully) within the week.
14  Game Development / Newbie & Debugging Questions / Re: Handling a large variety of spells and/or weapons on: 2015-09-16 18:55:04
This type of spellHandling is already alot better than I am currently doing, but still is it the best?

Just chiming in here:
There is no such thing as 'the best', since different games/applications need different functionality.
You can't make a 'fit all' solution, its simply not possible.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-16 15:26:36
-snip-

Wow, this exact situation you are in is happening to one of my classmates too.
(That is; 'Friend' takes away girlfriend; Depression happens).



What I Did Today: Refactored my game Suzzle all the way to hell and back (twice) and subsequently reduced the packed filesize by roughly (EDIT) 2.3 megabyte while still keeping all game features intact. Ripping apart lwjgl2 is fun.
16  Games Center / WIP games, tools & toy projects / Re: Suzzle on: 2015-09-15 14:05:58
So... I downloaded LWJGL 2.9.3 and used that to build+pack a new version.
The download link in the OP got replaced, but I am gonna put it here too:
Download Suzzle from Google-Drive

Can anybody confirm that its (not?) working?

Edit:
I started working on a ingame level editor (I can already select/pick objects). When I am done I can create new (and better) levels a lot faster. Right now its just terribly annoying/complicated to make new levels.
17  Games Center / WIP games, tools & toy projects / Re: Suzzle on: 2015-09-14 22:12:31
Well... I somehow managed to either pack the wrong version, or corrupted copies, of the lwjgl natives into the zip.
I will upload the correct versions tomorrow when I can use my neighbours internet connection, because right now uploading anything bigger than a few kilobytes takes forever. Also should update to lwjgl 2.9.3 while I am at it.

Here are some 'patches' you can merge into the Suzzle.jar, if you want to help debugging.

Patch1: https://drive.google.com/file/d/0B66SwOYHam6UV3prZlViVjNjRWM/view?usp=sharing
Patch2: https://drive.google.com/file/d/0B66SwOYHam6UY2V1TTNuVWpJTUE/view?usp=sharing
18  Games Center / WIP games, tools & toy projects / Suzzle on: 2015-09-14 20:47:18
Hi everyone!

About 3 years ago I started making a game for my little brother, then for some reason stopped working on it.
A few days ago I found the project files and decided to work on it again.

And here is the result!

Fun fact: This is also the first time I am releasing something that can be called a 'game' into the public.





Suzzle! (The name doesn't have a meaning)

This game is a simple 3D puzzle platformer were you can run, jump, press buttons, fall down and get burned to death by lasers.
There really isn't anything to explain about this game. Also, there isn't much content yet, only a few levels.

The controls are explained in game using floating text, but for no good reason here they are:
  • MOUSE, to look around.
  • W A S D, to move around.
  • SPACE, to jump.
  • SHIFT, to run.
  • LEFT MOUSE BUTTON, to click buttons.

The game uses:
  • LWJGL 2, by the lwjgl team.
  • TinySound, by kuusisto
  • Rhino, by Mozilla
  • OpenGLText, by Philip Diffenderfer

Running the game requires barely 10mb of ram, Java 1.6 (preferably 1.7), and a OpenGL 1.1 compatible graphicscard because I am using immediate mode rendering (don't ask why... just don't).

Here is the download (version 0.3):
Download from Google Drive
(Note: The download button is on a hidden taskbar at the top of the site)

Please report any bugs/errors/problems, and if you get a crashlog post it as a pastebin.

Feedback is appreciated and suggestions are welcome.

Have a nice day!

- Longor1996



IMPORTANT NOTE: The game seems to have problems starting on linux and mac due to the packed native libraries being corrupt/the wrong version. Sorry about that.
Uploaded a new version and replaced download link. Should be fixed now. Can anyone confirm?
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-13 18:17:02
What I did today... or rather the last few days!


I picked up a dead project of mine again after ignoring it for roughly a year.

Its a small 3D jump'n'run game called 'Suzzle'.
There are only 6 levels right now, but its pretty playable.

Here's a download (4.1 megabyte): http://www.file-upload.net/download-10908255/Suzzle.zip.html

(PS: This is the first actual game I ever released, yay!)
(PPS: Not going to make a thread for it right now; Not enough content)
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-09 20:23:39
I made a logo in inkscape just for fun, and it actually looks okay for once!

21  Game Development / Newbie & Debugging Questions / Re: Patchwork style render on: 2015-09-06 21:21:04
Go and find out what values the voronoise function gives you at these 'edges', then try to 'if them out'.
22  Game Development / Newbie & Debugging Questions / Re: Patchwork style render on: 2015-09-06 09:54:39
You should take a look at this: https://www.shadertoy.com/view/Xd23Dh
Non-so-efficient Java implementation (by me) here: https://gist.github.com/Longor1996/64ca31a25286470e3730
23  Game Development / Newbie & Debugging Questions / Re: Game has a bunch of short pauses on: 2015-08-28 15:46:47
These pauses are definitely caused by the GC doing a full scan to clear memory. Also, how/why are you creating 200kb of objects every frame? That sounds like way too many object allocations to me.
24  Java Game APIs & Engines / Tools Discussion / Re: jBullet3 on: 2015-08-28 12:30:13
Don't forget about supporting LWJGL3 (which has OpenCL too).
25  Discussions / General Discussions / Re: Excelsior JET Charity Bundles 2015 on: 2015-08-22 11:57:55
Quick question: How long does the license hold? e.g.: Is there a point at which I have to buy the full version for 1500$?
26  Game Development / Newbie & Debugging Questions / Re: JavaFX 8 - Custom events on: 2015-08-20 18:44:16
1  
2  
3  
4  
//Sprite.class
if(died() == true){
    Main.state = DIED;//where Main.class is your main class for example
}

1  
2  
3  
4  
//Event.class
if(Main.state == DIED){
    //fire event
}


That is a absolutely terrible idea. The moment you need more than one sprite, the system breaks down.

A much better way is to have a method in the class of your 'thing' that is called when the 'thing' dies.
This method could then fire a event, or put a message in some queue that is continously read.

EDIT: A very quick google search that should tell you what you want:
http://stackoverflow.com/questions/27416758/how-to-emit-and-handle-custom-events
27  Java Game APIs & Engines / OpenGL Development / Re: Vulkan ETA late 2015, Android support, Apple NOT supported on: 2015-08-14 15:21:13
Okay, now that's just stupid.
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-21 11:53:05
Added stb bindings to LWJGL 3:
-snip-
(will post details when the build is up)

Questions:
- For what platforms will this be available?
- Is this going to be built right into LWJGL3?

Because this looks awesome!
29  Java Game APIs & Engines / OpenGL Development / Re: Precision and value range on: 2015-04-23 13:08:23
AFAIK: A single float can go up to ~1 lightyear with one unit being a single meter (e.g.: Float.MAX_VALUE roughly equals 1 lightyear).
If you do things right, you can continue to use floats without trouble.

Before drawing any body (or system of bodies) calculate the offset from the body to the camera and translate by that instead of translating the whole scene for rendering (as it is usually done). This reduces the depthbuffer-artifacts and fixes the 'jitter' you get when you get to the edge of your solar-system.

1  
2  
3  
4  
5  
6  
7  
Vec3f cPos = camera.getPosition();
Vec3f bPos = object.getPosition();
Vec3f offset = subtract(bPos, cPos);

// Using OpenGL 1.1 here for demonstration
GL11.glTranslate(offset.x,offset.y,offset.z);
GL11.glCallList(object.getModel());


Another thing to make use of is a 'frame of reference'-system. Its quite simple: "If I am close to a stellar-body (planet/moon/asteroid/spacestation), that body will be the origin (0,0,0) of the scene for physics and rendering. Else, my ships position is given as total position".
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-31 19:35:34
I was bored and have a headache... so I wrote a tiny template library.
Its only 150 lines of code and does exactly what I want and nothing else.

It turns this:
1  
Hello, %{name}! How are you? I am %{feel}.


Into this:
1  
Hello, You! How are you? I am fine.


Within (edit)0,0003 seconds 2 ms. Not that bad for a first try!

(edit): And now you can look at the nightmare of code I created (just for fun)! http://pastebin.com/QHTbPAys
Pages: [1] 2 3 ... 10
 
DarkCart (25 views)
2016-05-29 02:30:33

Hydroque (38 views)
2016-05-26 14:45:46

Mac70 (50 views)
2016-05-24 21:16:33

theagentd (55 views)
2016-05-14 18:38:35

theagentd (89 views)
2016-05-10 22:37:41

theagentd (95 views)
2016-05-10 22:33:46

IanParcs (120 views)
2016-04-18 14:18:53

KaiHH (116 views)
2016-04-18 08:35:41

KaiHH (136 views)
2016-04-15 12:43:58

theagentd (143 views)
2016-04-14 02:16:17
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50
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!