• Content count

  • Joined

  • Last visited

Community Reputation

126 Neutral

About Vaughands

  • Rank
  1. Axonify Games Competition

    Hello everyone!   [i]Build a game. If it's awesome, you could win $5,000.[/i]   I'm an employee from Axonify dropping by to let you guys know about an awesome competition we're holding. We're a startup corporate eLearning company that specializes in making corporate training fun - through gamification we drive retention to the masses.    For the next two months, we're holding a competition for developers to submit small browser games that can be played in short sessions that deliver meaningful training content. There's an example video and more details on the site - which you can check out at   I'd like to stress that if you're in the market for building HTML5 or DOM based games and want to win some extra money - you've got nothing to lose. If you don't win a prize sum, you retain rights to your game fully.   This is great opportunity  to submit small games you may have made with Construct 2, Game Maker HTML5 or other tools, as well. As long as they implement our API and follow the guidelines - you're set!   If you have any questions - please don't hesitate to leave a post or check out the contact address on the web page.   Have an excellent day! We're looking forward to some great submissions from the experts here at :)
  2. [source lang="jscript"][/source] I've got most of the logic worked out, actually all of it.. minus bubble collisions. You can see the illustrated problem, here: [media][/media] Ideally, it should stick to the bubble, probably taking the angle into account. I can see my approach is all wrong as it fails in many interesting ways. (Use BoudingSpheres instead of Rectangles is probably a good start) The game in question be cloned can be found here: [url=""][/url] I've got the following code started: [source lang="jscript"]//Counstruct our bounding rectangle for use var nX = currentBall.x + ballvX * gameTime; var nY = currentBall.y - ballvY * gameTime; var movingRect = new BoundingRectangle(nX, nY, 32, 32); var able = false; //Iterate over the cells and draw our bubbles for (var x = 0; x < 8; x++) { for (var y = 0; y < 12; y++) { //Get the bubble at this layout var bubble = bubbleLayout[x][y]; var rowHeight = 27; //If this slot isn't empty, draw if (bubble != null) { var bx = 0, by = 0; if (y % 2 == 0) { bx = x * 32 + 270; by = y * 32 + 45; } else { bx = x * 32 + 270 + 16; by = y * 32 + 45; } //Check var targetBox = new BoundingRectangle(bx, by, 32, 32); if (targetBox.intersects(movingRect)) { able = true; } } } } cellY = Math.round((currentBall.y - 45) / 32); if (cellY % 2 == 0) cellX = Math.round((currentBall.x - 270) / 32); else cellX = Math.round((currentBall.x - 270 - 16) / 32); //Check the bubble layout if (cellY == 0 || able) { //TODO: Finish game losing conditions if (cellY == 9) { winGame(); // cellY++; } //Safety check //if(cellX == rCellX && cellY == rCellY && cellY > 0) // return; //Assign the grid bubbleLayout[cellX][cellY] = currentBall; ballvX = 0; ballvY = 0;[/source] Could anyone point me in the right direction?
  3. Consider the following class definition and its methods: [code]public class Packet { static virtual Packet FromBuffer(); NetBuffer ToBuffer(); }[/code] Right now, I construct each packet like this and manually write each value to a byte buffer. I read in the FAQ when I arrived at here the use of marshalled structures. Should I potentially swap over to serialized versions of these? I initially used serialized objects but the overhead for each packet was immense (100+ bytes, ouch). Packets that are constructed from structs are much smaller. Main reasons to swap over: *Objects have a higher allocation cost than structs? (stack vs heap)? *Structs have automatic serialization advantage Any other advantages? Disadvanages? Why should I do it / not?
  4. I'd love to give it a whirl but the Git is missing.
  5. Transisting between proccess's

    Thanks for clearing it up everyone, I ended up using a GUID as a 'random token'.
  6. Transisting between proccess's

    Right, that was my mindset. Orginally, I had a login-server, chat server etc all trying to talk to each other. I looked at what I had, and said "Realistically speaking, I can probably intergrate the login and world into one; and probably just drop the chat server all together right now" I'm storing MD5 passwords in the database right now, and hash them before sending them off for authentication. So, just to make sure I'm understanding right, and I'm pretty sure I am, as you've been a great help! Client [SwitchZoneRequest] -> ZoneServer (verifies they're on the zone line and everything is OK, sends off to WorldServer which generates a 'token', (random sessionID) World -> Requested ZoneServer (Sends this token, saying that someone is expected to be incoming soon; to wait for them.) World -> ZoneServer (Indiciates success, has a packet with the required port and hostname to connect to the next zone AND the token; the server can at this point then 'drop' the player from it's list and send out notifcations to surrounding entities, and persist the user into the datbase) ZoneServer -> Client (Sends the previous packet, the client knows who to connect to now) Client -> Requested ZoneServer (Packet with the token, the ZoneServer has been waiting and knows the user with this secret token is valid so accept them and load who they are, which could have been sent with the token... or embedded in the token somehow.) My only key question: Can I just generate a token for the user once, and store it for them as a 'session token'? That would work, but it's pretty secure and immune to replay attacks, right?
  7. Transisting between proccess's

    This isn't a 'commercial' server persay, so any basic cryptography should do the trick to deter *MOST* people, I would hope. I see lots of articles, but so many to go about it. I was thinking of using the users ID and current minute or hour to generate a 'key'.. but that's spoof able far too easy. I could use the password, but then that requires I store the users password in memory, isn't that dangerous too? :/
  8. Transisting between proccess's

    How would I generate these tokens and validate them? Pseudo-code is fine, but I've never implemented something like that before.
  9. Transisting between proccess's

    Aye, but who do you identify who the 'incoming player' is? Is the client just going to send their unique ID or something to the Zone-Server and the zone-server will check if it's OK? You can spoof that though, if you're zoning and I time it properly (wouldn't be hard if I knew you were zoning) then I could end up in control of your character!
  10. Hey there! I'm developing a game server which makes use of several processes to do things. It look basically like this: WorldServer ZoneServer ZoneServer ZoneServer ChatServer (?Maybe, unimplemented, for cross-zone chat?) My WorldServer handles logging into accounts, doing character selection etc, -HOWEVER-; this is all fine. I'm at the point though, how do I transit between processes? I was thinking, disconnect from the world server, and connect to the ZoneServer you're in, and then send a 'JoinZone' packet; but how does the ZoneServer know I'm not cheating as to where I am, and who I am, etc? Previously, when I used single proccess methods, I could just reference a hash-table (dictionary) with a Connection key, and grab my user object. This works on the WorldServer, but isn't so easy when it's a whole new proccess, and the connection objects themselves will change, too because of disconnection/reconnection. Advice? Thanks! Vaughands
  11. Tracking users in a virtual world

    I see, so you suggest two hash maps as well? I was in fear that's a waste.
  12. Tracking users in a virtual world

    I'm using a hash map.. it seems fast & efficient.. and in profiling I've found no faster method. My question above still remains.
  13. Tracking users in a virtual world

    The issue indeed is connection to user info. I'm pairing the end point (UDP) to the dictionary (C#) or hash table in many other languages. The issue here is, if my packet information refers to another user. How would I reference this user easily? Such as sending a 'private' message?
  14. I have a virtual world (MMO environment) in which I require users to login with a username and password into the world. Currently, when a user connects and login I store their socket/connection info in a dictionary; the socket being the key and the account object being the value. However, I later find the need to when for example: "A sends a message to B" "Server reckgnonzies this; and B is identified as Bob in the packet" "Server now needs to know what socket Bob's is" How can I figure this out without using a very slow for loop?
  15. [C#] MMORPG Server Architecture

    Excellent! So how would you go about implementing a threaded File IO queue then? I have a main that loops forever in an infinite loop. It receives packets on this thread and I'm yet to decide how to handle them but they're captured here. If I wanted to spawn a thread on start-up called "threadIO" and then assign it a procedure to do how would you do it? Make a class for the service? Would you just create a method in the main "Server" class called DoIOWork? The server class has the main method as well.