Agent: 00PK

When I die, then try to quit it gives me an error that it cannot save the player. This exception is in the console.


java.io.FileNotFoundException: C:\Documents and Settings\Mark\Desktop\Players\Eli.pksave (The system cannot find the path specified)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at apk.FileManager.save(FileManager.java:20)
	at apk.ModelGL.factorKeyPresses(ModelGL.java:260)
	at apk.ModelGL.runMainLoop(ModelGL.java:76)
	at apk.OptionMenu.makeChoice(OptionMenu.java:155)
	at apk.OptionMenu.factorKeyPresses(OptionMenu.java:125)
	at apk.OptionMenu.start(OptionMenu.java:66)
	at apk.Agent00PK.showOptionMenu(Agent00PK.java:100)
	at apk.Agent00PK.<init>(Agent00PK.java:54)
	at apk.Agent00PK.main(Agent00PK.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Also, don’t save to my desktop please. I would rather not have these files on my desktop.

That’s just leftover from when I used file browsing and it saved the player save in the Players folder in the game directory. Now that it’s webstart, I still need to create a folder in your preferences folder.

While I’ve got people here, does anyone mind posting exactly how you link to the path of the preferences folder using Windows and Linux? On Mac OS X it’s /Users/user.name/Library/Preferences. The only thing holding me back from making save files there has been not knowing the paths for other OSes. So if I could get help that would be great.

Well that was… odd.

Seemed to load and start fine, but I was very, very confused by the level. Not sure if that was a road in the background or what on earth the fences and platforms were doing. I think you really need to get a consistent perspective for the game and make it obvious where the actual surfaces are that you can interact with and what’s just random fluff you can ignore.

Spent 5 mins trying to make the first jump then gave up when I fell straight down the second hole. Sorry. ???

:slight_smile:
Well that’s not too surprising to me. I’ve started a training level that’s a lot more straightforward, which I will release in the near future. I also have spent some more time on the Physics, so it’s easier to survive.

System.getProperty(“user.home”);

Should work on all three systems.

To use preferences though, you should use the Preferences class. Java automatically maps them. On Windows it stores them in the registry. On Linux and Mac it stores them in a file store.

Check where FileSystemView.getFileSystemView().getDefaultDirectory() resolves to on MacOS X. I’ve used it in the past, since it resolves to “My Documents” on Windows and “/home/” on Linux. I would also add “My Games/” or something to the resulting path. That’s what Crysis did.

Okay, that sounds perfect. I know that the default directory on Mac OS X is also your documents folder, so that should work nicely.

I’ll implement that soon, thanks guys.

Hi Demonpants,

Interesting game here but I’m not able to play it because of the controls. I try to jump while running but it doesn’t work at all. The only time I jump is when I don’t move. And I can do multiple jumps in a row like moving in thin air. At that time I get killed by that bad guy because he shoots me something. :slight_smile: Also, it seems to me that there’s too many keys to master at the beginning. Controls are easily an issue, right? :slight_smile: (thinking about my game)

And speaking about gravity, I have the impression to have the mass of a sheet of paper. It really need adjustment.

Graphics are good, thought they are lacking perspective. Take the street for example.

You’re quite right, there is indeed a ginormous (if that’s a word) difficulty curve to learn the controls. I don’t think the problem is the number of buttons, it’s more the number of combinations, completely without any tutorial. I’m hard at work making a tutorial for the game, so I’ll make sure to get a new opinion after that.

Please give me an URL to a screenshot of your game as I’m currently writing the Java Game Tome, you know it.

You can use either of the two screenshots on this page:

http://www.otcsw.com/agent00pk.php

Another update added, this is a pretty big one. Webstart is still here: http://www.slyhawk.com/agent00pk/webstart/Agent00PK.jnlp

[quote]May 13, 2008 – Robots added. Homing missiles added. Level selector added. Webstart custom level support added. Webstart save file support added. Bug fixes and tweaks. Sound added. Level loading optimized.
[/quote]
I implemented some pretty damn cool robots that are using the dumb idiot AI I had implemented for testing purposes. This makes them a lot easier to deal with than the guards, but they have the addition of homing missiles. These missiles will follow you to the ends of the earth… but can you perhaps lead them back where they came from? I’m in the process of adding “spurt” missiles as well, which will be a lot faster but easier to trick.

The app now creates a resource folder in the user’s home directory. Using it, you can save your custom levels, although you can’t change the background or static body images without some adjustments that will happen in the future. That’s all cosmetic, though – functionally the level editor is all there. To find and share your custom levels, go to your home directory and look for the “.agent00pk” folder. And if Kev is reading this… well, maybe I decided that you had a good approach after all. :stuck_out_tongue:

The app also uses the resource folder for save files. Whenever you finish a level, your progress is remembered. When you exit from the actual game (via escape), it will ask you what you want to name your save (temporary solution). To load your save, go to load game and type in the exact same name, case sensitive.

Sound has been implemented. My friend Bryan Highhill made two awesome background songs for the levels, check them out. He also made a short loop for the menu.

I also changed some random things, improved some stuff, etc. The control should be significantly better than last time, but it still needs a lot of work.

I really don’t have time to read all the posts on this thread but here are my quick comments:

  • huge graphics improvements here! :smiley:
  • the main menu is slow, not really responsive
  • bug: I try to jump while running but it never works. I can only jump while stand still.
  • bug: I played the tutorial, then got back to main menu and when I tried to restart the tutorial it got back to the menu. This bug occurred again and again.

Keep up! :slight_smile:

Thanks for the comments!

Yeah, the menu refuses to listens to keys until a certain pause happens, and that can cause a lot of annoyances. I need to redesign that at some point.

Yup, running jump is broken, and definitely needs to be fixed. I imagine it’s nothing but a two second change, but I have yet to actually look at it.

This bug is one whose source still eludes me, which is pretty frustrating. It comes up very rarely and so I’m having trouble diagnosing it. The solution is to restart the game, but that definitely shouldn’t be necessary. Think you could reproduce the circumstances where it happened?

Thanks again.

Could your running jump be “running” into this problem ?

http://www.java-gaming.org/index.php/topic,17883.0.html

Nice looking game you have there.
Though I found it hard to start and like what others said the physics make the game harder and to me annoying.

Nope, it has to do with the way I created the Actions.

Thanks for the advice, though!

I had missed this before, but it actually looks very promising! The obvious thing that needs to be improved are the controls, like others have said. (btw how do you pull yourself up when hanging from a ledge?) Also, the level makes it hard to determine what objects are part of the foreground and what of the background.

Huh?

15 posts, all advertisements (look at his sig)