I've been working with Slick2D and Kryonet to create a pretty basic multi-player RPG. While the server portion and database have been literally just plug and play it seems I'm having trouble with the graphics. Essentially when launch the client I connect to the server just fine, upon a successful connection the actual Game launches. There is no error in particular but it launches to a black screen very briefly before terminating the client.
I was having trouble getting the code to format properly so below is a link to pastebin that contains the code. There are no errors thrown or anything along those lines so I'm not 100% sure what to look for.
Link to source
Error with my TiledMap file. Needed to edit the image sources for the tile sets.
Thanks to JNYRanger for suggesting debugging, took a couple tries but was eventually able to catch what was going on.
Related
I'm trying to create a Game Engine in java, as a way of learning in a course I'm attending, and now I'm learning how to program collisions between the player and a wall. But there's one problem I haven't seen anyone having, that basically my character runs into a wall and he just stops responding. And the way I say it, it's not like the program stopped responding, it's more like leaning against a wall the controls stop working, because even though everything seems to be stopped, the FPS keeps counting.
Here are screenshots of the parts I think are most important to show for this specific issue:
enter image description here
enter image description here
Here's the file and codes on github for a deeper look:
https://github.com/TheAwesomeCake/Game-Engine.git
Dears, can you help me with my problem as it's my first time using this software, and I wanted to download my application on my phone, but it kept showing some errors. I have read some of the familiar cases but couldn't figure it out. so can you help me, please !
My code, and I've highlighted the error that keeps showing up
This is what appears on my phone when i run the program
This looks OK, debugging always slows down the app, and you will have to wait for a bit. You can go faster using some of the available emulator to test it on your computer. Try genymotion, also you can even try bluestacks.
I have an applet packaged with a third part dll (from JTwain). My applet scans documents from the TWAIN compatible default printer. The applet fails on a paper jam and won't recover. The user navigates away from the page and the applet is destroyed. When returning to the page it fails again. Closing the browser (which kills java.exe process on the pc), and then returning to the page clears the problem and everything works.
I want to restart everything without requiring users to close down the browser. I've added a GUID query string to the URL's from which the applets resources are loaded - so I know nothing is being cached. I've checked in the windows task manager and there is no process created by the dll, it's all happening within the main java.exe process. I tried wrapping the scanning process in a thread so I could interrupt it in the stop or destroy methods (just in case the applets thread weren't stopped when the applet was destroyed), but that didn't work.
Any suggest would be greatly appreciated. Ideally I'd like some way to restart java when the applet unloads (but I doubt that's possible).
UPDATE
I've spent a couple of days trying to identify what causes the applet to fail. I still don't know :(
When the paper jam occurs something (not my code), is producing a couple of popups. The first alerts the user of the jam, and can be closed by clicking the OK button. The second says 'reading from device' and hangs. It cannot be close with the red, close window, icon in the top corner - I kill it from the task manager and windows asks to send a report regarding the 'non-responsive program'. I assume these popups are produced by the dll. And given that the second hangs, my assumption is that a thread started by the dll has hung while retaining a lock on some component of the TWAIN application. I get
com.asprise.util.jtwain.JTwainException: Failed to open the specified data source:
Source: TW-Brother MFC-9970CDW LAN Thrown
..when I try to access the scanner.
I'm at a bit of a loss as to how I can get more information. I'm testing my applet on a windows virtual pc (so as to use ie7), and don't have a method for step debugging in this environment. (And it's crashing on third party code for which I have no source anyway)
I see only two practical options here:
Use an API that handles paper jam without problems. Of course, that is easy to say (get robust API), harder to find.
Launch the app. free floating using Java Web Start. If it freezes up, the user can kill it and click the link for another instance in a new JVM. Or the applet might also call BasicService.showDocument(URLof.jnlp) if it can detect a problem with the DLL and is not itself frozen.
Of course, you should also report the bug to the ..Asprise(?) developers. The optimal solution would be to have the problem fixed at its source. Anything we do here is a 'workaround'.
Just a quick question about a program I've been working on. I've made an applet that has several sounds that play depending on the users input that all work fine when I run it through Eclipse. The problem is when I have the code embedded into the HTML, one of the sounds that should run for about 2secs when user completes the game, instead cuts out almost immediately.
What might be causing this?
I'm writing a Java application to automate character actions in an online game overnight (specifically, it catches fish in Final Fantasy XI). The app makes heavy use of java's Robot class both for emulating user keyboard input and for detecting color changes on certain parts of the screen. It also uses multithreading and a swing GUI.
The application seems to work perfectly when I test it without the game running, just using screenshots to trigger the apps responses into notepad. But for some reason, when I actually launch FFXI and start the program, all of my keyboard and mouse manipulations just stop working altogether. The program is still running, and the Robot class is still able to read pixel colors. But Robot.keyPress, Robot.keyRelease, Robot.mouseMove, Robot.mousePress and Robot.mouseRelease all do nothing. It's the strangest thing-- to test it, I wrote a simple loop that just keeps typing letters, and focused notepad. I'd then start the game, refocus notepad, and it would do nothing. Then I'd exit the game, and it'd start working again immediately.
Has anyone else come across something like this, where specific software will stop certain functions of java from working?
Also, to make this more interesting-- Last year I wrote a very similar program using the same classes and programming techniques to automate healing a party in the game as they fight. Last year, this program worked perfectly. After running into these problems I dug up that old program, ran it without making any changes, and found that it too was having the same problems. The only differences between now and when it was working: I was running Windows Vista and now I'm running Windows 7, and several new Java versions as well as FFXI versions have been released.
What the hell is going on? (if anyone needs to see my source code, email me at mikejturley#gmail.com. I'm trying to keep it to myself.)
FFXI has code to prevent cheating. Quite effectively, it would seem.
If possible, try it in WinXP. I myself have also written a bot for an online game that uses much of the same concepts (i.e. using Java Robot to read pixel colors and simulate key-presses and mouse-clicks).
Under WinXP:
Bot works as intended in all cases.
Under Win7:
Outside of the game, bot works as intended. Ingame, simulated input failed (pixel reads were okay, I think).