Noxious Productions
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Game Development Team
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 New Objects

Go down 
3 posters
AuthorMessage
daemonfire




Posts : 9
Join date : 2010-04-20

New Objects Empty
PostSubject: New Objects   New Objects I_icon_minitimeFri Apr 23, 2010 3:34 pm

Hi there,

I would suggest to add the following Objects:

*Item
*Player
*Monster
(*Inventory)

and start a brainstorm about the "what does this object and which properties does it have", e.g. "move()" etc. =)
Back to top Go down
Jonas
Admin
Jonas


Posts : 23
Join date : 2010-04-11

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeFri Apr 23, 2010 7:53 pm

Good good.

But we are already doing that.

Keep coming with the suggestions Wink
Back to top Go down
https://swordsmen.darkbb.com
Philipp

Philipp


Posts : 23
Join date : 2010-04-11

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSat Apr 24, 2010 1:14 am

I was thinking about that already. I want to start with a class ("object") that is the parent class of all other "object" classes. I am working on the structure of those classes right now. I will upload them as soon as I am finished.
Back to top Go down
daemonfire




Posts : 9
Join date : 2010-04-20

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSat Apr 24, 2010 11:12 am

The question is, if you try to develope with OOP why do we have to create an abstract "object" class?

It would make sense if you implement some kind of exception handling to the parent class, but what "function" will "Object" have?
Back to top Go down
Philipp

Philipp


Posts : 23
Join date : 2010-04-11

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSat Apr 24, 2010 1:55 pm

The "Object" class will be the parent class of all drawable things (it will be renamed I think). So its functionality will be all the things every drawable thing will need. Maybe this class is not needed since there is sf::Sprite that provides a lot of useful functions already. I don't know yet. Maybe this class will not even be abstract.
There will be a good exception handling in this project.
Back to top Go down
daemonfire




Posts : 9
Join date : 2010-04-20

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSat Apr 24, 2010 6:45 pm

I think you should rename "Object" to something like "GameObject".

Quests e.g. which are (to use your words) non-drawable could derive/inherit from a class called "AbstractGameObject".
Back to top Go down
Philipp

Philipp


Posts : 23
Join date : 2010-04-11

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSat Apr 24, 2010 7:20 pm

Check out the new structure. I think it's quiet okay so far.
Back to top Go down
daemonfire




Posts : 9
Join date : 2010-04-20

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSun Apr 25, 2010 2:59 pm

The "#IF_nDEF".... is for using such ".hpp" header files instead of ".h" (C) header files?
Or why do you add it every time? =)
Back to top Go down
Philipp

Philipp


Posts : 23
Join date : 2010-04-11

New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitimeSun Apr 25, 2010 9:11 pm

".h" is a header file for C.
C++ can either use ".h" or ".hpp" (there are even more).

So you really can decide by yourself what you want to use. I decided that I will use .hpp since sfml lib uses .hpp, too.

The "#ifndef ..." pre-processor command is used to make sure the header is compiled only once.
If there would be two files that include the same header and there wouldn't be the "#ifndef ..." it would not work.
Back to top Go down
Sponsored content





New Objects Empty
PostSubject: Re: New Objects   New Objects I_icon_minitime

Back to top Go down
 
New Objects
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Noxious Productions :: Project Swordsmen :: Suggestions-
Jump to: