Pkmn - A Pokemon-style engine


(Zachary Lewis) #1

I’ve been watching a bunch of TwitchPlaysPokemon and I wanted to relive the good old days, so I started work on pkmn. It’s going to be a Pokemon-style engine, complete with map changes, menus and battles.

Here’s a current version. It currently has Ogmo support and authentic character movement.

pkmn-0.0.1.swf (56.1 KB)

If you want to help, feel free to fork some stuff. I’ll keep a list of key features up somewhere, but I wanted to share it with you from the very beginning.


(David Williams) #2

Cool! feels authentic :D. However, the name “pkmn” makes me think of “Pikmin”.


(TaylorAnderson) #3

This sounds really cool, and definitely something I would be interested in for future projects. Thanks!


(Ultima2876) #4

Nice - I made a Pokemon engine back with Game Maker (about 10 years ago) and it got over 2000 replies in the topic. It was quite popular! I never finished it though - got the maps working really well but never finished the battle system.


(Zachary Lewis) #5

Got typewriter dialog working. Press SPACE to continue dialog or to bring it back up once it’s closed.

pkmn-0.0.2.swf (112.2 KB)


(Danny) #6

After watching TPP, I wanted to make some pokemon-like game but I’m too lazy. This is nice.

I downloaded the source and a while later I realized the zip was called pkmn-master. lol


(Nate ) #7

right in the nostalgia


(Zachary Lewis) #8

I’ve been working on updates to it lately! The next check-in should have talking NPCs and map transitions!


(Zachary Lewis) #9

Interactions are now a thing.

pkmn.swf-0.0.3 (58.7 KB)

I’ve set up interactable objects with the use of an interface. Additionally, I’ve set up Ogmo to play nice with the project.

As you can see, NPCs are a different object than the basic interactions. The DialogueNPC class extends the Actor class, which handles drawing the sprite, movement and collision. The Interaction class extends Entity and does not move or have a graphic.

Both DialogueNPC and Interaction implement IInteractable, allowing me to do a single collision check when the player presses a button. If the player would interact with an IInteractable, each of the two classes handle their own interactions. In the case of the DialogueNPC, he faces the player and dialogue begins. In the case of the Interaction, the dialogue is the only thing that happens.

I also have stubbed out an interface, ITouchable, for objects which are touched (like doors, stairs, tall grass and healing pads). I think those are really the only two kinds of interactions in the game. I’m not counting trainers spotting you, since that isn’t a player interaction and will probably be handled by a component-based AI system on a per-actor basis.


(Ultima2876) #10

This is sweet. Keep goin’!


(mikale) #11

Awesome! I really like where this is going.


(Jacob Albano) #12

“These books seem to be untouched. They must be college textbooks.”

Ugh it’s SOO TRUE


(Christopher Hill) #13

Looks awesome! Love to see this develop further.


(John Andersson) #14

Extremely cool! :smiley: Maybe increase the walking speed by 10%?


(Ssnyder Coder) #15

This is pretty neat! I’ve forked this project at https://github.com/ssnyderCoder/pkmn. I’ve been playing around with it and have added basic map transitions and a second map. I might try adding more if I get the time.

pkmn_0_03c.swf (116.7 KB)


(Ssnyder Coder) #16

Hey guys, I have added a few more things:

- The screen will fade to white and back when you transition from one map to another.
- There is now a 3rd map that separates the first 2 maps.
- NPCs can now have sprites other than the Scientist
- Dialogue text is now automatically formatted to 17 characters per line.  No need to do this manually in Ogmo.
- There is now a non-functional ingame menu that can be opened and closed by pressing ENTER.

pkmn_0_04.swf (126.0 KB)


(Zachary Lewis) #17

This is awesome.


(Ssnyder Coder) #18

Glad you approve :smile:

I added a bit more content:

- More NPCs!
- Added another map for traveling through the cave
- NPCs can now start off facing a certain direction
- NPCs can now have "behaviors" which can cause them to watch something, wander around, or....something else....

pkmn_0_05.swf (134.4 KB)


(Ssnyder Coder) #19

Lots of big changes this time!

- Several maps have been renamed and slightly expanded.
- The Ingame Menu now only shows functional selections
- Menu: Exit now works!
- Menu: Options now works!  Try changing your text speed!
- Menu: Trainer (Zachary) now works!  It shows your actual time spent playing!
- Menu: Save now works! Save the game and come back later to resume playing!
- Menu: Items now works! You start with a half dozen items, most of them useless....for now.
- You can now use the Bike!  Select it in your inventory with SPACE to get on and off.  It only works outdoors.

I’ve also done quite a bit of refactoring. The next thing I will probably work on will be adding Item Balls to the map. Then after that, I’ll try to add scripted NPCs that give items and do other things. It will definitely take some time to add the battle system, Pokedex, and Pokemon, though.

pkmn_0_06.swf (155.6 KB)


(Zachary Lewis) #20

Is the trainer in the cave a reference to Twitch Plays Pokemon? :grin: