[Java] Pokémon Walking algorithm

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Updated to v5.

You can look at the source code here at GitHub.



Changelogs:
+ Tweaked the walking algorithm again.
+ Added additional debug info for inputs. Will show text depending on inputs being tapped or pressed.
+ Fixed a long standing bug issue with KeyListener. You can no longer experience lag and delayed input.

Known Issues:
- Unreproducible bug where you can get stuck in a tree. Very rare, and very hard to do.

Plans:
  • I might be able to start moving on to something else other than plain walking in the forest. Currently eyeing on warp points and overworld.
 

Attachments

  • walking_v5.zip
    50.1 KB · Views: 471

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Update to v6

Changelogs:
+ Added another area you can go to. Yes, the warp system is now implemented!

Known Issues:
- Same unreproducible bug found in v5. Still no idea how to fix it.


Update: 2014-April-19, total downloads @GitHub: 13

Total: 20 downloads for v6. Yay!
 

Attachments

  • walking_v6.zip
    50.6 KB · Views: 410

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Updated to v7

Changes:
+ Yay for ledges!
+ Jumping!!
+ Another area to explore!
+ Fixed the unreproducible bug. Apparently, it's a side effect of having so many if...else... without any breaking in-between. Used "return" and refactor codes to make it work.

Currently, no known issues! :D
 

Attachments

  • walking_v7.zip
    45.3 KB · Views: 452

Accname

2D-Graphics enthusiast
Reaction score
1,462
You usually add a documentation (in the form of a javadoc) inside your source files.
I would highly suggest you do that. Especially when working with a high level IDE (like eclipse or netbeans) this is very useful.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Oh, that?

It sucks because Android doesn't support creating/editing/modifying javadocs. But I'll do that. I better need to learn how to write one.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Cant be true. I bet you are confusing something.
The javadoc is written as plain text right into your source files.
Instead of regular comments /* this is a comment */ you do /** this is a jdoc */.
Example:
Code:
/**
* This is a jdoc, isnt it nice?
* @throws NullPointerException if the world does not exist
*/
public void doStuff() {
 
}
Then you can later have the "actual" javadoc created from these comments inside your source files.

By the way, most IDE's have this already build in.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Update:

  • Added overworld (alpha).
  • Completed ledges.
  • Minor stuffs.
 

Attachments

  • walking_v8.zip
    50.2 KB · Views: 435

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
  • Added mountain ledges. (beta)
  • Completed stairs.
  • Decided to do a timelapse of the area. That means, from this version onwards, all subsequent releases will have the areas modified slightly with new stuffs added. I won't be changing much of the area until it is required to do so.
 

Attachments

  • walking_v9.zip
    57.7 KB · Views: 434

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
5NyImkw.png

  • Added water!
  • Added bitmap animation! (Complete.) This increases the development time by a lot for future animations. :(
  • Surfing! (Alpha)
  • Water borders! It took a long time for me to draw the tiles. (Beta)
Known Issues:
  • (NEW) Increase the thickness of the ledges. They are absolutely horrible.
  • (NEW) Do something that will force the player to do some task before surfing.
  • (NEW) I should start updating the first post with new images.
 

Attachments

  • walking_v10.zip
    70.1 KB · Views: 414

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
39Ri63d.png

  • Added dialogues
  • Did a minor change to the bitmap.
  • Going to start the dreaded cleaning of the codes.
Feature freeze until everything is sorted and cleaned.
 

Attachments

  • walking_v11.zip
    84.2 KB · Views: 415

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Continuation of the Dialogues.

  • Codes are a bit cleaned up, but still is a mess. I realized that if I were to refactor the methods around, it will break many game logics that are in place.
  • Added signs.
  • Added interaction. (Before, Z, X, '/', and '.' are used to read through the dialogue. Now, Z and '/' are used to interact with signs, X and '.' are used to cancel the interaction.)
  • Added directional interaction. Player will only interact with objects in front.
  • Added modular dialogue creation. I separated the dialogues from the game code, in order to make it more flexible for future updates.
Again, source code can be seen at GitHub.
 

Attachments

  • walking_v12.zip
    86.1 KB · Views: 429

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
032wf8V.png


Decided to create a level editor for the game. It's been so long since I have worked on the main game, but having a level editor under my belt isn't a bad thing. Updates given below:
  • Created a standalone level editor for use with the main game.
  • Fixed some of the known tile issues since the last release.
  • Decided to cut down on taking the "Release early, release often" software development philosophy too literally. It's best to make fully-playable releases every now and then.
  • Tile artworks are modified a tiny bit, to make room for additional game areas in the future.
  • Added new tiles.
  • Bugfixes.
No release for the main game right now. Please enjoy the level editor. From this point on, all game areas are to be created from this level editor. This means tile issues will be merged into editor issues, which I can then centralize my efforts to the main game and the editor itself.
Controls:
  1. Click on "New" to create a game area.
  2. Left mouse button to select a tile in the Tile Selection Panel. Tile named "Empty" means the tile is transparent and non-existent, and it is a "NO PNG" tile.
  3. Left mouse button to place 1 tile in the drawing area. Note that you can only put down 1 tile at a time. No continuous placements for now.
  4. Hold right mouse button to pan the map around.
  5. There is no zooming feature.
  6. Click on "Save" to save your map. The map's file name is the name of the directory that the map is saved in. This is a default Java Swing limitation.
  7. Click on "Open" to open your map.
  8. Note that when the map is created, the map is saved as a PNG file. The whole PNG file is 99% transparent, and you probably have no idea what the contents are. Do not modify the contents using commercial/free image editors out there, unless you know exactly what the contents are.
  9. You can view the documentation provided in the source code to understand the contents of the PNG file, which will then mean you know the contents.
 

Attachments

  • editor_v1.zip
    128.3 KB · Views: 420

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
This is a great milestone for me!

Updates:
  • Game: Added and implemented the last movement for my walking algorithm: Bicycling!
  • Game: Added start menu.
  • Editor: Opening custom maps will cause some tiles to be corrupted.
Controls:
  • To activate start menu, press Enter.
  • From there, just like actual Pokémon games, move up and down to choose. Press 'Z' or '/' to confirm.
  • Press 'X' or '.' to cancel.
Why it's my milestone?
My main goal of this project is to implement all walking (or maneuvering) actions that existed in the Pokémon 1st and 2nd generation games. This goal is now completed with the advent addition of bicycling, surfing, ledge-jumping, walking, and collision detection/response.​
Therefore, I deem this release as the official 1.0 release.​
Enjoy!​
 

Attachments

  • walking_v13.zip
    130.7 KB · Views: 399
  • editor_v2.zip
    130.7 KB · Views: 396

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Quick bugfixes:
  • Game: Fix issue where walking into the door stops the game from running.
  • Game: Fix issue where doing an action in the start menu in front of a sign causes text residues to stay until all dialogues are finished.
  • Game: Fix issue where movements are not locked while holding down directional keys while getting on/off the bicycle.
 

Attachments

  • walking_v13a.zip
    132 KB · Views: 672

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Updated to v14:
  • Added Item Balls. You can now pick up items in the overworld.
  • Added incomplete Inventory.
  • Editor: Fixed Editor not correctly opening up maps that have been created by the editor. Addressed a long time ago, now has been pushed.
  • Editor: Added items. Refer to specifications to draw items. There are only two items: RETURN (id: #0) and TEST (id: #1).
Known Issues:
  • All item functions have not been implemented yet, therefore the item will return you to main menu once you select it.
  • Since the MILESTONE #1 has been reached, all of my priorities will be shifted to LOW. That means LOW activity, LOW updates, etc.
 

Attachments

  • editor_v3.zip
    151.4 KB · Views: 649
  • walking_v14.zip
    151.4 KB · Views: 383

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Update to v15:
  • Inventory is now fully functional.
  • Moved BICYCLE to Inventory.
  • Made item balls that players can be picked up.
  • To ride BICYCLE, you have to find it.
This update is one of the most mundane development I have ever done. Rendering fonts and getting it to work between layers and buffers is like sticking a bayonet into the monitor over and over again.

ajwgYbZ.gif


Yeah, that twist. Ugh... much cringe.

The next plan is to do something different, other than the technical stuffs (Inventory being one of them). It's been so long since Joe (our main protagonist) has done anything other than setting up a home. Hm...
 

Attachments

  • walking_v15.zip
    175.2 KB · Views: 665
Last edited:

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,633
Update to v16:
  • Added ability to place your custom maps into the game.
  • Custom maps can be created using the level editor provided.
  • Included readme and GIF tutorials.
  • Editor: Tried to fix unexpected behavior when creating new map. (Width and Height somehow were set to 0)
GIF (HTML5) Tutorials (GFYCAT):
How to use the Level Editor, part 1: http://www.gfycat.com/NextNeighboringFluke
How to use the Level Editor, part 2: http://www.gfycat.com/FrighteningGargantuanDonkey
How to use the Level Editor, part 3: http://www.gfycat.com/SneakyTalkativeAcaciarat
You Should Know when starting the game: http://www.gfycat.com/CloudyBonyGlowworm
Adding your Custom Maps: http://www.gfycat.com/WeepyUnsightlyFairybluebird
Loading your Custom Maps: http://www.gfycat.com/FamiliarUncommonIndianabat
 

Attachments

  • walking_v16.zip
    179.5 KB · Views: 672
  • editor_v3a.zip
    179.8 KB · Views: 646
Last edited:
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top