Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Okay, let me start off by saying that I'm 16 years old, and am making a 2D game for fun. So there might be certain things that you guys say which I will not quite understand at first, just putting that out there :P

Alright, now here are the classes I'm working with:

Form1.cs
CharacterAnimation.cs
BulletAnimation.cs
AIPlayer.cs
Map.cs

Now let me explain what my game does so far, and which role each class plays.

So basically we have a main character which you control on the screen, this character moves around a Map which I have custom made with the Map.cs class. The map consists of a 12 x 12 grid, 50 x 50 pixels each square. The character you're controlling can also shoot bullets, via the BulletAnimation.cs class. The CharacterAnimation.cs class is used to move the character, and Form1.cs is used mostly for drawing and sending the input from the user to various classes, but nothing else.

Alright, now here's where my problem arises - the AIPlayer.cs class.

I have created a class to order a 'bot' to move around the map randomly, my problem is that I'm unsure if it's possible to call for multiple bots to be executed at the same time using only one class. So what I want to do is use the same class to have more than one bot on the screen - is this possible?

A few other things you should know are that my AIPlayer.cs class is in constant communication with the Map.cs class and also with the BulletAnimation.cs class. I need to communicate with these two classes to know when to stop moving the bot and also to know if the main character has fired a bullet that has hit the bot.

That's all I can think of mentioning right now, if you guys need any more info on anything don't hesitate to ask. Also, I tried Googling my problem but after about two hours of useless searches I have decided to come here for a bit of help with my problem in specific :)

Thanks again guys, any sort of feedback is very much appreciated :-D
Posted
Updated 10-Oct-10 17:19pm
v2

HEY KID, FIRST U JOIN A TUTORIAL...


THEN U FIND THE ACTUAL CAUSE OF ALL THESE ..
NEITHER BY DOWNLOADING SOURCE..

OK UR PROBLEM SEEMS UNUSUAL AS U VE DESCRIBED U VE USED CLASSES BUT NOT HAVING MUCH IDEA ON IT THAT EAN U VE COPIED..

sO PLEASE PASS UR SOURCE OR GIV MORE INFO REGARDING UR PROBLEM...TO MAKE IT SOLVED.
 
Share this answer
 
Comments
Raztor0 10-Oct-10 23:37pm    
Yeah I actually coded the entire program by myself, and your first language clearly isn't English or you're just completely Grammar Illiterate. I want to know if I can somehow use a class twice in separate instances instead of creating a completely new class. Next time don't even comment if you're just going to say random crap that I can barely read because of your terrible grammar.
Toli Cuturicu 11-Oct-10 7:14am    
Dont shout!
OK IF U R RIGHT THEN 4 UR KIND INF.. I TELL U CLASS ARE CALLED BY ITS INSTANCE CALLED OBJECT ..SO THERE IS NO NEED OF USING ANOTHER CLASS.

AGAIN UR QUES SEEMS SO UNUSUAL THAT ANYONE CAN DOUBT UR SKILLS..

AGAIN U DONT GO 4 ENG GRAMR AS WE VE LESS TIME TO DO MOST THINGS.
 
Share this answer
 
Comments
Raztor0 11-Oct-10 0:16am    
Alright buddy thanks for the help :) By the way, try typing without the caps lock, it might be easier to read that way.
Sandeep Mewara 11-Oct-10 4:03am    
Why using all CAPS? It's considered shouting. Please avoid it from next time.
Toli Cuturicu 11-Oct-10 7:15am    
Don't shout! You get a 1 vote from me everytime you shout.
If you continue shouting, I will consider deleting your postings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900