Oliver Sch

Members
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

141 Neutral

About Oliver Sch

  • Rank
    Member
  1. Callback is blocking.. (JavaScript)

    console.log("This should fire before the Callback?"); should fire before the callback.. but it doesnt..
  2. I am trying to understand callbacks properly so that I can iterate arrays without blocking the Server.   Please tell me why it is blocking.. what am I doing wrong? I would much rather run this loop, and then do something when it is finished, but not block the rest of the server.   Here is the code:   //callback test var myID = 666; var grid = [ [0,0,0], [0,0,0], [0,0,0] ]; function find_empty_slot(id,callback){ console.log("Your ID is" + id); callback(); } find_empty_slot(myID,function(){ for(var y = 0, len = grid.length; y < len; y++){ for(var x = 0; x < grid[y].length; x++){ if(grid[y][x] === 0){ console.log("I am a Callback"); } } } }); console.log("This should fire before the Callback?");    
  3. I wrote a little nodeJS server that works just fine offline on my computer. But now I want to put it online on one of the many clouds out there that support nodeJS   I looked at some of the "tutorials" out there, but I don't use expressJS and it is to complicated for me.     All I am using is NodeJS and Socket.IO.  And I haven't seen a tutorial for that. I also don't understand how I am to know what IP and Port I have to set the app to.     I am pretty much just lost :D   Could I get some help? A guide, a explanation, something..    All the Clouds seem to work the same way. npm install   and then .. Magic.   So it isnt really cloud specific what I am asking for, I am just clueless how to upload and deploy it.   A Drag&Drop onto the cloud  would be the best for me haha.    
  4. You could buy one less package of smokes, or skip a Big Mac, and you should have enough for a cloud server :-)   But I like server-side way more any ways.    Sounds to me like you need the players to download a server and run it for them selves. A bit like DotA via Garena?
  5. Your Worst "Gotchas" ever in programming

    Worst for me would mean most obvious one:     Missing:  }
  6. Grid, Pathfinding and collision?

    Hi I have a JavaScript server for my Game. Right now Players simply move around with X,Y coordinates and Velocity. Collision is detected if a players X,Y is = to an objects X,Y. I would rather work with a grid. Like: Grid = [ [0,0],[0,1], [etc..], ] But right now I have no real Idea how to work on grids :-/ In my head I am only able to run Left and Right on an Array... Any good tutorials? I need to learn how to use a grid, and collision detection. Path-finding I understand mostly.
  7. Arthur & the 9 Lords of Hell

    Work in Progress for my current Game.
  8. Tutorials are your Friends!

    I did not go for the same amount of polygons because my Game is LowPoly and Diablo Style
  9. Tutorials are your Friends!

    I know learning new stuff can be irritating. But it is important to always push your boundaries. Unless you are a genius of an artist, you have to do more then repeating what you already know. You have to look for new and perhaps better ways to push yourself ^^ Check out this Before & After I made today. One hand was modeled before, the other after, I saw a great tutorial: [img]http://img31.imageshack.us/img31/4269/handcompare.png[/img] Video Tutorial: [media]http://www.youtube.com/watch?v=J1mExXURsWk[/media]
  10. Lucas Arts sold to Disney for $4 billion?!

    What is this all about? Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money Money
  11. So this is a yes for setTimeout?
  12. Is this right? We are talking about JavaScript. Event Based Language. If I use setInterval to call a function every second, and the funtion takes 2 seconds to process. Then I am going to "stack up" requests indefinelty? and creating a longer and longer delay? If I use setTimeout, and specify 1 second. Then the function will run (again, lets say 2 seconds) and then start the timeout. And not stack up requests.
  13. Just starting out...python a good choice?

    I suggest JavaScript too! It's very easy to learn. Event Based. And fits perfectly into your workflow of HTML and CSS! Check out the Three.JS libary (If you like 3D) [url="http://mrdoob.github.com/three.js/"]http://mrdoob.github.com/three.js/[/url] All JavaScript ^^ Edit: Oh yeah, and JavaScript runs on EVERYTHING Browsers, Smartphones, Linux, Mac and PC. (It runs on OS if you export in into a Wrapper)
  14. Thanks ! After I posted this Question I found what it means that JavaScript is Event Based. So I was waiting for a Loop that would never come As it stands right now, I think I will run Logic via intervals and timeouts. And rendering graphics and animations with the setAnimationFrame. Objections?
  15. I do plan a login ! I still do not understand how Same Origin Policy works.. I made a server on my Computer, but was able to access it via my Client that was on DropBox.. Doesn't that go against the Same Origin Policy?