Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (734)
Games in Android Showcase (222)
games submitted by our members
Games in WIP (811)
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  Game Development / Game Mechanics / Re: Backwards-Forewords Compatible Save Game Data on: 2017-05-15 12:18:07
I've been poking around the internet trying to see if anyone has ever tried this before.  I've seen no evidence of it, so I felt I should share.

This could easily be used with other archive formats and other programming languages, but this is an old forum I used to visit...so, seemed the logical first place.
2  Game Development / Game Mechanics / Backwards-Forewords Compatible Save Game Data on: 2017-05-15 10:28:37
I've got an idea on storing saved games that I think is generally useful and helpful, so I felt I should share it somewhere.

Several months ago I was wracking my brain, looking for a strategy for storing a potentially large set of data for a given 2D game world made up of blocks and a friend sparked a fascinating piece of inspiration for me.  I was debating an XML format vs. some kind of custom-designed binary format and zip files came up in the discussion (he was just throwing out odd-ball ideas, trying to help me out).

That's when the thought hit me full force: zip files are the perfect solution (and Java supports them out of the box, woo!), allowing both backwards and forwards compatibility in my game world format.  My thinking (and what I've been working on) is that the zip archive holds each distinct type of data as a separate file in the archive.  When you need a new type of data, just slap a new file into the archive under a new name.  If an older version needs to load the file, it simply ignores data files it knows nothing about.  When a newer version loads the file, it can supply reasonable defaults for the data it considers to be missing or otherwise extrapolate from existing data (what we'd have to do on old files opened in a new version, anyhow).

The beauty of this is that as your needs change and evolve over time, your method for storing new data does not interfere with or even change the way you store old data, unless you're brave/foolish enough to re-arrange the archive's structure later on.  Another nice bonus is that you get compression for free, if you want it (one can always set the ZIPOutputStream to simply store files instead of compressing them).  Even setting the compression level to it's minimum setting gets you some rather good run-length encoding for only minimal processor usage.

As a more concrete example: the game engine I'm working on uses a number of run-time defined variables in game worlds that are specified mostly by XML files from game mods.  Each block in the world gets it's own little chunk of data for each variable.  From one run to the next, as mods are added and removed from the game, some of these variables may no longer be required.

Since each variable is a primitive type (byte, short, int, long, float or double), all I have to do when storing or loading them is read/write a bunch of raw data to/from the stream, without dealing with all the data being mixed together.  Each variable has it's own file and an extension matching it's primitive type, so anyone poking around in the files in the archive can be assured of the exact type of data based on it's name alone, though discovering it's exact purpose may require looking it up in the meta-data (see next paragraph).

For textual data, like Strings, I'm storing them in XML files.  I'm also storing some minimal meta-data as XML, like the dimensions of the world and a listing of the block types by name, so the world can be reconstructed from the raw numbers from other files.

Now, one hiccup I can see is that sometimes you're going to end up with data you don't know how to parse, because it's either no longer supported, or the mod that needs it was removed.  I currently haven't decided on how to handle that.  It's possible to preserve the old data and hold it in memory until the world is written to disk again, but this would not always be desired.  I think discarding it is probably the way I'll go.  It can always be manually retrieved from an old copy and re-inserted just by manipulating the zip archive a bit.

Another hiccup I see is that once you decide where in the archive a file goes, you can't ever move it without breaking compatibility with older versions.  So, if you make an ugly choice on placement of a file, you're stuck with it.

Anyway, that's my idea.  I hope others find in helpful.
3  Discussions / Miscellaneous Topics / Re: Are there any good physics engines written in Java? on: 2007-04-14 23:28:50
I'm working on a physics engine as one of my sub-projects here:
http://deimosproject.sourceforge.net

I don't know if I'd call it a good one yet, however...it all depends on what you need.
4  Game Development / Game Mechanics / Re: Opinions please? on: 2007-03-31 15:49:26
All right, the Java Web Start version of the physics demonstrator is up on the website.

You can find it on the following page, along with some quick notes on what to expect when you run it:
http://deimosproject.sourceforge.net/Readme%20%28Physics%29.html

If you just want to go straight for the JNLP file, here's the URL:
http://deimosproject.sourceforge.net/jaws/physics.jnlp

Just keep in mind that when you select one of the demos, the first window will vanish, a few seconds will pass and then the rendering window will appear.  To load a new demo, you'll have to run the application again from the beginning, using the JNLP file.

The new demo code is a little rough, but this should be far easier for the non-programmer to start up.  It will take care of downloading all the important bits for you.  I'll be polishing it more in the future; I just wanted to get something simple to use up ASAP.

I had to sign the Janino Jar myself, as it's author does not currently provide a signed version.  I sent the author an email about that.  Hopefully I'll get a reply and a solution for that soon.

Edit: I just barely got a reply.  We should have that fixed the right way soon.
5  Game Development / Game Mechanics / Re: Opinions please? on: 2007-03-28 14:59:46
Thanks for the advice.  I hadn't thought much about making the demos easier to use.

I could write a simple demo application that presents a list of scene files and lets the user select one.  Shouldn't take much to package it as a JWS app (something I've never done before).  I could even have it extract the command line arguments from the jar manifest and/or have it scan one of the directories in the jar for the demos.  I love this idea.

I think I'll do the same for the 3D modeler and the sound modeler, once I do some more work on it (actually turning it into a modeler).

Thank you for sparking a good idea!
6  Game Development / Game Mechanics / Re: Opinions please? on: 2007-03-28 02:38:03
A very amitious project! Are you working on it alone? I love space shooters as well, although I'm generally too lazy to actually get my joystick to play...

Writing your own physics simulation seems overly complicated, why did you choose to write your own rather than to use for example JOODE?


I am working alone.  There's another guy listed as a developer on the project, but only because he used to be in charge of the website (good friend of mine in RL).  I've posted through the help wanted system on sourceforge.net more than once, but never got a response.

I would love to have help with the project.  It would likely take me a bit to adjust, however (setting up CVS, communicating with other developers, setting up and assigning tasks, etc.); I've never really worked with others on a project for all that long.  That's probably due to my insistence on doing things differently (people don't usually believe what I say is possible until I've built it).

My guess is that most people look at my projects and go, "WTF?"

Case in point: I built a unix-like system in Java (http://jinx00.sourceforge.net), though I abandoned it in favor of this project (this one is more satisfying, as I'm not slamming my head against the limits of Java every five minutes).

Another example is my 3D modeler (part of this project).  I built it for programmers instead of artists.  You build models using Java source code, which when run produces the model.

Like I said, I do things differently.  Different is good, eh?   Wink

To be honest, I wanted to write my own physics engine so I could learn how it's done.  I also don't like the style in which the existing engines were programmed.  I mean no offense to those who wrote them, I just don't like them (granted, I haven't looked at JOODE).  This is simply another in a long line of re-inventions of the wheel, because I didn't like the wheels that were available.

This also isn't my first physics engine, but it is the most capable so far.  Once I have the rotational bits working and a few more collision detectors, it will fill my needs nicely.  Everything else (more forces and pretty eye candy) is just icing on the cake.
7  Game Development / Game Mechanics / Re: Opinions please? on: 2007-03-27 15:57:25
Did you download the required libraries, as the documentation tells you to? (In the 'docs' directory)  Please follow the install directions.

You need to visit the Janino website and download it.  This is the exact error I get when Janino is missing.

You'll also need JOGL (http://jogl.dev.java.net).  Use the JSR 1.0.0 version.

Make sure their jar files are in the same directory with the other project jars, spelled and capitalized as follows: "jogl.jar", "janino.jar".  Please follow the instructions in JOGL's docs on installing it's native bits, though you'll find some hints in my project's documentation.

Edit: I do not include the libraries in the main archive because it simply bloats the download for people who already have them, I don't want to include the native bits for every platform and I wish to direct web traffic to the websites of the libraries I use.  They scratch my back, so I scratch theirs...
8  Game Development / Game Mechanics / Re: Opinions please? on: 2007-03-27 14:29:09
In the 'scenes' directory of the main project archive, you'll find a bunch of Java source files.  These are the test scenes.  DO NOT compile them.

Type this from the base directory:
java -jar physics.jar scenes/Bounce.java

If for example, you want to run Bounce.java.

I'm using a runtime Java compiler called Janino ( http://janino.net) to compile the scenes from source.  It's handy for testing and such.

Hope that makes things clearer.
9  Game Development / Game Mechanics / Opinions please? on: 2007-03-27 02:25:15
I'm working on an open source game project.  http://deimosproject.sourceforge.net

I was hoping to get some opinions on the physics engine I've built.  So far, it handles spheres and you can easily implement arbitrary physical forces, such as gravity between particles, springs, etc.

It supports (generalized) gravity and springs out of the box.

Collisions are detected and handled at the precise moment they occur, between integration steps.  Collision detection is pluggable and based on an interface, so it is possible to build your own collision detector.

I admit there are some bugs to fix and important features still left to be implemented, but I'd like some feedback.

Thank you.
10  Java Game APIs & Engines / Tools Discussion / Re: How do you work with 3D Models? on: 2007-03-12 16:58:26
This might not be quite what you're looking for, but I built a 3D modeler myself.  I designed it with a programmer's needs in mind, rather than an artist's, because Blender makes no sense to me.

Basically, you write Java source code that builds the model.  All you need is graph paper, a pencil, a colored pencil, and a ruler.

It might help you with the creation of new models, but not with the modification of existing models.

Currently, it doesn't support any kind of 3rd party model import/export, as this isn't a feature I actually need for my project, although it is something I've thought about adding many times.  File parsing is a pain...  I'd be happy to accept submissions in this area, BTW.

Edit: Forgot to give you the URL:
http://deimosproject.sourceforge.net
Pages: [1]
 
cybrmynd (29 views)
2017-08-02 12:28:51

cybrmynd (43 views)
2017-08-02 12:19:43

cybrmynd (56 views)
2017-08-02 12:18:09

Sralse (61 views)
2017-07-25 17:13:48

Archive (493 views)
2017-04-27 17:45:51

buddyBro (640 views)
2017-04-05 03:38:00

CopyableCougar4 (1125 views)
2017-03-24 15:39:42

theagentd (1131 views)
2017-03-24 15:32:08

Rule (1105 views)
2017-03-19 12:43:22

Rule (1084 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!