For the record, I'm still working daily on my Android project, and I haven't forgotten about it. I'm just adding this to my list of side-projects.
I started doing some research on the Canvas element, and found that it was pretty simple to use, but there's not a whole lot of documentation about it. Then, I found an article on creating a basic game using the canvas element, by a Mozilla developer. Although it's not exactly the concept of what I'm doing, I'm going to look at it to get an idea of what I'm going to try to do.
I then made a basic landing page using Bootstrap, and I started working on an "Upgrades Store".
After just an hour or so, my landing page started to look pretty nice. I'd be happy to show an example, I just don't want to upload any images yet since I think my game idea is pretty nice :)
It got even better when I started handling user connections, and mentioned their names. Since I'm on a Mac, it even featured Emoji support:
I then went ahead and setup multiple server support, like so:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function connectToServer(servername, userid) { | |
var dataToSend = { | |
'userid': USER_ID | |
}; | |
if (SERVER_ID == 'east') { | |
socket = io.connect("http://localhost:3000", { // Connect to east | |
'forceNew': true | |
}); | |
} else if (SERVER_ID == 'west') { | |
socket = io.connect("http://localhost:3000", { // Connect to west | |
'forceNew': true | |
}); | |
} | |
socket.on('connect', function () { | |
socket.emit('newconnection', dataToSend); | |
socket.on('clientconnect', function (info) { | |
setPlayerCount(info); | |
}); | |
socket.on('clientdisconnect', function (info) { | |
setPlayerCount(info); | |
}); | |
}); | |
} |
Looks like a cool project. I need to make sure you're ready to take that last Android test in eIMACS before you finish though, so perhaps focusing on that and fixing the bugs in the FXOS tutorial so Aki and I can finish getting it usable again would be the best use of your time.
ReplyDelete