Roy Tang

Programmer, engineer, scientist, critic, gamer, dreamer, and kid-at-heart.

Blog Notes Photos Links Archives About Now

All entries tagged gamedev.

You can subscribe to an RSS feed of this list.

Nov 2019

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.

Posted by under notes at / Tags: #gamedev / Imported from reddit / Syndicated: reddit / 0

May 2017

Mar 2017

Jun 2014

Jan 2014

Dec 2013

Yeap. Well, you could always just try making a fan project and hope and pray that they don’t shut it down.

For contacting someone at EA, going through the regular channels like customer support or marketing/sales isn’t going to cut it; that’s not how deals are made, with their staff entertaining random proposals from people on the internet. The only way to get traction is to find someone on the inside who will listen to you - probably through game dev industry contacts or such. If you already have the capacity, I would suggest just making your own game first (maybe “inspired” by lands of lore, but not ripping it off directly) and hope that leads into a future path that might eventually get you where you want.

Posted by under notes at / Tags: #gamedev / Imported from reddit / Syndicated: reddit / 0

Aug 2010

Jul 2010

Dec 2009

May 2008

May 2007

Feb 2007

Apr 2006

May 2005

Nov 2004