[Java] Pokémon Walking algorithm

Discussion in 'General Members Projects' started by tom_mai78101, May 12, 2013.

  1. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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.
     

    Attached Files:

  2. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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!
     

    Attached Files:

  3. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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
     

    Attached Files:

  4. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
  5. Accname

    Accname 2D-Graphics enthusiast

    Ratings:
    +1,551 / 4 / -4
    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.
     
  6. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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.
     
  7. Accname

    Accname 2D-Graphics enthusiast

    Ratings:
    +1,551 / 4 / -4
    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.
     
  8. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    Most, but not AIDE.
     
  9. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    Update:

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

    Attached Files:

  10. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    • 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.
     

    Attached Files:

  11. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    [​IMG]
    • 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.
     

    Attached Files:

  12. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    [​IMG]
    • 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.
     

    Attached Files:

  13. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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.
     

    Attached Files:

  14. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    [​IMG]

    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.
     

    Attached Files:

  15. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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!​
     

    Attached Files:

  16. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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.
     

    Attached Files:

  17. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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.
     

    Attached Files:

    • Like Like x 1
  18. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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.

    [​IMG]

    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...
     

    Attached Files:

    Last edited: May 20, 2014
  19. tom_mai78101

    tom_mai78101 The Helper Connoisseur / Ex-MineCraft Host Staff Member

    Ratings:
    +985 / 4 / -1
    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
     

    Attached Files:

    Last edited: May 21, 2014
  20. jonas

    jonas Well-Known Member

    Ratings:
    +42 / 4 / -0
    Pretty cool! v16 doesn't run for me though :(
     

Share This Page