Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (428)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
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 / Shared Code / Re: JStackAlloc - stack allocation of "value" objects in Java on: 2009-06-06 20:22:05
Thanks that's probably the problem then.

Actually they're recycled automatically. That's what the bytecode instrumentation part does, see documentation for Stack class. There is rough example what the instrumentation does.

Does that mean that objects allocated with Stack.alloc(class) are not guaranteed to be an result of the () constructor, if they're recycled?  Like, if the instrumentation recycled a vector of <2,3,4>, and then you grabbed it with the Stack.alloc(class), would it still have <2,3,4>?
I guess i misunderstood this system.  So every object that you call Stack.alloc() for, it reuses?


Edit:
I added
1  
2  
3  
Error e = new Error("not instrumented");
e.printStackTrace();
throw e;

To the stack class so I could trace where it happened (ant doesn't print stack traces), which worked great.  I also had to clean it every time after these errors, for some reason.
2  Game Development / Shared Code / Re: JStackAlloc - stack allocation of "value" objects in Java on: 2009-06-06 09:11:15
I think i've implemented everything correctly, but i'm getting an error:

Quote
BUILD FAILED
/path_to_file/build.xml:13: java.lang.Error: not instrumented

What could this mean? It's fairly nondescript.

Edit:
What doesn't make sense is that this is the actual build file, in the instrumentation task

Also, it would be great if there could be a way to "recycle" objects, so they are placed back on the stack.  Maybe require a set() method with no arguments?
This would eliminate a lot of object construction.
3  Games Center / Archived Projects / Game Engine on: 2009-05-13 04:20:28
I've been developing this engine for about 2 years now, and I've scrapped it and started over more than once, as most of you can probably relate to.  Its finally all (sort of) coming together.  Here's what I got:

 - Base Engine [Environment], handles collisions, some location based searching, and the base shell of the console
 - AI - this is divided into layers, it's very intuitive and straight forward.  It's pretty well documented
 - Animation - this is pretty dynamic, and easily handles frame animations, its explained in the docs too
 - Console - this what will make it easy to create levels, game objects, and modify properties, and can be scripted
 - Messaging - Very intuitive board system and easy message dispatchers, put all your properties in the boards and they can be edited by the console
 - Object - finally the object classes you extend to put anything in the engine.  very flexible and dynamic.
 - Structure - this only consists of a QuadTree class which I just made.  It looks great, i just need to implement it.

I've spent a lot of time on each division, and some of them could be their own little libraries (like Messaging)

notes:
I'm experimenting with different physics, I tried Bullet physics but 3d and i'm just looking at 2d right now, I have some basic stuff that suites me well for now.  I was looking into raytracing for bullets and such, but I'm focusing on the rest of the engine first.
All the graphics are in OpenGL (jogl) and the animation library loads it all into textures very nicely.
I have a separate sound library that's bangin', I'd like to post that here eventually, its does a really great job.
There's the whole acm stack implementations for reusuable objects in there, but i'm not going to bother with that until later.

my other libraries in there:
 - my opengl library, which has utility stuff, an animator, and an easy extendable class to handle the GLCanvas for jogl
 - my simple (and horribly dirty and uncomplete) physics libraries

   * http://svn.xp-dev.com/svn/toucansam_project1/ (No SSL) or
   * https://svn.xp-dev.com/svn/toucansam_project1/ (SSL, if for some reason you would want that)

I've started developing a tower defense game, so you can see how stuff is implemented.  Running it doesn't do much, but you can check out the console by pressing the "`" key.  Also check out how the AI is set up.  This should see major development in the next month, so there will be more improvement to the engine.  Let me know what you think Smiley

Credits:
Processing (it did the dirty work for changing images into textures, so i grabbed that part)
the AI design is from various books

Edit: looks like someone else put up an engine too.  I'll have to come up with a name haha
Also, if anyone just wants a zip of the library instead of the repository i can set that up too.
4  Java Game APIs & Engines / JOGL Development / Library doesn't want to load... on: 2008-01-23 21:18:48
Ok so here's the deal. I'm trying to figure out what's wrong with loading jogl. This is for a plugin, so java.library.path is not always the same. So beforehand, I add the plugin directory path to java.library.path. I have it print out the paths, and so far so good:

String newLibPath = System.getProperty("java.library.path") + File.pathSeparator + libPath;
System.setProperty("java.library.path", newLibPath);


However when jogl loads, it says it cannot find jogl. This being strange, I try to move the libraries around. I put in this directory next (which was in java.library.path before i added the new directory):

/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources

which is very naughty i know and can cause problems. but this time the library loaded just fine. I've double checked things here so many times. Now i'm sure I can just work with it in the framework directory to just develop the plugin, but if I want to release it, this is not acceptable. For some reason, it can find the library in that old path, but not at the new path I added. I also tried loading it like this:

String nativ = System.mapLibraryName("jogl");
System.load(libPath+"/"+nativ);


which works to load it, but then jogl does not detect it and uses System.loadLibrary("jogl") so it doesn't work again.

another note, I tried immediately loading the library after I changed the path (I thought maybe the jogl loader had a different java.library.path property). This did not work, and it said it couldn't find the library again. But as last time, when I moved it to a directory previously on java.library.path, it worked.

I tried puting the libraries at the root directory / and added that to the path instead, but it still would not load them.

please post any ideas you might have, this is getting very frustrating
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.

xsi3rr4x (79 views)
2014-04-15 18:08:23

BurntPizza (71 views)
2014-04-15 03:46:01

UprightPath (82 views)
2014-04-14 17:39:50

UprightPath (66 views)
2014-04-14 17:35:47

Porlus (82 views)
2014-04-14 15:48:38

tom_mai78101 (106 views)
2014-04-10 04:04:31

BurntPizza (166 views)
2014-04-08 23:06:04

tom_mai78101 (262 views)
2014-04-05 13:34:39

trollwarrior1 (212 views)
2014-04-04 12:06:45

CJLetsGame (221 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!