Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

905 Good

About Oralordos

  • Rank
  1. The best way to figure out the actual time is to send a packet, and then check how long it takes you to get the response to that packet. That way you are using the same clock for both the send and the receive part of your check.
  2. Oralordos

    GIT vs Mercurial

    Github has actually been working on a git extension for large data files. They support it on their system, as well as on Gitlab. I don't know about whether Bitbucket supports it though. You can find the git large file support extension here: https://github.com/github/git-lfs
  3. Oralordos

    Tile-Based Games - Slope

    You might try looking up "Reconstructing Cave Story" on youtube. It has the solutions to lots of those finicky details for platformers. Including slopes.
  4. Oralordos

    How to clear screen in python

    To make your code more cross platform you can use sys.platform to find out what os you are running on.
  5. Oralordos

    How to clear screen in python

    Another option is to say something like this: print '\n' * 100
  6. Oralordos

    Zork like text based game python

    Something like this should help. splitCommand = lowcommand.split() if splitCommand[0] == 'take': takewhat = splitCommand[1] The split method of strings returns a list of what was in the string separated by whitespace like spaces. So 'take flask' would return ['take', 'flask'].
  7. Your problem is that variables are local to the function by default. So other functions cannot see the variable. To fix this, add a line to make the variable global in the first line in the function. global key_work_room
  8. Oralordos

    How do i start a game project?

    You might take a look at Duality: http://www.fetzenet.de/blog/?page_id=697 It's an open source engine in C# that almost seems like an earlier version of Unity, but 2d only.
  9. Oralordos

    Grand strategy space empire game with python

    The isn't exactly what you are looking for, but it is a similar problem that you might get some information from. http://www.arcengames.com/forums/index.php/topic,14037.0.html
  10. Oralordos

    Help with understanding parts of this C# program?

    Line 9: Try is a keyword that makes the code try to execute the code in the braces below it. If there is an error of some sort, called an exception, it can be caught by another block afterwards instead of crashing the program.   Line 11: MyParse is a function that is declared a bit later in the code. You are just calling that. In C#, unlike C++, you don't have to declare a function before it is used.   Line 14: This is the catch header for the try block. If there is an error that is of the type Exception (which is the superclass of all exceptions) in the try block, it will execute this block instead of crashing. You can use a more specific exception type as well to make it catch that type of error without catching others if you want as well. Probably a good idea to do so infact.   Line 16: exc is the exception instance that caused this error, declared in the catch header. Message is a string that is in it that describes the error. So this is just printing the error to the console and continuing on with the program.   Line 20: Here as you say, you are declaring the function MyParse.   Line 25: throw means take the exception instance that is passed to it and make it an error. This will be caught by the try/catch block in Main. The new is used to make a new instance of the exception type. So this means if str, which is the arguement passed into the function, is null, send up an error about the arguement being null.   Line 27: I am not familiar with the C# libraries, but I would guess that StrTrim gets rid of the whitespace at the beginning and the end of the string. So "  Hello World    " would change to "Hello World".   Line 29: Again this is to send up an error to be caught by a try/catch block or crash the program. In this case the type of the exception is a FormatException instead. FormatExceptions are for if something is formatted incorrectly. In this case, is the string passed into the function is empty after leading and trailing whitespace is stripped, you didn't actually send anything into the function and that is not allowed by the function, hence the FormatException.   Line 36: i++ is similar but not exactly the same as i = i + 1 or ++i or i += 1. In this example, they are all functionally identical. There are some differences in certain circumstances though, mostly regarding when the number is increased. So it just makes the number in i go up one.
  11. I would add some packets that allow you to make an entity from the ground up if needed. Things like an add component packet and such. Then you could create the arrow and then just add the exploding effect as a component.
  • 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!