Jump to content

  • Log In with Google      Sign In   
  • Create Account

how to encapsulation the "action"


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
3 replies to this topic

#1 xiajia   Members   -  Reputation: 163

Like
0Likes
Like

Posted 22 April 2013 - 08:25 PM

there are a lot of "action"s in a game.
some are simple,e.g. the disappearance of a buttom.
and some are complicated.e.g.the disappearance of a button array.
Is there a way to abstract the "action", making it the reuse and modification easy?
e.g.The convergence of the interface elements .Combination of elements of the game action , if the package is suitable , you can make the action more delicate and rich .


Sponsor:

#2 Khatharr   Crossbones+   -  Reputation: 3002

Like
0Likes
Like

Posted 23 April 2013 - 03:25 AM

Do you mean a library for making GUI's?


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#3 xiajia   Members   -  Reputation: 163

Like
0Likes
Like

Posted 23 April 2013 - 04:00 AM

Well, not just GUI, can also be some game elements.
Of course, if GUI can also.For all the elements interact with 
the user in the game are far-fetched called UI ? ^.^
Then taking GUI as an example to illustrate the problem.
For example a calculator (this is just an example), there are a lot of button.
If the calculator can "switch" between the common and scientific type,
and can "minimize", "maximize"......and so on.
What I mean by "Action" is used to describe the process of these changes.
Of course you can through some simple variables to describe the action, 
but when these movements became a lot,
Variable to describe becomes very messy.


#4 Waterlimon   Crossbones+   -  Reputation: 2565

Like
0Likes
Like

Posted 23 April 2013 - 04:18 AM

I think you need a state machine of some sort.

 

For example the calculator state would be in "basic math" mode or in "fancy math" mode.

 

The state machine will have "states" which will deal with their functionality along with initializing/destroying themselves.

 

So google that.


o3o





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