Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

512 Good

About twanvl

  • Rank
  1. twanvl

    Acceptable wait times for a turn-based game?

    You could try to run the AI/other calculations during the player's turn. You could for instance make a very simple prediction of the likely moves the player will make (maybe even look at things like the location of the mouse cursor), and then calculate based on that. Perhaps you could do a partial calculation, update some of the tables you need, search to a small depth, etc. Then when the player actually makes a move, hopefully you will have already done work in the right direction, which will decrease the wait time.
  2. twanvl

    quick logic game!

    In graph theory a graph (diagram of lines connecting points) that can be drawn in a plane is called a planar graph. This puzzle asks whether K_3,3 is planar. It is provable that that is not the case.
  3. Can you use std::string? That would make it easy: for (int i = 0 ; i < n ; ++i) { cout << std::string(i,'*') << endl; } How about the following for (int i = 1 ; 2*i <= n*(n+1) ; ++i) { cout << "*"; // draw a newline if there is a k such that 2*i == k*(k+1) if (2 * i == sqrt(i) * (sqrt(i) + i)) cout << endl; }
  4. How would you even dissolve 252g of calcium carbonate in 1.5L of water?
  5. twanvl

    A flood of errors

    My guess is that you are missing a semicolon (;) somewhere. Probably at the end of some include file which you include before <fstream>.
  6. twanvl

    it's assembly time :)

    Also, it is not faster (at least not on my athlon 64): 969 781 0.81 Also, there are faster ways to sort an array...
  7. twanvl

    Online library repository

    Currently the Haskell community is moving in this direction. First of all there is a common build system, Cabal that makes it painless to install a library. This already solves a lot of problems, since all libraries can be build and installed in the same way. The next step is cabal install. Since there is now a common specification for all libraries that includes dependency information, it becomes quite easy to set up a central repository and download dependencies as needed. I am sure such an approach could work for other languages, but maybe not for all.
  8. twanvl

    My webcomic

    Quote: Not sure why, but I like it more than Arial Unlike Arial, Verdana was specifically designed for reading on a screen (along with Georgia, which also rocks).
  9. Is there a LAN between the computers? If so, use file shares (samba) or ftp to transfer the files. You could also (temporarily) move the cd burner to the other computer.
  10. twanvl

    Calculating Pi in C#

    Mathworld on pi formulas, or for the faster stuff: pi iterations. For example: x = sqrt(2); y = sqrt(x); pi = 2 + sqrt(2); while (not enough): sx = sqrt(x) x2 = (sx + 1/sx)) / 2; y2 = (y * sx + 1/sx) / (y + 1) x = x2; y = y2 pi = pi * (x + 1) / (y + 1) This method probably converges too fast to benchmark (unless you have arbitrary precission numbers of course). Or you could try: while (having fun): pi = pi + sin(pi)
  11. twanvl

    Types as predicates

    I don't know much about it, but Qi is dialect/library/compiler for LISP that supports static typing. I have heard that its type system is quite powerful.
  12. Are you sure you need the pointer everywhere? CHeightmap* heightmap = NULL; heightmap = new CHeightmap(); I see no reason why you should not just use: CHeightmap heightmap; This will get destroyed as soon as it gets out of scope. Quote: delete doesn't work on the CVertex3** members. If they are arrays (allocated with new type[size]) then you should delete them with delete[] not with delete. In C++ the only reason to use malloc/free is when working with a library written in C that allocates or deallocates memory itself (not likely).
  13. twanvl

    Transitional names

    Wikipedia has a list of the other side of this effect, retronyms: Quote:A retronym is a type of neologism coined for an old object or concept whose original name has come to be used for something else or is no longer unique.
  14. twanvl

    Quantum question

    You will probably get a better answer to these kinds of questions on other forums, for example Physics Forums.
  15. twanvl

    Yarrr, Piratespeak

    Arrg yarr arrg yarr yarr arrg arrg yarr! Arrg yarr yarr arrg arrg arrg arrg yarr! Arrg yarr yarr yarr arrg arrg yarr arrg! Arrg yarr yarr yarr arrg arrg yarr arrg! Arrg arrg yarr arrg arrg arrg arrg yarr!
  • 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!