Jump to content
  • Advertisement
Sign in to follow this  
3DModelerMan

Unity Game logic, and view organization

This topic is 2553 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to write a game that has logic and view separation (mvc architecture). My logic classes only contain game state, and I have the view drawing stuff based on events sent by the objects. The view also sends input events to the game logic, and plays sound effects and music. The game entity class is component based; so that I can implement gameplay in a modular way. My question has to do with organization: if I want to draw anything more than cubes and spheres based on collision shapes. Then I'm going to need some sort of data connected to a game entity. Should the entities have members telling the view how to draw them? Like each game entity would have a "rendering type" member? This seems like it would ruin the separation between logic and view. And also, should the game's level file store data for the view as well (model filenames, textures, sound effects)? And the game logic would load the levels, and send events telling the view how to draw the objects? That seems like it would ruin the separation too. I want to be able to make my editor like the Unity editor (how you can assign textures and models), but I want to use the logic/view architecture also. How should I organize my scene/level files so that this is possible?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!