Original Post
I''ve been studying OOP myself for sometime now, but I haven''t actually done almost anything, just read things.
Now I started making one bigger tile-based game (with Java), and I have some questions of the structures.
I thought to make something like this:
(Classes inside the () are abstract)
Tile
(GameObject)
<-- (Item)
<-- SmallBomb
<-- Dynamite
<-- (Creature)
<-- Player
<-- (AIMonster)
<-- Alien
<-- GrenadeMonster
<-- FurryMan
<-- Slime
The first question I had in mind was this:
I thought it would be good that Item-class had Item(Player player)-constructor, but then the Player-class would get it too, and that doesn''t sound very reasonable.
Why can''t any derived class have it''s own constructors?
(I mean, if I would make Item(Player player)-constructor for Item-class, then I''d have to make it to GameObject too,
or the compiler notes me about it).
I''m still soo confused with all this.
Anyone have any ideas about any of above?
Any good links to some OOP & games tutorials?
Thanks.