Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

504 Good

About tufflax

  • Rank
  1. tufflax

    I made a pattern matching tool, please help!

      There is an implementation of Clojure for .NET too, so it should be farily easy to port it. If anyone is really interested then let me know. And those LINQ operators looks like `filter` and `drop-while` in Clojure. Btw I highly recommend Clojure over Java and C#, it is really, really good. :P (drop-while (fn [m] (not= (:entry-type m) :error)) (filter (fn [m] (= (:user-id m) 12345)) log-entries)
  2. tufflax

    I made a pattern matching tool, please help!

      First of all, Clojure has lazy sequences, so it could pretty easily be read bit by bit from disk and process it. Same with zips I guess. It can also fairly easily be used together with Cascalog http://cascalog.org/ which is a declarative language for use on Hadoop. I have done it before but don't have it installed right now. I could also extend it to data types other than hashmaps. Just need to come up with a good syntax for everything.
  3. tufflax

    I made a pattern matching tool, please help!

    @Nypyren (is this doing something? :p)   Right now it can not be used recursively, but it would be pretty easy to implement I think, if I could just decide on a good syntax for it. Same with the error|warning. But in that case, since Clojure has pretty convenient function literals (for example #(> % 3) is a function that checks whether the input is larger than 3) something like {event-type: #(contains? [error warning] %)} could be used if I made functions as values be applied as predicates. I'm not up to date with Java, but it's getting lambdas too, right?   In your last example, yes, piping the results to a next step seems easiest, and something that seems perfectly acceptable.
  4. Hi!    I have made a lib/tool as part of a school project, and I need to evaluate its usefulness. It's like a regex tool, but it works on sequences of records/hash-maps instead of on text.   Say you had a sequence of hash-maps in memory, and the hash-maps represent events of some kind, say a server log. You want to see what happened before a `{event-type: error}` occurred. So you can write the pattern "...{event-type: error}" where `.` means any hash-map, just like it means any character in ordinary text regexes. If you then run `matches(the-pattern, the-sequence)` it would return all instances of the pattern, so you can inspect what happened before the errors. You can also use the `*`, `+`, `[ ]`, `[^ ]`, `?` and `|` metacharacters. So you could look for streaks of errors with "{event-type: error}+". You can also use parentheses both for grouping and for extracting submatches from the matches.   Does anyone have a problem that could be solved by something like this? If so, please let me know.   I have a github page for it https://github.com/oskarkv/map-regexps but it is in Clojure, so I didn't think most of you would understand it, because Clojure is not very popular among game developers (or just developers ). But you could use it with any JVM language, and you can help me by just telling me about your problems, even if you have already solved them! I just need to know about some example problems that could be solved with it. But they should be real-world problems, not made up ones.   EDIT: I should also add, that I am very eager to get some problems for my evaluation. So if you have a good problem that could be solved by my lib, I could, for example, implement extra features and help get it to work in Java, just for you.
  5. The links on this page, http://www.gamedev.net/index.php?app=search&module=tags&section=view&tag=Epoch#tabinteresting which I expected to take me to the journal entries, just link back to the page itself. It seems like a bug. And when I'm trying this page http://www.gamedev.net/user/33873-apochpiq/ it does not have a `next`/`more` link.
  6. tufflax

    The Right Taxonomy of Code

    Maybe. :) I'm working on an MMORPG now, and it's like almost playable, yet only 3.5k lines, including map editor. I'm having trouble imagining millions of lines too. I guess it takes quite the project to reach millions of lines in a Lisp.
  7. tufflax

    The Right Taxonomy of Code

    Hm, I'm not sure what kind of language design you are talking about. A lot of languages don't care about files, just code. If all the code was in the same file, the compiler would not care.   About the tagging idea: Could be neat, but if one tries to decouple one's modules from each other, working in one file at a time is reasonable, so I don't see it yielding a huge boost in productivity.   And about IDEs: I use Vim, and I wouldn't like to use another IDE/editor if I couldn't edit the code like I can in Vim. I guess making a new IDE is kind of hard in that way - lots of work has already gone into existing IDEs that people don't want to just throw away. Probably easier to make a plugin for an existing IDE.   Overall, I don't think the benefits would be very large, at least I can't imagine them to be.
  8. tufflax

    The Right Taxonomy of Code

    This might interest you http://blog.datomic.com/2012/10/codeq.html
  9. This is all you need: http://www.infoq.com/presentations/Simple-Made-Easy
  10. I see. Still, 60 updates per second seems like a lot, hmm...   Thanks guys! You have given me things to think about.
  11.   So would I just send 3 input states per packet, or what's the difference between these two rates?
  12. You can render an interpolated version of the world. Popular console FPS games may run at 30 or 60 Hz for rendering and physics, but typically runs networking at 10, 12, or 15 Hz. For a sketch, see the canonical game loop: http://www.mindcontrol.org/~hplus/graphics/game_loop.html   I have interpolation for other players. But interpolation (or extrapolation) for the player himself, surely that must be noticeable. And besides this problem (sending a lot of movement information) I have no need for a simulation frame rate that is different from my rendering. Maybe extrapolation would work OK if I ran the simulation as 20 FPS or something. Hm...
  13. Rendering frame rate and simulation frame rate doesn't need to be the same (and often isn't.) Best practice for action-like games is to fix a simulation tick rate, and run that rate on both client and server. There are many other ways of creating a fun networked game, some of which have different trade-offs in consistency, latency, cheat resistance, ease of implementation, etc.   What would I include in those simulation frames, and what would be updated every rendering frame? And also, if I could not actually change my position faster than the simulation ticks, what would be the point of updating the rendering?   If I'm gonna send stuff every frame, I might as well just send the position and direction, because as long as the server checks for speed and collisions, it's fine. No? And it's easier for the server to do that.
  14. The player does not click to move, so that would not work.   I'm using TCP for now. But I have not tested it, so I don't know if I'll change it later.   Anyway. The server runs at 10 FPS. But the client can run at 100+ FPS, or whatever really. And, if that was not clear, the player moves instantly on his own client to make the game feel more responsive, but the server checks the movement later. If I would somehow limit the FPS when it comes to movement, it would not feel as smooth as it could, so I don't like the idea of using fixed time steps. I don't use a physics engine, and don't quite know what would qualify as one. But even if I used fixed time steps, they would probably have to be shorter than 0.1 s (the steps the server use). And besides checking for cheating, more than 10 movement messages per second is unnecessary.   Right now I think that just limiting the messages sent from the client, and on the server just checking that the client does not move too fast, and that he does not stand in an illegal position at any update, is the best solution so far. He could cheat by walking through a wall, for example, but it seems unlikely that, if he does not move too fast (which is checked for) he will not at any update/message stand in the wall.
  15. It's an MMORPG. Aimbotting is not a problem. The amount turned does not matter. The server is the arbiter always. The movement is similar to that of World of Warcraft, i.e. the player's forward movement is in the direction he is looking. The only problem is that if the client does not send all the information, because it's too much, then the server cannot judge perfectly if the player is cheating or not. So, what's the next best thing?
  • 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!