Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Apr 2009
Offline Last Active Jul 29 2014 05:41 PM

Topics I've Started

RakNet making call to php page

20 July 2014 - 09:33 AM

RakNet has TCPInterface and HTTPConnection classes. I'm trying to make a call to a php page passing in a query string but it's not working. The final result should be data in a database but after I run it from C++ using RakNet there is no db entry. If I just use the url in a browser then there is an entry. So it's something to do with how I'm calling this from RakNet.


This works in a browser





This doesn't work (no error just no db entry) in C++ using RakNet


TCPInterface *tcp = RakNet::OP_NEW<TCPInterface>(__FILE__, __LINE__);

tcp->Start(0, 64);

HTTPConnection* http = RakNet::OP_NEW<HTTPConnection>(__FILE__, __LINE__);

http->Init(tcp, "localhost");


http->Post("/MyWebApp/gnet.php", "?opt=add&game=MyGame&server=mygame.net");

RakString data;
data = http->Read();
http->HasBadResponse(NULL, &data);


Where can I contract a 3D modeler and animator

13 June 2014 - 06:21 AM

I'm making a prototype game and would like to contract a 3D modeler and animator for some first person arms with a couple animations and I'm wondering if anyone has any advice on where to find such services? I'm looking to pay around $100. I'm also wondering if any experienced contractors think that's reasonable?



Entity Interpolation

17 April 2014 - 06:27 AM

I'm using the idea from https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking about entity interpolation. I have a javascript game using SignalR for the network traffic. The server sends position updates 5 times a second and I store them in an array via unshift() so the newest position data is at index 0 and I only store 4 elements total. I go back 400 ms for rendering positions.


Then on the client when ready to render I get the interpolated position for each remote client.


The issue is the code I have is creating a rubber band effect. The remote clients do move, but they sort of jerk back and forth. Can anyone see what I may be doing wrong or does a rubber band effect raise any flags about what it could be?



function updateRemoteClients() {
    var currentTime = new Date().getTime();

    // loop over all our remote clients and find the interpolated position to draw them at
    for (var c in remoteClients) {
        var actor = remoteClients[c];
        for (var i = 0; i < actor.snapshots.length; i++) {
            // make sure we don't go out of bounds with our checks
            if (i + 1 < actor.snapshots.length) {
                var diff = currentTime - 400 - actor.snapshots[i].timestamp;
                var nextDiff = currentTime - 400 - actor.snapshots[i + 1].timestamp;

                // find the change over from neg to pos which tells us we are between the 2 timestamps we need to look at
                if (diff < 0) {
                    if (nextDiff > 0) {
                        // we have our 2 snapshots to interpolate with
                        var total = actor.snapshots[i].timestamp - actor.snapshots[i + 1].timestamp;
                        var perc = currentTime - 400 - actor.snapshots[i + 1].timestamp;

                        var percentage = perc / total;

                        var ss1 = actor.snapshots[i].position;
                        var ss2 = actor.snapshots[i + 1].position;

                        // calc the interpolated position
                        finalPos = ss1.lerp(ss2, percentage);

                        // set this actors position
                        actor.x = finalPos.x;
                        actor.y = finalPos.y;

html5 mmo idea

04 April 2014 - 11:35 AM

This is just me rambling about an idea to see if anyone wants to ramble back.


I'm looking to get ideas and thoughts flowing. I have a general idea of what I want to do (I'm more technical than I am designer so I can do the technical aspect but needs help with ideas and thoughts around aspects of the game).


First off it's not an RPG. There are no levels, xp, or mana. No spells. Nothing like that.


  • The idea is a large streaming top/down 2D world.
  • You can purchase land (buy tiles on the map).
  • You play 1 character that starts randomly in the world with basically nothing.
  • The world is populated with raw resources (trees for wood, deer, bear, flowers, etc)
  • The idea is basically to gather resources from the land and to build things with those in order to aid in building more advanced things which ultimately is to keep your stats (body temp, thirst, hunger, spirit, social) at an acceptable level. It's basically life in a 2D world.
  • The social stat would encourage people (but not require it) to form villages, towns, cities.
  • Players can make businesses that provide services that other players can purchase.


So thinking about this leads to many many resources and items to craft and what are the blueprints for all these items, etc. The system itself to code wouldn't be all that hard, but designing all of the things the game can use/make could get complicated.


Because there are so many possibilities of resources and items to make it doesn't seem realistic to do that all at once, so I thought about making the game evolve with this stuff. Basic resources that can make basic things would be available first. Then slowly but surely other resources and blueprints would be introduced (probably by listening to the players ideas).


So if you were able to put yourself into this mindset and like the game idea what ideas of resources and items do you think would work well to start with?


Some of my thoughts are:



  • wood (from trees)
  • stone (from rocks)
  • wheat
  • corn
  • deer
  • bear
  • pigs
  • cows


  • wood/stone axe (for chopping wood)
  • wood/stone hoe (for farming)
  • fire (for raising body temp)
  • knife (for cutting food)
  • small hut (for shelter)


I really want the ability to buy land to be a big point of the game. You can only make buildings on land you own and making buildings is an efficient way to get currency since you can charge people to use your building. For example you could make a simple lumbermill. This would allow players to use your lumbermill to turn their lumber into usable wood for building things. A person could do this by hand but it would be time consuming so using a lumbermill is more efficient but costs money.


Now that money is brought up the question is where does it come from and how do you get it? I would have to have some NPC's in the game that you could sell stuff too for money. I feel like I would perhaps need to adjust the price they give to be lower than the average amount that real players are giving. This would encourage people to interact instead of just using the NPC. This would be a way to inject currency into the game, but would only be used as a last resort by people probably since the amount they give a lot lower.Maybe they also have a limit on what and how much they buy? Something to keep the economy in check and slow inflation.


Like I said this is me rambling about ideas for this game that I think are interesting but complex and I don't have the details or ideas 100% thought out and just thought I'd lay them out here for others to contribute their thoughts if they wanted too.


FSM AI examples

27 January 2014 - 03:45 PM

Are there any code examples of a FSM for AI? I know it would be specific to whatever engine probably but I would love to see some code to get an idea on how to implement this for the engine I'm using. I've used FSM before for higher level states like (Logo, MainMenu, Options, Gameplay), but I've never used FSM for lower level stuff. It always seemed like getting access to required data from within states and between states was a challenge.