• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Discussion] Pokemon Games with GameMaker Studio?

ArminRocks1442

Wooper is Badass!!
  • 11
    Posts
    9
    Years
    Hey guys.
    So I've been working with GM: Studio for years now. And whenever I want to start with a pokemon game I get frustrated because the battle nor the OW engine works. I have tried to be a ROM hacker. But sometimes it gets too complicated with all those limited maps and offsets and stuff. That's why I'm trying to go to GMS for making my very own pokemon game. Plus, I'm kind of experienced in that direction. So what i'm asking you guys is that if you can think of a battle and OW system for GMS, I would be happy to hear it. ;)
     
    I am currently making a pokemon game in game maker studio. I think it is totally feasible if you know how to code turn based battles effectively.

    However, it is difficult. You would need to create an extensive array filled with each pokemon, its stats as well as its movesets. It's a big project. For most cases, I would use pokemon essentials, but I really wanted to tackle this as a project for fun.
     
    It's difficult because GameMaker lacks the ability to write custom data structures. You can simulate it with 2 dimensional arrays, or any other built in GM data structure, but it takes significantly longer. You must know some computer science to even write a Pokedex implementation in GM since you would have to write your own sorting function.

    I am currently solving this problem by declaring data structures in a different language. However, the data structures are written in TOML (a format that closely resembles Essential's .txt files but is a well known file type), and then transcompiled into another language and then output so that it can be used as a GM extension. I do not consider it stable thus far but anyone interested can look at my code. Please note that I am in progress of a refactor, and once a battle system is working, I am planning on posting an official topic here.

    Other than data structures, GameMaker is a really good choice. It's very easy to write an OW in GM.
     
    I've been working on a Pokemon engine in GM: S and to be honest, it's really easy. The only issue I have is lack of time, but GM: S is pretty great for 2D stuff. I used to think it would be too complicated, but just take an intro to programming course and then you can pretty much write your own GM functions in the GML language (aka pseudo-Java, as I like to call it).

    Also I don't see a problem with data structures. One of the most handy way to do it is to use it's built-in data structure grid (here: https://docs.yoyogames.com/source/dadiospice/002_reference/data structures/ds grids/index.html), and you can set it to a global variable and access it any time. It's what I'm using for my party system and I've had no problems with it whatsoever.

    Really, it's not difficult at all. If you know the basics of programming and if you're willing to look into the full extent of GM: S's functions, it just becomes a matter of looking up the data structures in the official games on Bulbapedia and just translating it to GML.

    Now, I will say though, that if you don't know GML (or C++/Java) and just use GM's drag-and-drop functions, then it would pretty much be impossible to make a Pokemon engine.
     
    Last edited:
    I agree with the previous posts, GM: S could work quite well for a Pokémon engine.

    The syntax used for using the data structures is a bit of a pain though, and being unable to declare custom objects (objects as in OOP, I'm not talking about GM: S objects here) makes implementing the thing rather difficult. You can't just create an object called PokedexEntry, for instance, and make methods for it, like pokedexEntry.markViewed(true) or something.

    This is the biggest reason that, frankly, could deter me from attempting to create a Pokémon engine in GM: S. I don't like not being able to use real, flexible OOP and relying on a bunch of scripts.

    If that doesn't stop you, then... go ahead! :)
     
    GM: S can definitely be used to make a Pokemon fangame. I'd suggest that you keep all the global information--such as Pokemon and their data--in a ds_map structure. Probably using the Pokemon number as the key, and then a second-tier map handle as the value. This way, you can create, modify, and access the information you need at any given time in a more human-friendly way than if it were all numerical indexes. In addition, GM: S has a pair of handy functions that can encode nested maps as a JSON object string, and decode them back to maps, meaning that during testing and the final product, your saving and loading will be vastly simplified.

    As for OWs and battles, here's a tip: use instance creation code to set local variables for everything that makes each OW unique. That way, you can just have instances of a single OW object which each behave uniquely in the game based on their variable values. And for battles, a similar idea helps: have just a single battle room with an initializer object instance in it. That object will control the battle as it goes, based partly on data stored in global variables (i.e. a global map of opponent's Pokemon and their stats, an array of trainer items, etc.). This way, the OW can simply set that global data when interacted with, based on its local variables, and then send the player to the battle room.

    As for battle AI...that completely depends on how much work you want to put into this. AI is a broad field, and it offers lots of flexibility depending on what you want from it. The naive approach would simply be to simulate every option each turn (i.e. each move and each item usage) and then choose the option that results in the highest self-heal-to-enemy-damage ratio. That ignores things like inflicting status effects and the possibility of swapping Pokemon, and it doesn't think ahead, but it's basically okay; more advanced AI requires you to work out patterns in general player behavior and code those up yourself :)

    In short: yes, this is definitely possible to do, and there are many ways to do it.

    I agree with the previous posts, GM: S could work quite well for a Pokémon engine.

    The syntax used for using the data structures is a bit of a pain though, and being unable to declare custom objects (objects as in OOP, I'm not talking about GM: S objects here) makes implementing the thing rather difficult. You can't just create an object called PokedexEntry, for instance, and make methods for it, like pokedexEntry.markViewed(true) or something.

    This is the biggest reason that, frankly, could deter me from attempting to create a Pokémon engine in GM: S. I don't like not being able to use real, flexible OOP and relying on a bunch of scripts.

    If that doesn't stop you, then... go ahead!

    While I certainly understand the appeal of OOP syntax, don't forget that GM's objects have user events, which can be used like member methods. Sure, it's not exactly the same thing, but it's functionally quite similar, and I feel the shortcomings of it are far made up for by GM's abstraction of things like rendering, audio, and window management.
     
    Back
    Top