Tanzan

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

101 Neutral

About Tanzan

  • Rank
    Newbie

Personal Information

  • Industry Role
    Programmer
  • Interests
    Art
    Audio
    Business
    Design
    DevOps
    Education
    Production
    Programming
    QA
  1. Thx Kylotan, like i said just tried to find the magic OO trick ;-) to poll constantly feels inefficient (allthough it's how i do it now)
  2. Hello Haegarr, Thx for your reply as well On android the 'view' is not so passive i think (like i said its not really mvc but...) The surfaceview gets the update tick from the OS...so it creates the world (model) which creates all the other stuff then updates itself every cycle ...the surfaceview asks about all visual objects and draw them on the screen. main game state is guarded by return enumeration from world.update (levelover,gameover) But what if the level had waves which have rounds which have parts etc etc...and you want to display the end and beginning of the nested stuff? (level 10->wave8->round14->part1 ) i know its a stupid example but just to make the point would you ask every cycle if they are changed or make a message queue in world or like Kylotan suggests do it with subscribing through observer pattern ( i might do it wrong thats why i ask what's the best practice, i just want to learn from you guys)
  3. And if its a non-visual ? (container-n class)
  4. First of all thx for your fast and senseful reply ;-) "Firstly, if you have a complex nested set of models, you should consider whether each of those objects should have its own view, instead of trying to have one view represent a lot of different things. " That's an interesting approach.... "Secondly, it's usually simple to have a model tell a view when something has changed, and then the view knows to refresh data from the model. Does that not work for you? " I guess you are reffering to the Observer pattern which i know would probably work, but i just would like to know whats the best way (how do you do it) to do it in design respective OO way... In my situation it is not a 'solid' MVC design but its for an project on android..where the view (surfaceview) instantiate the world which updates itself every cycle and tells the 'important' stuff through states (i.e. collision,game over etc) But let's say there is a car amazingly nested all the way to a bolt(s) object(s) and you want to tell something in your view about that specific bolt (lets say it becomes loose). Would you 'ask' (method) the world->->->->n (bolt) ?
  5. Hello all, My question is a bit hard to describe but hopefully it will do... I just wonder what you guys think is the 'best' way of getting info about the model in your view(s).. To clearify (i hope ;-) ) If the model is updating itself every game-cycle and the (deep) nested objects all do there jobs how do you get info where only the view is interested in? So my question is not how to do it but more what do you people think is the best way to do it ? Regards, Alex