Jump to content

  • Log In with Google      Sign In   
  • Create Account

Remake and engine


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 esfomeado   Members   -  Reputation: 108

Like
1Likes
Like

Posted 03 July 2014 - 12:15 PM

Hey guys i'm new on this forum and actually i'm making my 2d game engine. I have a base engine and i'm remaking him.

I'm trying to optimize the engine the max as possible so right now the tiles and items are in the same class. So a tile is a item and i'm ok with that but i think that this could be improved because a wall doesn't need an attack value and etc...

So i has think to split this in two class. One for the items and other for the map tiles. Is this a good idea? When generating the map it will have some items too like swords and etc...



Sponsor:

#2 cozzie   Members   -  Reputation: 1616

Like
5Likes
Like

Posted 03 July 2014 - 02:37 PM

Hi. Sounds like a good next step to split them up.
Depending on the size of the game in the end, you might want to make some design first, and define the base relations between the classes. For example:

- game 'uber class'
- rendering/ renderer class
- player class
- tile class
- game object class (link game object to a tile, for rendering?)
- game manager (managing and game objects and the player, states etc.)

For example you can have 10 different tiles, graphically, but you could have much more game objects, which are represented by one of the 10 tiles. The game objects can have their own status and properties, using the tiles that just represent the graphical representation.

The above might not be the "ideal concept", but I suggest you build up step by step.
Hope this helps.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS