6,265 reputation
11741
bio website
location Tehran, Iran
age 23
visits member for 3 years, 6 months
seen 9 hours ago


May
27
comment Making classes available to others
when you say c# doesn't support multiple inheritence it's a fair point, but at least my answer can meet all the question needs, it's not singleton, almost not a global variable, and it doesn't insult encapsulation,
May
27
comment Making classes available to others
@Andrew: but singletons have their own advantages like when you are creating a game you have to make sure you have only 1 object pool, only once graphic api is initialized, and any other thing that is in direct use with system resouces.
May
27
revised Making classes available to others
added 41 characters in body
May
27
comment Making classes available to others
@Andrew: are yuo talking about the answer I gave or are you talking about the comment i just put hear? and it's about my answer, it's true that they are global instances but they're not acceble from any where in code (it least they are some protected members of a class, only their children can use them.
May
27
comment Making classes available to others
@DeadMg: Singletons and global variables aren't always somthing, for example when you are trying to write somthing you are just accessing some global data, or as far as I tested every game engine has singletons for resource managing, which can be sound bank, renderer, input Manager, physics controller, and some event have some class director which controls game's application flow.
May
27
comment Making classes available to others
and that's what my answer is all about, for all your resources you have a base class that can use that, and every class that need to use resources, should inherit from classes that provide them, in these architecture there is no need for singleton but you still have some static variables in your code. in this approch the keyboard value in KeyboardReader is once initialized by some class, (for example main function) and after that it's that value is shared with all the classes that inherit KeyboardReader. without passing keyboard to them or defineing Keyboard as a singleton.
May
27
answered Making classes available to others
May
27
comment Isometric screen to 3D world coordinates efficiently
I'm not sure about the title but if you are usin gXNA there was a question in the 2 past weeks that was asking hte same thing.
May
27
comment What is the name of the perspective style of games like Final Fantasy 6, Chrono Trigger or Alundra?
just out of curiosity, according to the article Tim refered to top-down, birds eye and overhead are same view angles why are you using 3 diffrent words in same question for same thing?
May
26
comment How to Interpolate between two game states?
maybe I'm wrong but I think you'll need at least 3 GameBuffers to do that thing using thread, 2 for CPU to calculate nextframes (read from one and write to another) and a third one for GPU to read with out cpu stop it's updating and attemping to change gpu data.
May
26
comment How to Interpolate between two game states?
this might be realy tricky since while rendering all your object positions should stay still (changing them during render process may cause some undifined behavior)
May
26
answered How to find the bottleneck of the graphical pipeline
May
26
comment Flash Game not working on Android
maybe it's caused by some other event stucking in an infinite while so default flash loop hangs in there (not the main update event some other event that is called on every loop), and check if it maybe caused by case sensitivity. for example you are trying to draw some object which name is not the same case as the asset.
May
25
answered Flash Game not working on Android
May
25
comment Power, achievement and affiliation games for psychology research project
@Ruben: according to your latest paragraph i think i can almost categorise baku baku as a power game when played in multi player mode. since there is no score or achivement in the game, you have to play as good as you can and you can make the game harder for other player if you play some special trick. (like matching 6 cards at the same time) and if you want some examples of a god game, i can suggest virtual villegers series and heaven & hell (in the later one you realy are the god and send profits and ...)
May
25
comment Power, achievement and affiliation games for psychology research project
@Ruben :carck attack and baku baku are both tetris like games, both have single player and 2 player modes. of course they can both be used as a achivement games, when playing multiplayer mode they can represent a power game (as I can understand from your defenition of power games)
May
25
accepted Are there any resources about performance tweaks?
May
25
comment Power, achievement and affiliation games for psychology research project
there was a game named baku baku, or it's a tetris-like game which can help you as your power game, and also there was almost similar opensource game named CrackAttack.
May
25
comment Determine animation frame from interval
@glory fish: if you receive the progress your animation made so far then you can change frame every time input is grater than 1 or if your problem is your class works with some static frame time you can always check if dt*staticFrameTime >= currentFrameTime
May
25
comment Determine animation frame from interval
@Chris: tanx for comment and i've applied your change.