Question

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.

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

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?

Was it helpful?

Solution

I think the best solution would be to make a generic window which can take a few parameters which describe the monster.

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).

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.

OTHER TIPS

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 MySQL. 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).

If you're not familiar with any database, check out the MySQL tutorial to get up and going.

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?

I would suggest that you should try extract the various attributes that a monster might possess. Think Top-Trumps...

Then you can create a single Monster class with each attribute represented by a Property/Field.

Something like

Class Monster
    Public Name as String 
    Public Filename as String ' Location of graphics file on disk
    Public Strength as Integer 
    Public Speed as Integer 
    Public Sub New(Name as String, Filename as String, Strength as Integer, Speed as Integer)
        Me.Name = Name
        Me.Filename = Filename
        Me.Strength = Strength
        Me.Speed = Speed
    End Sub 
End Class

Then you'll be able to create monsters like this.

Dim Monster1 as New Monster("monster1", "C:\Graphic1.jpg", 50, 10)  
Dim Monster2 as New Monster("monster2", "C:\Graphic2.jpg", 1, 100)  
Dim Monster3 as New Monster("monster3", "C:\Graphic3.jpg", 60, 17)  

but you've not needed to create a new "Window" each time.

Equally you will be able to get you "Monster" data from elsewhere... like a database for example.

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.

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.

Copy and pasting widgets will not work out for you. Learn to abstract data and logic from widgets.

Stop using VB right now and go play with http://scratch.mit.edu it is much more suitable.

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top