In this section I'll go over some of the technical details of the program. Every now and then in the news section I mention something technical like RMI or Sockets. Here I'll go into detail on these things I'm discovering!
Information Last Updated Feb. 13, 2007
Issues with version v0.2-:
The current problem with this version is that each move the player has to be evaluated against everything in the map. This presents a ton of overhead and as visible in v0.22 (to be posted within the next few days). The maximum area size is limited by these flaws and this is just an annoyance.
The version 0.3+ solution:
The proposed solution to the errors of 0.2 is to switch to a grid system much like the actual pokemon games. The player will move a square at a time. This system will allow a simple comparison to the area surrounding the Trainer instead of comparing him / her to everything. As well as solving lag issues the speed will be regulated more. Finally these changes will allow rows or entire columns of the screen to be loaded with each move (further reducing lag issues as well as creating seemingly endless maps, again, like the game).
Following version 0.3+ will be 0.4 with a possible database connection (more efficient storage of maps and other information).
Issues with Action Tiles:
I'm finding it difficult to use tiles with movement attached to them. The problems stem from how the main was coded. I need to write a generic function to have the screen follow the player. Noticeable in version 0.12
Issues with Player Movement:
- Key Listener:
It appears that the key repeat rate is not standardized throughout the various operating systems. I'm looking into creating my own key listener that sets a default.
- Over Layers:
It has come to my attention that moving the player an odd number of pixels usually results in the screen going off balance. If I have the player move one pixel at a time the equality methods don't seem to work correctly and the player / grass fight for supremacy of the screen. These glitches are noticeable in version 0.12
Issues with Sockets:
Sockets wouldn't work for the Server because sending the same object more than once fails. When you send the same object twice the output stream sends a termination signal instead. Basically it is saying "I've already sent this object, I don't care if you've changed values!" The solution to this problem was to send new Objects each time but this caused a problem where each of these would be remembered. This memory of the objects was dragging at the ram of the the client machines.
I wrote an RMI server and client that uses 'Call Backs'. This makes the process go in a circle from the client to the server to the call back to the client and back again.
Initially the the problem was that the server didn't know its external ip address. It would get contact from a client that would go like the following scenario with "Bob" as the external ip address and "Frank" as the internal:
Client Says "Hi there Bob here's the information on where the trainer is"
Server Says "!?!?!! **** you! Get the **** away from me you crazy person my name is Frank not Bob!"
End of Conversation, and rightly so. The Server knew itself as a local ip address and I found a tip off some forums that you have to tell it who it is!
Now the problem is that CallBacks don't work through firewalls correctly. Information can be sent from the client but never be returned properly. There is no know cure to this with some magic command added to running the program.