Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (499)
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 ... 52
1  Discussions / General Discussions / Re: What hosting do you use for your websites? on: 2014-04-13 16:08:13
Hi,
I use Linode but it's pricey and overkill for me. It expires in a month and then I'll switch to a smaller RamNode.
Serverbear has a good rundown and the different VPS servers available and their performance:

http://serverbear.com/compare/vps

Most VPS cost peanuts per month so I'd highly recommend them over anything else.
I host my sites on a VPS using apache tomcat which for me was easier than having to learn php, wordpress and the apache http webserver. Tomcat only required knowledge of java, servlets and JSP's. If you decide to go that route, I highly recommend this framework for watching performance:
https://code.google.com/p/javamelody/

Cheers,
Keith
2  Discussions / General Discussions / Re: JGO Kickstarter on: 2014-04-01 03:47:04
That's cool, good idea. I think this is better than project wonderful because all of the cash goes to jgo instead of a chunk of it going to project wonderful.
But when I click the badges on the right hand column I get an internal server error 500.
3  Discussions / General Discussions / Re: JDK 8 is released on: 2014-03-26 13:40:29
It's a pity that Oracle charge companies for distributing commercial java programs on ARM devices.
What kappa linked to about asm JavaScript is pretty amazing. That sounds like the way forward
4  Game Development / Artificial Intelligence / Re: AI path finding on non tile based game? on: 2014-03-15 11:29:50
Hi, I made a little project that might help with non-tile-based pathfinding:
https://code.google.com/p/straightedge/
Cheers,
Keith
5  Game Development / Newbie & Debugging Questions / Re: Done with "core" Java , but now... on: 2014-03-15 00:20:30
The problem : now i'm facing things like  building ,deploying , xml  , Maven , Ant , etc..etc..
and i find all this stuff incredibly boring.
My question : i have to resign  and dive into these icy waters , or i can somehow avoid this punishment ?
Thanks a lot for any tip !
I find maven and ant so idiosyncratic and clumsy. Why must they be programmed in XML rather than the language we already know: Java?
Luckily, If you use an IDE then it will do everything for you automatically. Another cool option is something that the jgo user Nate made:
https://github.com/EsotericSoftware/scar
6  Discussions / Business and Project Discussions / Re: RTS Programmers WANTED! on: 2014-02-21 02:55:13
If the game isn't started at all this is false advertisement and you might have lost some potential people. Working from scratch is hard to do, and of really isn't that wise. Use an already made graphics library to help you, don't write it all yourself.
Umm, but hasn't he already written all of the graphics? And they look excellent, better than any I've seen in an RTS including AOE2. See the screen shot in the first post.  Clueless

I think artists are harder to find than programmers.
7  Discussions / Business and Project Discussions / Re: RTS Programmers WANTED! on: 2014-02-20 16:35:47
Your graphics are very nice, they fit well together. If you have animations for walking, attacking etc already then I think you've already done at least 50% of the work to make this game.
The only hard thing left is the multiplayer code which some people here would actually enjoy coding.
I think you have a good chance of finding a developer to turn this into a game. If i had some time I would, but I'm working and studying full time so unfortunately I can't. But I will definitely be a paying customer when this turns into an AOE2 style game :-)
8  Game Development / Performance Tuning / Re: Improving draw performance for constantly changing image on: 2014-02-12 15:26:14
Java2d graphics pipelines are a part of the VM and are not configurable beyond the few vm args you already know about.

Quote
Each time a new frame is decoded, the data is copied into the raster and repaint(30) called (to trigger an asynchronous swing repaint
Perhaps using active rendering might work better, bit then again it may be negligible.

Why dont you try switching to OpenGL and see how it goes?
9  Game Development / Performance Tuning / Re: Improving draw performance for constantly changing image on: 2014-02-12 06:11:57
Oh, my previous traces had quite a lot of extra stuff in them (debug overlay text etc) that for simplicity's sake I've commented out. Here it is with literally just the image render:

With D3D enabled:

1  
2  
3  
4  
5  
6  
862 calls to sun.java2d.d3d.D3DSwToSurfaceScale::ScaledBlit(IntRgb, AnyAlpha, "D3D Surface")
16 calls to sun.java2d.d3d.D3DMaskFill::MaskFill(AnyColor, SrcOver, "D3D Surface")
863 calls to sun.java2d.d3d.D3DRTTSurfaceToSurfaceBlit::Blit("D3D Surface (render-to-texture)", AnyAlpha, "D3D Surface")
5 calls to D3DFillRect
1 call to D3DDrawGlyphs
1747 total calls to 5 different primitives

With D3D disabled:

1  
2  
3  
4  
5  
627 calls to sun.java2d.loops.ScaledBlit::ScaledBlit(IntRgb, SrcNoEa, IntRgb)
629 calls to sun.java2d.windows.GDIBlitLoops::Blit(IntRgb, SrcNoEa, "GDI")
31 calls to sun.java2d.loops.MaskFill::MaskFill(AnyColor, SrcOver, IntRgb)
3 calls to sun.java2d.loops.FillRect::FillRect(AnyColor, SrcNoEa, AnyInt)
1290 total calls to 4 different primitives

Please note they weren't run for exactly the same amounts of time, so numbers may vary.

sun.java2d.loops operations are the software blitting, and in your output for D3D it looks like none of that is going on which is good.
But in your D3D output there is a lot of:
862 calls to sun.java2d.d3d.D3DSwToSurfaceScale::ScaledBlit(IntRgb, AnyAlpha, "D3D Surface")
"Sw" stands for software I believe, so this may be the slow operation that is bogging down the CPU and frame rate.
I am not an expert on java2D and most of my knowledge is just from experimenting with different things and some reading, but I have found that VolatileImages are a little faster than BufferedImages. So you could try switching to them.
Another thing, fullscreen exclusive mode with D3D on and triple buffering may result in much faster speeds since page flipping is likely to be enabled.
Another thing, there is a java2d class that is supposed to give details of graphics capabilities but it is buggy and won't actually tell you if page flipping is possible or not.
Unfortunately Java2D has not been worked on for some time and all of oracle/sun's energy has been put into javafx, though there is little to show for it.
10  Game Development / Performance Tuning / Re: Improving draw performance for constantly changing image on: 2014-02-11 16:57:31
Unfortunately the performance of java2D is not great when it comes to blitting rotated images. This might also be the case for scaled images too, I can't remember.
Use the java2d trace option and let us know what the output is. It's better than using the profiler.
http://www.oracle.com/technetwork/java/javase/java2d-142140.html#gcrus

Most people doing demanding rendering on this forum use openGL. OpenGL is faster but less reliable since it  depends on opengl drivers which can be flaky.
When I use java2d it's usually only for painting in a window or applet that is a fraction of the screen size since that's the only way I can achieve a reasonable frame rate on slow computers.
Since you're blitting to 4 monitors I think you will have to switch to opengl to achieve reasonable performance, I don't think java2d can be tweaked to achieve 60 fps on 4 monitors using a computer with or without a video card since many java2D operations (such as image rotation) are not hardware accelerated.

Cheers,
Keith
11  Discussions / General Discussions / Re: JGO coinage tally on: 2014-01-30 19:52:50
Back in early 2010 when I added AdSense, everything seemed to go well. Within three months I reached the payout threshold of about $100, and I was a happy overlord. Unfortunately, in spring 2010 some guy from Belgium (according to his IP) clicked ~20 times on the same ad. I reported this activity to Google, with the offending IP address, and they quickly responded by suspending my AdSense account, indefinitely... in case you're wondering, yes, it is still banned and yes, I contested their decision to no avail.

That's totally unfair! I was reading about adsense and how to lift the ban and everyone says it's impossible.
But there's this discussion on google's product forum:
https://productforums.google.com/forum/#!topic/adsense/BQYp_jvO13k
Maybe if you raised the matter in a new thread there then they might notice? Seems bizarre that they ban you for doing the right thing.

Accepting donations from members would be fine. For the older members here a cost of $10 per year is nothing. I'm sure there'd be at least 30 members who'd pay $10 from their paypal account to keep JGO going. That would cover costs for about the next 2 years.

Another option may be to use the community more.
I have a VPS of which I use barely 1% which could be used to host JGO. I'm sure others are in the same situation.
But the hassle of moving JGO to new hosts would be a waste of labour.
12  Discussions / Miscellaneous Topics / Re: What will be the next hype after zombies? on: 2014-01-09 13:09:56
Before zombies it was vampires and werewolves.

It seems the undead are all popular. Even skeletons and mummies.

Ah yeah, I remember the movie 'the mummy', terrible. And Diablo, they loved their skeletons.

Also, demons and angels had their time in the 'DaVinci Code' and 'Angels and Demons'. Diablo had them too.

Maybe mutants might be next? Fears of radiation poisoning as a new cold war erupts between China and the US with the possibility of nuclear armageddon.

Or apes! Like 'plant of the apes'. I liked those old movies, but the recent one was a stinker.

Or aliens?
13  Discussions / Miscellaneous Topics / Re: What will be the next hype after zombies? on: 2014-01-08 20:28:00
Before zombies it was vampires and werewolves.
Maybe next it'll be witches or trolls? But Harry potter kind of did that already... Hmm.
14  Discussions / General Discussions / Re: Opinions of games engines on: 2014-01-07 12:12:09
From my days of working for the man...tinkerers, especially very skilled ones, was my biggest nightmare. 
That's because those guys hate working for the man!
Most people here would fit into that category.
Chances are that they're bored with their jobs and the best part of their day is finding a little tinkering challenge that they can struggle with to make the perfect API or the most efficient code.
15  Discussions / General Discussions / Re: Opinions of games engines on: 2014-01-06 14:34:39
The more productive developers here don't seem to use monolithic game engines, they have a tool chain of different things.
Kev Glass, author of Slick2D and a bunch of high quality games used to use
- LWJGL for rendering,
- Inkscape vector drawing program for making free-from curvy levels which can be saved as SVG an XML format,
- Tiled or some other program for tile-based game world creation,
- Phys2D for physics (an early derivative of Box2D before JBox2D superseded it),
- Paint.NET or gimp for pixel art, and lots more I'm not aware of.

The key thing with these engines is not the coding aspect, it is the level building. If you use libgdx to make an RPG shootem up platformer. How are you going to make the levels? You will have to write some custom software to create levels. With these visual editors that interact with code seamlessly you do not need to write as much custom software. But you still need to actually code the game.

Yeah that's true about the level editing. Most of us never get to that stage. After we make the cool effect or achieve the super fast 'frames per second' goal we're satisfied and call it a day.
16  Discussions / General Discussions / Re: Opinions of games engines on: 2014-01-05 22:13:23
I respect Carmack but I would like him to respect the right of paternity especially when it concerns the scientific studies that he has used for years (not only French papers), public fundamental research isn't useless after all.

What do you mean? I never heard of anything about Carmack and scientific studies.
17  Game Development / Newbie & Debugging Questions / Re: Java Security BS, Can I Get Around It? on: 2014-01-03 22:36:32
@CommanderKeith:

The link is fixed. I'm pretty sure I've signed them correctly using these two .bat files:

Well it works for me in Chrome browser on windows, but requires clicking through 2 menus, one by chrome which isn't too scary and one by oracle which is quite off-putting.

I read recently that Google is shutting down the old netscape plugin API which affects java:
http://www.infoworld.com/d/applications/chrome-will-block-npapi-plug-ins-over-stability-security-concerns-227428
Quote
While click-to-play has been available in Chrome for several years, the feature has not been enabled by default, except for a number of plug-ins that Google considered to present a higher security risk, like Java, RealPlayer, QuickTime, Shockwave, Windows Media Player and Adobe Reader prior to Adobe Reader X. That policy will soon change.

"Starting in January 2014, Chrome will block webpage-instantiated NPAPI plug-ins by default on the Stable channel," Schuh said. A temporary exception will be made for the most popular NPAPI plug-ins that are not already being blocked for security reasons in order to avoid disruption to users, he said.

The plug-ins that will be temporarily whitelisted will be Silverlight, Unity, Google Earth, Google Talk and Facebook Video, as they were used by more than 5 percent of users during the past month. Java was used by almost 9 percent of users, but it's already on the list of blocked plug-ins.

"In the short term, end users and enterprise administrators will be able to whitelist specific plug-ins," Schuh said. "Eventually, however, NPAPI support will be completely removed from Chrome."
18  Game Development / Newbie & Debugging Questions / Re: Java Security BS, Can I Get Around It? on: 2014-01-02 23:41:56
Hi,
I can't see your URL (404 error) to test your problematic applet, but have you signed all of your jar files correctly?
I use this script to make my applets work:

http://www.java-gaming.org/topics/ant-build-script-for-making-a-keystore-and-signing-all-jar-files/24532/msg/206697/view.html#msg206697

Cheers,
Keith
19  Game Development / Shared Code / Re: UxNetIO - new lightweight scalable network lib on: 2013-12-30 04:23:33
Cool, thanks for sharing, good idea to simplify MINA. I did a similar thing a few years ago when I tried to make a networked game. MINA is very good but it takes so much learning and implementation of wrapper classes just to figure out how to send a byte array!

Nowadays there's KryoNet which is used in many games and Riven's NIO library which I think is used in minecraft which are obviously also very good alternatives as you point out.
20  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-30 04:10:44
I think it's a very intuitive tool after reading the instructions and understanding the 16^3 restriction, I think you could get some artists trying it out if you advertised on an artist's forum.

Here's a barn:
http://www.angryoctopus.co.nz/lgmodler/index.php?model=CwAAGS0oGggeCQAomzgWCJt3AUm7iDMLZnhnC2aINAtEeGcLRHg0WScovGmNKLw.

It would be nice to have:
undo and redo
copy and paste
more colours
a finer grid
movement using keys

The right hand list of primitives is a great idea, I find it easier to select stuff from that menu.
21  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-29 20:59:25
Ah I see, now it makes sense. Maybe the label the ground with 'width' and 'depth' arrows and the sky with a 'height' arrow.
The visual cue for a boundary line being hit could be highlighted in red.

I was trying to make a log cabin but it's missing cylinders going from left to right.

Has the tool inspired you to make any tilesets? I think some really nice figures could be made.
22  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-29 19:45:54
Swiss cheese:
http://www.angryoctopus.co.nz/lgmodler/index.php?model=BQAAGy0ICQgteABAeAhXQLwIJEA0CEY.

It's great, makes very simple art look good with the shadows and smooth curves.
I couldn't control the primitive objects very well, for some reason I couldn't move them in certain directions, they would get stuck and not move. I suspect it's because they hit some boundary I couldn't see or maybe it's because I don't understand the reason for the dividing line between the upper and lower parts of the drawing surface.
Would also be great to have some more different angled primitives.
Nice job Shannon.
23  Games Center / WIP games, tools & toy projects / Re: Crowd of Force on: 2013-12-21 07:12:30
Hi,
I really like your game! Very interesting  Cool
The hints about attack and creation helped me figure out how to nearly beat level 2, i had 75% of the map and way more iron than them, but I died because i leveled up too much such that my iron went from positive one trillion to negative one trillion  Cranky
A few things that might make it better:
Rename creation to 'solders per second', attack to 'training per soldier' and iron production to 'bank interest rate', and iron to 'money'. This would make it a little more intuitive.
Put all the rules in one place on the website or in an in-game help screen activateable using a button, or at least have an option to turn off the dialogs so that the player is not pestered over and over again in level 1.
Give details on how the iron exploitation works. The algorithm is not specified so it's unclear what leveling it up actually does.
It took me about 5 games to figure out that the costs are 2^(theNumber). Why not just write the cost in brackets as (2^theNumber = theTotalCost)?
Make a four kilobyte version! The great gameplay you've got here could make it a winning entry in the j4k comp :-)

Really cool game for including the economics factor. Nice job.  Smiley
24  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-16 19:43:32
Hi,
I finally got ASM working after a lot of reading about how JVM byte codes and ClassLoaders work.

I made some code that reads an existing class's byte codes, modifies the byte code by adding some extra characters onto a String field within the class's method's body, then calls that method and prints the String returned which shows that the byte code changes worked and the String is different to the original. If anyone wants to mess with it, here it is: https://dl.dropboxusercontent.com/u/50479250/ASMTest.zip

Thanks for pointing out the opcodes that I should look into Riven:
Quote
new, newarray, anewarray, multianewarray, invoke*, goto, goto_w, if*, if_*, jsr, ret and athrow
I don't understand bytecodes and compilers well enough yet, but once I've read some more about these I'll probably have a few questions about how to calculate the amount of memory being allocated with each opcode, and how to chase the allocations made in other objects' methods if they're called.

I'm really looking forward to seeing this working. It'll be cool to have safe and secure client-programmable scripts that run on the server. Once the code's reasonably secure, I'll host a web page where we can upload and execute malicious java code on the server to see if these methods are effective

For anyone wanting to learn about ASM, these were good resources:
http://asm.ow2.org/doc/faq.html
http://download.forge.objectweb.org/asm/asm4-guide.pdf

Thanks for the advice and help guys.
25  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-15 18:42:47
Good idea, thanks! I'll give it a go and report back.
26  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-15 18:10:14
I downloaded eclipse and the AST plugin,
followed the instructions to get AST working in my program independently of eclipse:
http://www.programcreek.com/2011/01/a-complete-standalone-example-of-astparser/
Managed to analyse some code using the org.eclipse.jdt.core.dom.ASTVisitor class. There are heaps of 'visit...' methods which can be used to detect things, the javadocs are here:
http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2Fdom%2FASTVisitor.html
If I analyse this simple file:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
package eclipseast;
public class TestFile {
   public TestFile(){
      // a constructor
  }
   public boolean someMethod(){
      TestFile testFile = new TestFile();
      while (true){
         Object obj = new Object();
         break;
      }
      String str = "hi";
      return str.startsWith("hi there");
   }
}

It produces this output:
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  
43  
44  
45  
46  
Line 1: ASTNode of type CompilationUnit
Line 1: ASTNode of type PackageDeclaration
Line 1: ASTNode of type SimpleName named 'eclipseast'
Line 2: ASTNode of type TypeDeclaration
Line 2: ASTNode of type Modifier
Line 2: ASTNode of type SimpleName named 'TestFile'
Line 3: ASTNode of type MethodDeclaration
Line 3: ASTNode of type Modifier
Line 3: ASTNode of type SimpleName named 'TestFile'
Line 3: ASTNode of type Block
Line 6: ASTNode of type MethodDeclaration
Line 6: ASTNode of type Modifier
Line 6: ASTNode of type PrimitiveType named 'boolean'
Line 6: ASTNode of type SimpleName named 'someMethod'
Line 6: ASTNode of type Block
Line 7: ASTNode of type VariableDeclarationStatement
Line 7: ASTNode of type SimpleType named 'TestFile'
Line 7: ASTNode of type SimpleName named 'TestFile'
Line 7: ASTNode of type VariableDeclarationFragment named 'testFile'
Line 7: ASTNode of type SimpleName named 'testFile'
Line 7: ASTNode of type ClassInstanceCreation named 'TestFile'
Line 7: ASTNode of type SimpleType named 'TestFile'
Line 7: ASTNode of type SimpleName named 'TestFile'
Line 8: ASTNode of type WhileStatement
Line 8: ASTNode of type BooleanLiteral
Line 8: ASTNode of type Block
Line 9: ASTNode of type VariableDeclarationStatement
Line 9: ASTNode of type SimpleType named 'Object'
Line 9: ASTNode of type SimpleName named 'Object'
Line 9: ASTNode of type VariableDeclarationFragment named 'obj'
Line 9: ASTNode of type SimpleName named 'obj'
Line 9: ASTNode of type ClassInstanceCreation named 'Object'
Line 9: ASTNode of type SimpleType named 'Object'
Line 9: ASTNode of type SimpleName named 'Object'
Line 10: ASTNode of type BreakStatement
Line 12: ASTNode of type VariableDeclarationStatement
Line 12: ASTNode of type SimpleType named 'String'
Line 12: ASTNode of type SimpleName named 'String'
Line 12: ASTNode of type VariableDeclarationFragment named 'str'
Line 12: ASTNode of type SimpleName named 'str'
Line 12: ASTNode of type StringLiteral
Line 13: ASTNode of type ReturnStatement
Line 13: ASTNode of type MethodInvocation named 'startsWith'
Line 13: ASTNode of type SimpleName named 'str'
Line 13: ASTNode of type SimpleName named 'startsWith'
Line 13: ASTNode of type StringLiteral


The zip file with 2 simple java source files and the Eclipse EDT jar files that produce the output above is here if anyone wants to mess with it: https://dl.dropboxusercontent.com/u/50479250/EclipseAST.zip

I think it's feasible for me to weave time-checking methods into the start of all loop iterations (WhileStatement, ForStatement, ...), method calls (MethodInvocation) and others which allows me to terminate the 3rd party script in case it's carrying on for too long.

I could restrict access to all methods and classes except some that will be allowed, for example anything to do with game state or the basic classes like String, ArrayList and others. This can be done by querying the MethodInvocation or StringLiteral or other relevant ASTNode about what class of object is being created/having its method called.

But about controlling the problem of memory over-allocation, I don't think that I can easily restrict it by looking at the source code using this AST method. I mean how can I know that String[] stringArray = new String[Math.pow(100000,10000)]; is going to make a humongous String array just by looking at the source? I'm wondering if you guys know another method of monitoring memory allocation, perhaps using ASM and bytecode?

Cheers,
Keith
27  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-14 10:33:14
Great tips guys, I hadn't heard of AST or ASM. Both look very useful.

On preventing run-away scripts.  An other option is to do code weaving and have the script itself bail if it taking too long.
Great idea, thanks Roquen. I'll try this approach first.

1  
2  
3  
4  
String s = "";
while(true) {
   s += " ";
}

Hmm, i never thought of that problem, thanks Riven. I'll put your code through AST and see if it's possible to detect the implicit string allocation.

In the current sources I was playing with yesterday this is marked deprecated, and is also a no-op.  JavaDoc comment says "Auxiliary classes never really worked... don't use them."  Wink
Lol, that's too bad.

I suppose a small plug for Starsector (formerly Starfarer) would not be entirely inappropriate here, given its use of Janino in its scripting & extensive modding support.
I don't know if Alex (the game's creator) frequents these forums, but he could undoubtedly cast some valuable light upon the usability & security of using Janino in this scenario.
Great, I'll drop him a note on his forum/mailing list. Cheers
28  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-13 13:42:34
Hmm, interesting problem about the thread stopping. I guess Thread.interrupt won't work in an infinite loop.
I've never used it but how about byte code injection? That seems to be a way of adding arbitrary code over the top of someone else's code. Maybe you could inject some code that checks a flag at the start of every loop to see if the thread should die??
Another thing, why is it an issue for you if your user breaks his own program by making an infinite loop?

Janino is slowly adopting more recent java language specs, see the change log: http://janino.net/changelog.html
and future directions: http://docs.codehaus.org/display/JANINO/Licensing

Great, I didn't know that Janino had security features. I tried searching about it and found this:
http://dist.codehaus.org/janino/javadoc/org/codehaus/janino/SimpleCompiler.html#setParentClassLoader(java.lang.ClassLoader, java.lang.Class[])
There's not much more information/documentation than that. I'll have to dig into the janino source to figure out how to use it.

EDIT: Sorry I missed the point about ProtectionDomains. Cool, i'll look into that too: http://dist.codehaus.org/janino/javadoc/org/codehaus/commons/compiler/AbstractJavaSourceClassLoader.ProtectionDomainFactory.html#getProtectionDomain(java.lang.String)

Cheers,
Keith
29  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-13 11:19:00
Sounds like a cool piece of software you built.
It made me think of the eclipse IDE on the floy compiler, would it also be another way of doing what you want? Here's some details about it:
http://stackoverflow.com/questions/14226357/how-to-do-standalone-on-the-fly-in-memory-compilation-with-the-eclipse-compiler

... would be better but I don't know how to properly restrict access to the sensitive libraries in the JVM from malicious users.
In many ways if we're talking about end-user scripts I'm less concerned about that (unless you're promoting distribution of course) - let them break their own stuff!  I would love to find a good way of controlling things like infinite loops, without adding loads of extra overhead / memory inconsistency.
Ah I see, your application runs on the client's machine.
I want to run code on my server that the client submits, so I'd like a way to restrict what they can do. I ws reading about SecurityManagers but they seem to restrict the whole JVM. I'll have to look into Roquen's suggestion of using ClassLoaders.

About the problem of infinite loops, I was reading a while back that it can be mathematically/logically impossible to tell if a program will ever stop. But I guess by having a timer you could just terminate a thread that ran for too long.
30  Discussions / General Discussions / Re: Java's built in Scripting engine on: 2013-11-13 08:23:43
Haha, what a novel approach!

On the topic of locking down code, Google have an interesting library that locks down javascript code run on the client by untrusted third parties: https://code.google.com/p/google-caja/
Pages: [1] 2 3 ... 52
 

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 (44 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (205 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!