Koobs

Members
  • Content count

    89
  • Joined

  • Last visited

Community Reputation

148 Neutral

About Koobs

  • Rank
    GDNet+
  1. MUD Help

    I ran across these recently when I was writing a little Lua based MUD: [url="http://www.skotos.net/articles/DAWNOF.shtml"]http://www.skotos.net/articles/DAWNOF.shtml[/url] It's a series of articles from the inventor of MUDs himself, Richard Bartle. It is probably higher level than you are looking for; he barely mentions the actual server parts. It's mostly a discussion of the game logic parts. Still, a very good read. What language are you writing in? I've got this little C++ and Lua MUD sitting around. It was a rush job for a class assignment, so it is likely significantly less well thought out and definitely less featurefull than a "for real" MUD, but it is small and it mostly works. It might be good inspiration if you want to write your own. It has an async select based server what for the telnets, with Lua doing pretty much everything else. It also comes with an IRC bot so you don't actually have to use telnet!
  2. grammar - fable fox is stronger

    I was confused about what you meant by "title". When speaking of names, title often means something added to a name to indicate rank or an honor, as in "Koobs the Great", "Emperor Cornstalks", or "Fable Fox the Stronger". If you mean title like the title of a song, book, or forum post, then "Fable Fox is Stronger" would be proper English, although I might not capitalize the S depending on context, e.g. I wouldn't for a forum post but I would for an article. "Stronger" without context is most likely in a physical muscle mass kind of way. What Fable Fox is stronger than depends on context. Just by itself the only context is Fable Fox himself. So you are saying something like "(the present tense) Fable Fox is stronger than (some other) Fable Fox", which is interpreted as "Fable Fox is stronger now than he was before". With context, you could be saying anything from "Fable Fox can lift more than this other guy" to "Fable Fox is more durable than this table" or "Fable Fox is more skillful than everyone here". Examples![list] [*]See that dude doing bench presses? Fable Fox is stronger. [*]I stacked a bunch of stuff on my coffee table and Fable Fox to see which would collapse first. Fable Fox is stronger. [*]I pity the fool who thinks he is a leet mathematician. Fable Fox is stronger. (this one is a little awkward. In normal conversation, one would say "Fable Fox is a stronger mathematician" or "Fable Fox has stronger math skillz") [/list]
  3. I don't know Scheme, but it looks like it has pattern matching comparable to Haskell (less pretty, IMHO, since you have to use an explicit 'match' form). Telastyn and I summed it up pretty well. It allows branching and destructuring on values. [url="http://docs.racket-lang.org/reference/match.html"]http://docs.racket-l...ence/match.html[/url] has some good examples of what [s]PLT Scheme[/s] Racket can do with matching, but I imagine you already read the examples and want to know about real-world stuff. Worth noting, though, is the sheer number of things you can match on, including regexs! In Haskell (which is the language I have most pattern matching experience in), you can pattern match in a lot of places implicitly so you end up using it often. I often break tuple data apart into useful names instead of using fst, snd, and the like. If I have data that can be one of several forms (online examples usually mention expressions for parsers), I would use the branching feature in place of a switch or cond. I also break the data into useful names rather than using named fields. Contrived example in messy psuedocode: Say you had a network protocol with a message type like [CODE] Message = Move Int,Int or Login String or Logout or Say String,String [/CODE] I would write the function [CODE] def Handle(Message) Move X, Y: <move the character by X and Y> Login Name: print 'Hello, ' + Name Logout: print 'Bye!' Say Name, Text: print Name + " says " + Text [/CODE] Is this helpful?
  4. Pattern matching is an overloaded term. Do you mean pattern matching the language feature, as found in Haskell or Scala, used to break data structures apart? If so, it is useful for pulling apart a structured entity in a syntactically clean way that resembles (sometimes exactly matches) the syntax used to create the entity. Haskell in particular uses this technique very effectively almost everywhere. A quick google for Haskell Pattern Matching will give excellent examples. Here's one from the wikibook: dropThree ([x,y,z] ++ xs) = xs This defines a function that drops the first three items from a list. It takes one argument, the list, which it matches to the pattern of three list items [x,y,z] concatenated with the rest of a list xs. It returns (is equal to in Haskell syntax) xs. So in effect, you use the syntax to create a list with three items prepended to pull three items off instead by putting the syntax in the argument field. Very cool! Is there a particular language you are looking at that caused you to ask? The particulars vary.
  5. I inadvertently began a six hour deep web-trawl by following the Damn Cool Algorithm link on the twitter feed. Thanks GameDev! I really didn't need to be productive today anyway. My big mistake was following the blog roll to Coding Horror...
  6. If you mean the [i]really[/i] old one, then the game was analog. No processor, no algorithms. Collision was detected with comparator circuits comparing voltages representing the positions of the ball, paddles, and the field. [url="http://www.electronixandmore.com/project/scopepong/"]Check this page for a circuit and description of an analog pong game.[/url] Fun stuff!
  7. I imagine everyone has different ideas on what specifically should be done while commenting, but I think we can agree that in general you need to make comments to say things that the code doesn't. You should describe [i]why[/i] and [i]how[/i], not what. For instance, this is a useless comment to anyone who knows the first thing about programming: [code] if number % i == 0: #if number is divisible by i, increment count. count = count + 1 [/code] I know var = var + 1 means increment. What I didn't know until I read the whole example was that the code checks to see if n is prime by trying every number from 2 through (n-1), counting up divisors. A comment like the following would tell me immediately how this code behaves: [code] # This part here tries every number from 2 through (n-1), counting up divisors of n. # If there aren't any, then the n is prime. [/code] If I care about details, then I can read the code. Even without doing that, though, I have a good idea of what is in the function after reading only two lines. That's what you try to do with comments, reduce the amount of effort required to understand what code does.
  8. Humble Introductions and Lofty Aspirations

    Being able to show the opponents mouse position puts you into the realm of "real-time games". This is still possible, but makes everything harder since you will have to deal with lag and such. In dealing with lag and such, tools used to build real-time games are more complicated. You are right about UDP being a better fit here, unfortunately there is no (good) way to get ajax to talk anything but TCP. Even then, the webserver isn't really built for bouncing messages from one user to another quickly, so that'll have to change also. With that in mind, let's look at some options for the frontend. I agree with nfries on a number of counts. Flash is back on the table as an option, and so is Java. If you go with a desktop download-then-play application, C++ and steam might be a good way to go, although C# and steam may be better so you don't have to inflict C++ on yourself (here be learning curves). Flash is still an ugly language, but it has a large install base and has seen a lot of use in browser games. Flash also doesn't do UDP, but it can do TCP in a faster way than ajax. Java is not a bad language. It is easy to pick up for beginners and there is almost nothing it can't do. It has a pretty large install base, but less than flash IIRC. You get some cross platform support as well. You'll get Windows, Linux, Mac with one version of the program. It can run either from the desktop or from the browser. To run on an Android phone, you will need to write in java. You'll have to tweak a few things from the PC version, but a lot of code can be reused. I would aim for a separate phone app instead of running from the phone browser. Also, how will the mouse hover work on a phone? Now the backend. Unfortunately, a webserver will not do for the realtime elements, so you'll have to come up with your own server. You get to choose any language you like for this; they can all be made to work. There are a lot of pitfalls in making your own server, including dealing with security vulnerabilities, the strain from lots of users, memory leaks, etc. All the problems get worse with more users. Writing robust, public-facing servers is well outside my expertise, so you'll have to ask someone else for help there. I would imagine you could make your life easier by keeping all the ancillary functions like achievements and match-making on the webserver and keeping the game server itself small and simple, maybe even try a peer-to-peer setup. I'm just speculating here though.
  9. Humble Introductions and Lofty Aspirations

    You've got a lot of options and we're quickly leaving my realm of experience, but here's how I would do it (more experienced forumites, feel free to jump in!) I would try to avoid Flash by doing as much as possible with other web standards. It's getting easier everyday to make interactive websites without resorting to learning Flash programming (which is kind of ugly, IMHO). I'm thinking HTML and JavaScript, using an established JavaScript library (jquery?) for the ajax stuff (handling updates on the webpage without the user having to reload the whole page). This goes on the frontend and runs in the user's browser. The browser would connect to the webserver in the standard fashion, where a LAMP(Linux, Apache Webserver, MySql, PHP) stack would be waiting. I'd go with LAMP because of its maturity; there are [i]tons[/i] of resources for learning to work with this stuff. I myself prefer a higher level and more object oriented framework like Ruby On Rails, but I think you may be more comfortable with PHP without an object oriented background (just a hunch, I could be wrong). The webserver (Apache, in this example) would run PHP scripts that live on the server to generate the webpage that the user sees. The PHP scripts have access to the MySql database, so they would be the only ones that would actually talk to the database. To see a list of achievements, for instance, the user may navigate to www.example.com/achievements.php in their browser, Apache would execute achievements.php which would use database queries to pull a list out of the MySql server and generate an HTML list from the results, which would then be sent back to the user as a plain old HTML file. For a two player game, I imagine it would go something like this. A player would click on whatever to make a move which would fire off a request using ajax to the server with POST parameters indicating which player, what move, etc (/move.php?userId=...). The server would handle the request with a PHP script that would update the database. The other player would either poll with ajax or wait for the server to notify the player with comet (like ajax, but different. google can fill you in on the specifics). Either way, the other player would make a request to get the state of the board (/gamestate.php?gameId=...), which would fire off some PHP to query the database and return the board state to the JavaScript running in the browser, which could then update parts of the page to reflect the first player's move. At this point, I'd look for a framework. You could implement the whole site yourself, but you'll get off the ground more quickly with some help from a framework like Zend or CodeIgniter (these are for PHP, there are equivalents in other languages). These handle a lot of the boring and tedious details of building a website. They may also be able to help you with a database layout that will work well for backing a website. I've skimmed over a lot of details, but that should give you a place to start. Let us know if you have any more questions. tl;dr - JavaScript/ajax frontend, LAMP backend
  10. Humble Introductions and Lofty Aspirations

    First off: Welcome to the forums! Secondly: What do you want to get out of this project? Do you want to practice being a game programmer, or do you want a game programmed? With a thought out set of rules (which I assume you have since you were able to make a prototype), an experienced developer could be paid to bang out an online card game prototype in no time at all. If you'd like to give it a go yourself then you've got to define how you want the game to work from the user's perspective. There are quite a few technologies you could use for making a web based card game, and some behave differently. You might use Flash for the front-end with a PHP/MySql backend if you need some real responsiveness, for instance. If the game allows some delay between user action and game reaction, you could use HTML5 (maybe even not 5) and ajax for the frontend, and maybe python on the server. I'm sure the forum is full of people who know better than I do what is best for this sort of thing,
  11. Android tiling problem!

    [quote name='blake3334' timestamp='1296782638' post='4769291'] NVM. :0 [/quote] No no no! No! You should leave your question here, and then post what you figured out, even if it was a stupid mistake (those are often the hardest to find). That way when someone else has the same problem, they can search the forums and see how you solved it.
  12. Back in Classic Black

    Ahh, bliss. I was suffering along with a userscript that blackified a couple of things but this is much, [i]much [/i]better. So, when do we get it as a theme selection?
  13. My underwater glass ceiling room from Minecraft: It took a lot longer to make than I care to admit. [Edited by - Koobs on January 6, 2011 4:26:15 PM]
  14. Recommend me an MP3 Player?

    I've got a Sansa Clip+ that I am pleased with. It fills the role of simple no-nonsense mp3 player quite well for me.
  15. Anamanaguchi!

    I think the first time I heard them was the music over a PAX video ad. The song (Helix Nebula) is, by the way, completely awesome. That and Fast Turtle I think are my favorites from them. If you're interested in this sort of thing, there was a documentary on the chiptune scene linked from PATV (penny-arcade tv. I'm sure google can help you find it) a while back.