Just looking for help with the beginning

RealmCrafter, Multiverse, MMOKIT, ect...
Post Reply
ShawnSwander
Posts: 53
Joined: Thu May 17, 2012 12:31 am

Just looking for help with the beginning

Post by ShawnSwander »

So I have socket.io installed and it seems to work (thanks to Hallsofvalhalla's videos so thank you for those) I really insist on jumping into this project I've made simpler games before this is what I wana do.

I'm very competent with php and javascript doesn't bother me much though I haven't used canvas yet.
I was able to install nodejs and socket.io and get that running and reading some simple scripts. So to me it seems natural that I could send server events to a handler and allow clients to request actions such as moves, attacks, rests, etc. I should also be able to have the server send messages to prompt a client to update their canvas.

I think I should use an engine for this game to to save me some time but there are simply too many to choose from.
-impact seems great but spending $100 and possibly finding out I can't do this will probably make me sick to my stomach.
-I could probably do it without an engine but drawing on a canvas and making it clickable so the canvas knows I'm clicking the orc on the square and not the square itself... or clicking the square to move to and not the orc to attack... I haven't got a good plan to do that.

So I guess my question to be brief is is there a better engine for a game like this or is this gonna cost me 100 bucks and possibly yield nothing for me.

I tried to make this game about 10 years ago but socket functions weren't available and I had to shelf it. Id be happy to share more details. If it helps

My game concept is pretty much a text based MUD that has icon based graphic representation (a lot like a board game in real life). The screen would be a 7x7 grid no animation if you move in 3 seconds the screen updates and you are in your new position.

-I want it browser based
-the specific clicking isn't a much if I can think of an alternative interface such as holding a key to to a specific action
-I'd like the game to possibly be something that can be run on a mobile browser but that is secondary to getting it to work
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Just looking for help with the beginning

Post by Jackolantern »

It sounds to me like you should stay away from engines such as Impact and others for this project. These types of engines focus on traditional loop-based game development (this kind of development is used to make games from Angry Birds to Diablo III), which honestly, I think would cloud your game and make development more difficult. Instead, since your game is board-game styled, it would likely be better in PBBG style, where the game is made of separate web pages, and each page is made up of typical web elements. The main reason for this is that the iterative nature of loop-based game development complicates real-time networking. Since much of the game's code loops many times a second, you have to set up handling code to continue running the game between the sockets shuttling data back and forth (most of the loops through the code will be done while data is in transit; few will actually have fresh data waiting for them). Of course, that is more of a problem for games that allow real-time, networked movement, but the PBBG style also would significantly break down the game development process into discreet chunks that are easily testable, and remain clearly independent (a very good thing in software development).

This type of event-oriented architecture makes socket communications easy. Just act on data freely as it comes in, and send it out when you have some to send. Event-based code is easy to write, since all you have to think about is what the players can do, and what needs to be done to accomplish each action. Elements of the game that are not needed remain where they are until they are needed, unlike loop-based games that require everything to be redrawn many times a second, and that must also contend with resetting the game (which is not always clear depending on the game type), managing various screen states, etc.

Hope this helps :)
The indelible lord of tl;dr
ShawnSwander
Posts: 53
Joined: Thu May 17, 2012 12:31 am

Re: Just looking for help with the beginning

Post by ShawnSwander »

That kind of helps, sort of confirmed what I was thinking I'd have to do.
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Just looking for help with the beginning

Post by hallsofvallhalla »

You will find Canvas is not that much more to learn if you are already comfortable with JS and CSS. As far as the "clickable Orcs" it is no different than the way you would do it before onClick='function()". You don't have to use HTML5 to use Node or websockets.

A engine to look at that has a free version is http://www.scirra.com/. I have no used it but it was posted on here earlier and might be worth a look.
ShawnSwander
Posts: 53
Joined: Thu May 17, 2012 12:31 am

Re: Just looking for help with the beginning

Post by ShawnSwander »

So I went ahead and bit the bullet and bought impact to see if it would help me with the part of javascript I'm weak on. I was able to follow your impact node though I didn't see broadcasting when I got my server running. I saw heartbeats and handshakes. I'll probably have to look at that again...

I can't think of a good method to determine what a player clicked on on the canvas though I do understand how to check where the player clicked. So this is what is hanging me up now. Impact has a lot of great documentation in fact so much I can see myself getting lost in it. So im glad its there as long as there is a community to point me in the right direction while I find my footing again.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Just looking for help with the beginning

Post by Jackolantern »

Mouse input is something that is sorely missing natively in Impact. You are basically stuck using the vanilla JS mouse events, and then converting them into the game.

As far as the Impact documentation, it is very complete but it is also concise. I was able to read every word of it in 2 days of casual off-and-on reading :)
The indelible lord of tl;dr
ShawnSwander
Posts: 53
Joined: Thu May 17, 2012 12:31 am

Re: Just looking for help with the beginning

Post by ShawnSwander »

Yeah I'm learning it but I seem to have a block. Since I'm not using an MMO Maker Ill post in a more relevant topic with my stage one ideas. :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Just looking for help with the beginning

Post by hallsofvallhalla »

I havent really had any issues with the mouse thus far with impact.
http://impactjs.com/documentation/class ... #initmouse

is the basic input and capturing of buttons and position. Not sure what else you would need it for.
ShawnSwander
Posts: 53
Joined: Thu May 17, 2012 12:31 am

Re: Just looking for help with the beginning

Post by ShawnSwander »

I think for now I understand the clicking enough to get by. I'll run into issues later but I've seen some solutions that aren't too bad.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Just looking for help with the beginning

Post by Jackolantern »

Oh, must have missed that part of the documentation. I thought that Impact was mostly based around keyboard input (I am yet to see a game that meaningfully uses the mouse in Impact).
The indelible lord of tl;dr
Post Reply

Return to “MMO Makers”