views:

792

answers:

10

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?

+1  A: 

This question is very much lacking in information.

For a start, what do you use for graphics in your game?

shoosh
We took some pictures off a website and then show them in visual basic.
+1  A: 

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.

Chris Bunch
lol, okay. What is MySQL? It sounds nice.
Always a sound method of choosing technologies, I find. ;p
Bernard
Hehe, think of it as a program that allows you to make giant tables and then fill them in with whatever you like. In your case, you can make a table called 'monster_info' and fill it up with just that. You then can have your program ask MySQL to look in the table and fetch out whatever you need!
Chris Bunch
A: 

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.

dreamlax
A: 

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.

A: 

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.

Bernard
Yeah, that's what we do.
+1  A: 

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.

metao
I'm accepting this because my friend's brother said this is what we should do, but I don't understand it. Maybe he'll help us.
I wouldn't use inheritance to create the individual monsters, myself.
Bernard
Why wouldn't you use inheritance?! Like metao said, every monster will have name, pic, collection of attacks etc? I don't know much about pokemon but I would guess by definition, all "monsters" have stuff in common.. ;)
Rob Cooper
the reason not to use inheritance is that it requires a recompile every time a new monster is added. If you use a generic monster class and instance that all the time feeding it new data, then you can draw on that data from an external source which may evolve over time without the need to recompile.
Rory Becker
A: 

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.

+1  A: 

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?

Beerly Able
+1  A: 

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.

Rory Becker
A: 

Wow, a game like this would be so cool! Can anyone send me a copy if it is released? Email me at [email protected]. Much appreciated!

Paul
Stack Overflow is a question and answer site, not a forum.
ChrisF