Search Results

Search found 3 results on 1 pages for 'rxc'.

Page 1/1 | 1 

  • C++ game architecture

    - by rxc
    I'm trying to make a game, but I'm not sure of the best way to set up the main loop and classes. For really small games, I could put everything in the main() loop, including event handling, collision checking, etc. However, for large games, that's seems like a highly inefficient way to get things done. The architecture I want is kind like the way the Minecraft coders did it (I quote Minecraft code because I've seen the source code when downloading MCP). They have objects entity classes EntityCow and EntityChicken and they have methods like onDeath(), onLivingUpdate(); and item classes like ItemSword have methods like onItemUse(). I've never seen these methods get called directly, but apparently, they get stored in a class called DataWatcher, which, I think "watches" all the data (as the name implies) and calls the appropriate methods in the objects. Is that how most games do it? If so, how is the DataWatcher class implemented? Any help or alternate suggestions is really appreciated.

    Read the article

  • Computers with Small Capacity SSD - For caching?

    - by RXC
    Recently, in newsletters from websites, I have been seeing computers for sale from manufacturers that include an HDD and an SSD but the SSD has a small capacity like 24 GBs. I don't know if this still holds true, but I learned that when building a computer, you would want to install your OS on your fastest hard drive. I do a lot of PC gaming, so I install my OS and games on my SSD, because I learned that games and many applications make lots of system calls to the OS and performance can only be as fast as the slowest piece. Why these computers come with small capacity SSDs? Most OS's take up around 20 to 30 GBs of space, so what are the benefits of such a small SSD? Are these small size SSDs for caching? and what exactly does caching mean (what does it do and how does it help)?

    Read the article

  • undo or reverse argsort(), python

    - by Vincent
    Given an array 'a' I would like to sort the array by columns "a.sort(axis=0)" do some stuff to the array and then undo the sort. By that I don't mean re sort but basically reversing how each element was moved. I assume argsort() is what I need but it is not clear to me how to sort an array with the results of argsort() or more importantly apply the reverse/inverse of argsort() Here is a little more detail I have an array a, shape(a) = rXc I need to sort each column aargsort = a.argsort(axis=0) # May use this later aSort = a.sort(axis=0) now average each row aSortRM = asort.mean(axis=1) now replace each col in a row with the row mean. is there a better way than this aWithMeans = ones_like(a) for ind in range(r) # r = number of rows aWithMeans[ind]* aSortRM[ind] Now I need to undo the sort I did in the first step. ????

    Read the article

1