Posts Photos Archives About

Subscribe: RSS JSON

2021 June

2021 April

2020 November

2019 November

  • Decision trees like "which starter pokemon do you pick" aren't things that should be embedded into your code as if/else statements. These should be data that your code loads.

    For this specific example, you could have a data file that has a list of all the available starter pokemon. How many are available to choose from? Your code will read these data files and present them as choices. The data files could include the dialog text and say, an ID string to indicate which pokemon would then be added into your party, something like this (JSON format, because it's easier for me:

    starters: [

    { "dialog": "I choose Charmander!", "pokemon_id": "0001"},

    { "dialog": "I want Bulbasaur!", "pokemon_id": "0002"},

    { "dialog": "I want Pikachu!", "pokemon_id": "0003"}


    (I forgot who the 3rd starter was supposed to be, I'm not big on Pokemon. Also I'm guessing those aren't the actual pokedex IDs)

    Each item on the list could also contain some other info. For example in dialogue trees, you might have NPCs react differently depending on what you say, so in that case each node would have an id pointing to the specific NPC response.

    The idea is to separate the data from your code, since those are totally separate concerns. This is a general programming principle not specific to game development. In this way, you make it easier to modify your data (like decision trees) without necessarily having to rebuild your code. For example, you could change the dialog message for each pokemon starter choice, or maybe you could add more choices, or make the starter pokemon be Snorlax, MewTwo and Ekans for some reason (those are pokemon right? Lol). Bigger game studios will have separate tools to maintain those data files so that even nonprogrammers can help change those kinds of things in the game.

  • extract your decision trees into data files outside of the code.

2018 November

  • 🔁 Repost from bayaniph:

    2 days left until BAYANI – Fighting Game’s Kickstarter launch! Support us & get the chance to play BAYANI’s playable demo before it gets released anywhere else! Let’s make BAYANI even more awesome! #Nov28 #PleaseRT #bayaniPH #indiegame #gamedev KS Preview:

    (Click photos to view full-size)


2017 May

2017 March

  • 🔁 Repost from studioanisa:

    Say what you want about the switch but stories like these encourages us #gamedev to create diverse games!#accessibility #ux #nintendoswitch

    (Click photos to view full-size)


2014 June

2014 January

2013 December

2010 August

2010 July

2009 December

2008 May

2007 May

2007 February

2006 April

2005 May

2004 November