<p>My friends and I are starting a game like Pokemon and we wanted to know how will we add monsters to the game?  We're using VisualBasic because my friend's brother said it would be easier.</p>

<p>So far we can put pictures of the monsters on the screen and you can click to attack and stuff.</p>

<p>Right now when we want to add a monster we have to make a new window.  This will take us a long time to make all the windows for each type of monster.  Is there a tool or something to make this go faster?  How do game companies do this?</p>

[{'answer_id': 80096, 'author': 'Chris Bunch', 'author_id': 422, 'author_profile': 'https://Stackoverflow.com/users/422', 'pm_score': 1, 'selected': False, 'text': '<p>I\'d suggest making a list of all the attributes you would need for each monster and store all of that in a database like <a href="http://www.mysql.com/" rel="nofollow noreferrer">MySQL</a>. This way you don\'t need to make windows for each monster, only each time a monster appears (in which case you\'d just get the necessary info from the database).</p>\n\n<p>If you\'re not familiar with any database, check out the <a href="http://dev.mysql.com/doc/refman/5.0/en/tutorial.html" rel="nofollow noreferrer">MySQL tutorial</a> to get up and going.</p>\n'}, {'answer_id': 80097, 'author': 'dreamlax', 'author_id': 10320, 'author_profile': 'https://Stackoverflow.com/users/10320', 'pm_score': 0, 'selected': False, 'text': "<p>Once you have created your artwork, I would load it dynamically from the hard disk rather than compile it into one big EXE. You can use the PictureBox control's LoadPicture method.</p>\n"}, {'answer_id': 80100, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>You need to learn about data, data structures and loops. Your monsters should consist of data, and maybe some code, then your monster display screen will display and operate a monster based upon this data and code.</p>\n\n<p>Copy and pasting widgets will not work out for you. Learn to abstract data and logic from widgets.</p>\n\n<p>Stop using VB right now and go play with <a href="http://scratch.mit.edu" rel="nofollow noreferrer">http://scratch.mit.edu</a> it is much more suitable.</p>\n'}, {'answer_id': 80102, 'author': 'Bernard', 'author_id': 61, 'author_profile': 'https://Stackoverflow.com/users/61', 'pm_score': 0, 'selected': False, 'text': "<p>What do you mean by, 'when we want to add a monster'? Do you mean you have an individual window for each monster, which is shown when that monster appears? To build on what sit said; design, design, design. Ad Hoc design methods do not scale beyond the smallest of programs.</p>\n"}, {'answer_id': 80104, 'author': 'metao', 'author_id': 11484, 'author_profile': 'https://Stackoverflow.com/users/11484', 'pm_score': 3, 'selected': True, 'text': '<p>I think the best solution would be to make a generic window which can take a few parameters which describe the monster. </p>\n\n<p>Im not entirely up-to-date with VB, but in an OO language we would have a Monster base class, and inheritance to create a Pikachu. The base class would define basic things a monster has (like a picture and a name and a type) and things a monster could do (like attack, run away etc). You could even use a second level, and have base classes for each type (like ElectricMonster which inherits from Monster, and Pikachu inherits from ElectricMonster).</p>\n\n<p>It then becomes really easy to pass a Monster object to a window, and have the window know how to pull out all the relevant information.</p>\n'}, {'answer_id': 80252, 'author': 'user15039', 'author_id': 15039, 'author_profile': 'https://Stackoverflow.com/users/15039', 'pm_score': 0, 'selected': False, 'text': '<p>You have to have your monster data stored in files or a database and load them from a generic window. For example you have a picture of pikachu and one of bulbasaur stored in your hard disk. Then you make a window with a blank picture, when you show the window you tell the picture object to load the picture you need.</p>\n'}, {'answer_id': 111880, 'author': 'Beerly Able', 'author_id': 20044, 'author_profile': 'https://Stackoverflow.com/users/20044', 'pm_score': 1, 'selected': False, 'text': '<p>I think the biggest problem will be creating all the different angles (for when the characters turn, etc.).  Can you develop 3d models of the characters based on different frames from the tv show / card game?</p>\n'}, {'answer_id': 150773, 'author': 'Rory Becker', 'author_id': 11356, 'author_profile': 'https://Stackoverflow.com/users/11356', 'pm_score': 1, 'selected': False, 'text': '<p>I would suggest that you should try extract the various attributes that a monster might possess. Think Top-Trumps...</p>\n\n<p>Then you can create a single Monster class with each attribute represented by a Property/Field.</p>\n\n<p>Something like </p>\n\n<pre><code>Class Monster\n    Public Name as String \n    Public Filename as String \' Location of graphics file on disk\n    Public Strength as Integer \n    Public Speed as Integer \n    Public Sub New(Name as String, Filename as String, Strength as Integer, Speed as Integer)\n        Me.Name = Name\n        Me.Filename = Filename\n        Me.Strength = Strength\n        Me.Speed = Speed\n    End Sub \nEnd Class\n</code></pre>\n\n<p>Then you\'ll be able to create monsters like this.</p>\n\n<pre><code>Dim Monster1 as New Monster("monster1", "C:\\Graphic1.jpg", 50, 10)  \nDim Monster2 as New Monster("monster2", "C:\\Graphic2.jpg", 1, 100)  \nDim Monster3 as New Monster("monster3", "C:\\Graphic3.jpg", 60, 17)  \n</code></pre>\n\n<p>but you\'ve not needed to create a new "Window" each time.</p>\n\n<p>Equally you will be able to get you "Monster" data from elsewhere... like a database for example.</p>\n'}]
['https://Stackoverflow.com/questions/80062', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']