Monday, December 14, 2009

Court Week has finally arrived!

ok, my wifes insurance claims are finally going to court. Doesn't seem like they are going to offer a real settlement at all so i guess we'll have to go the whole nine yards with this one. Bleh! like i have time for this! STILL in the middle of moving ... my wife, bless her heart, has us moving tiny bit by tiny bit. Move a few things then set them up in the new place, move a few more then set them up. Me i just want to get the crap over their and then set it up then. At this rate it seems like Christmas will be gone before we are finished.

Ok so it's like 5:36am and i have to jump in the shower in just a minute but I'll throw out my idea for the first game the canvas engine will be laid out on. I purchased a domain called moghack.com. No it has nothing to do at all with hacking mmo's. :p Instead it will be a multi-player version of nethack. Though I will be getting a lot of ideas from nethack it will not be a duplicate or a web-based clone of it. That's been done before for starters and the current base design of nethack does not lend itself to multi-player options. Their are two features that will be absolutely migrated over, random-dungeon generation and perma-death. I have several ideas laid out on paper for the multi-player aspects of it but they are still in their infancy so will not be releasing those ideas quite yet. More details to come in January i hope if everything goes as currently planned ... which it never does. :p

-Matthew H.
aka Wetlander

Tuesday, December 8, 2009

General FYI

Ugh, Christmas is in full swing so working all the hours that I can get. Along with 2nd job, trying to drum up more business for home and in the middle of moving i barely have time to breath. Come January though this should all settle down though as by then we will have finished moving and have the new house unpacked along with reduced hours at one of the two jobs. a heck of a lot less travel time is going to help as well, about one hour per day that i won't be sitting in traffic.

Good thing about working at wally world though is that it's pretty mindless so i'm carrying around a small notebook in which to write down ideas and plan my January to-do lists. Doubt i'll post much till then though so merry Christmas to everyone!

Tuesday, November 10, 2009

The Universe is a Big Place ...

Ok anyone who has done any sort of research on the universe at all, or attended some basic science classes, or opened a book, or looked up into the sky ... ect, knows that the universe is big. Very big, really big, we has humans cannot even grasp exactly how big it is much less see across the whole thing. Currently we can see somewhere like 13-14 billion light years away because that is how long it has been since the big bang.

So what?

Some games have lots of different playable worlds, which according to string theory is plausible, but the main reason for this has been server limitations. For a web-based mmo game however there is no real good reason for this limitation if you design your engine to work across multiple servers. Their has been great advances in cloud computing so as such I believe it is entirely feasible to create a JavaScript version of this and apply it to an mmo game.

I very much believe in the K.I.S.S. method even in programming. I've seen many programmers over complicate things just to prevent theft of their work or to justify their jobs. In it's simplest form this is what i'm thinking:

Servers ...
  1. 1 login server
  2. 1 chat server
  3. 1 AI server (?: possibly a cloud depending on the number of units it needs to control)
  4. 1 server for every X number of users
  5. 1 database server (?: possibly it's own separate cloud at a later point) to bind them all in darkness.
  6. (?: possibly) Star-map server. The only thing it does is path-finding as the star-map is fixed. Would be a behind-the-scenes server like the database-server.
With exception of the database server itself all of the other server programs should be a single entity to make installing and expanding easier. The base program will load the required modules for that type of server so as such initially they can all be loaded onto a single server and then expanded outwards as required.

Client Side ...
  • Each user is given a list of of user servers (#4) to poll for data, the system polls the list and uses the one with the fastest response time.
  • The servers are re-polled every (x) minutes to help reduce server lag and overloading.
  • Script will keep track of data return times and will force a re-polling in case of lag from a single server.
So it seems fairly simple and as such should be possible, but what about new players?
  • Players are not given a starting world, they must find their own world to colonize (possible addition to 'autopilot' to a inhabitable planet.
  • Players are given a copy of the the latest available copy of the compendium (all publicly available knowledge)
  • You start as a colony of the faction you choose, not your own independent nation (this however does not mean you can't be attacked even as a noob).
  • Technically speaking you can be a leach and never leave your colony and never perform any research at all. Factions share group knowledge with their members including leaches ... this however may make your leaders unhappy but that is up to the players themselves.
  • New players will naturally migrate out towards the edge of the known galaxy.
  • Their are fixed travel lines between stars (though it is possible later to circumvent these travel lines but it takes a much longer time)
  • More than 1 player can inhabit the same planet ...
  • That's right you can start on the same planet as your bestest buddie in the whole world.
  • You don't have to colonize a planet, you can choose to build a space colony instead. Though this idea does have strategic advantages it comes with it's own obvious set of problems such as expense and habitation limitations.
  • Shared Knowledge: Just via interaction with other players, trade ... ect. Knowledge is shared with each other in the form of bonus points, the time it takes to research something is reduced.
I will expand more on these ideas in later posts.

Monday, November 9, 2009

Moving, ugh!

Ok, so for like the next two weeks we seem to be renting two places at the same time, talk about expensive ... but can't afford for me to take any time off either. So for my next couple of days off will be spent trying to get the lead out of my butt and get this moving thing done. Good news about the new place is the fact that we will be paying less rent than what we are here, and we'll have about 400 sq ft more space! The wife and I are definitely hoarders and seem to have issues throwing anything away! lol. Instead it get's tossed in a box where it will remain for 2-5 years before donation to the salvation army. :p

I've set my DVR to record episodes of 'The Universe' on the discovery channel to see if I can get some more ideas for the Nemesis Star game. Still thinking to do that one first but at this stage I'm still flip-flopping quite a bit so anything is up for grab's. Everything that will be needed in both games is very similar for the JavaScript engine, the only big difference is the addition of a flat or 3/4 view perspective in addition to the isometric drawing routines ... which is infinitely easier.

For the server side I've been doing some research on SSJS (Server Side JavaScript). There seems to be way too many choices and confusion about it with little real information. I have though ruled out using any SSJS engines that are programed in php or any other server side scripting language ... i don't mind sacrificing a little bit of speed for ease of use, but not that much. Hell at this point it might just be easier to program the server side in C# with spider monkey overlaying it for the scripting routines.

Well i got to get my lazy butt to work get these next couple of days over with (work two jobs 3 days of the week). Then it's moving time! Ugh!

Saturday, November 7, 2009

General Updates

Busy busy busy! The freaking Christmas season is almost here! Ok at least at good ole wally world it is. Yes yes, I'm still working two jobs one of which is for Walmart ... hey they have benefits! Just about anyone working in the computer field as a web programmer will tell ya ... unless you get a great gig working for Google or some other large company you probably won't get benefits anywhere. Getting ready to move soon again! ugh! but at least now with this move I will be 1.6 miles from work! which means more time to do the stuff I want to be doing (aka, this game design thing)

Was reading through a forum news feed archive and came across this: http://news.ycombinator.com/item?id=751075 Instead of resurrecting an old thread (3 months at the time of this writing) I figured i would cover one of the topics that someone their suggested.

CSS Sprites and Javascript Canvas ...

The long story short ... don't waste your time using CSS to clip the sprites from a large png image ... all the browsers have big performance issues when clipping and if your going to build a GUI or game of any real scale this alone will kill any good performance you would get. This isn't to day that the persons idea was so off either ... the advantage to using fewer files is faster load times especially if you are using xmlHTTP requests to tell it what files to load.

A simple tile prototype ...

function Tile()
{
this.img = new Image(); // create a new Image object.
this.width = 128; // width of the tile. defaults to 128
this.height = 64; // height of the tile. defaults to 64
this.offX = 0; //X offset for drawing abnormal sized tiles
this.offY = 0; //Y offset for drawing abnormal sized tiles
}

From the above i think you can get the picture here already ... you simply load the big file then you piece it out into actual tile objects thus pre-clipping everything. You get the speed performance from using smaller images that don't require clipping and reduce server latency time because you are pulling fewer files.

Also another way to get great performance increase ... use multiple canvas's! ... How many you use and what each of these layers does is of course entirely up to you just remember that the top most layer is the layer the user actually interacts with for your event processing.

If their is interest i will discuss this in greater detail with actual numbers to back up my claims here. I've done quite a bit of testing and this is the fastest way to process canvas games of any real size or scale.

M. Hagston

Thursday, September 10, 2009

Moving On!

ok, i told myself no games, no nothing on my two days off here so i can get stupid map working....and then i get a cold. So with my blankie and an entire box of tissues done and i'm sure a nose that is kin to rudolf i finally fixed the error.


perhaps if i get comments then i'll post how it works, otherwise you can just figure it out yourself. The super-short of it is it has a 3x3 buffer, it the data from these buffers to actually render the current viewport. Next phase is to get it to update these buffers as the user scrolls in order to create the illusion of an infinately scrolling map. after that it will be to get an actual charecter into the map and walk around. :-)

i'll spell check these posts later, but i'm going to bed now and fein death for a few hours. ughhhh. **sneezes**

Sunday, September 6, 2009

FINALLLY! making progress

hour here, hour there, finally making some progress! Nothing i wish to post quite yet (but the same url is in the blog history if you really want to find it map test 002). I warn you though with all the test stuff activated (and new ruler bar that's dynamicly drawn), it takes like 10-12 seconds to first render in google chrome. With the test draws i would not suggest any other browser besides chrome untill it's optimized again.

Anywho! Finally got that error somewhat fixed, at least on the vertical axis it seems to be working correctly for P1 (top left drawing panel). I finally figured out if i make it clip correctly then it draws it correctly, something i planned on doing for optimization because letting the browser clip anything outside the window leads to slower draw times. Now i just have to get the other 3 panel layers clipped right and then the inital map phase is well under-way to being completed! Might have to increase the buffer from a 3x3 to a 4x4 area though in order for it to properly preload a map in all directions. Will do some testing as far as that goes though, would prefer to stick with the slightly smaller size just to avoid being a memory hog.

So hopefully soon i'll have a little guy walking around the map and behind tree's and such, first rendition i will avoid collision and pathfinding but neither should be that complicated to add (yeah right). I do have some simple pathfinding already programmed for javascript that navigated across and old starmap type thing, just have to locate which file it's in. Well lunch is almost over and I need to get some more work done! Hopefully i'll have something for people to actually play with soon, the first thing i'm shooting for is a small grassland to walk around in, then I will create a small space-station which will help test the collision and pathfinding. Not to mention it the type of map that will primarily be required for the Nemesis Star game. Seeyaz!