CFanatic

Go Back   CFanatic > Advance Programming > Game Development

Join CFanatic Forum Now

Game advice topic posted under Game Development which is a part of Advance Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2010, 04:21 AM
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Lesshardtofind is on a distinguished road
| More
Game advice

Hey, I'm working with a side scroller in SDL... things are flowing pretty smoothly, enemy behavior, levels, object interactions, but I'm now working to add 30 new weapons to the game. I first thought about a weapon class, but realized each weapon would have different characteristics. I am not quite sure if I should make a weapon class with common variables then make a subclass for each of the 30 weapons, but that didn't really make sense to me because I'd never use the weapon class by itself so it almost seemed useless. I haven't done any subclasses yet so I'm not familiar with how they are defined called ect. The only other option I see is just creating 30 individual classes. I thought about also making these only called within the character class attack function, but it might be useful to use in other ways... say equiping enemies/bosses with any of the 30 weapons later if I want. Any opinions on how you would impliment this? I dont' really need code examples (unless you want to show me an example of creating a subclass lol), I'm just looking for tips of the best direction to start in so I don't write a ton of code and decide its useless when I'm done lol. Thanks again for your time.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game networking question g4j31a5 Game Development 0 08-31-2010 04:21 AM
Help with snake game in sdl/c joellllmal Game Development 0 08-31-2010 04:21 AM
Guessing Game problem... blorgit C Programming 0 08-28-2010 03:11 AM
Sincere Advice Required!! Anmol C++ Programming 7 07-01-2010 09:52 PM
Basic Battle Game Whitfox Game Development 1 07-25-2008 01:17 PM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:44 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board