jedimasta

Members
  • Content Count

    20
  • Joined

  • Last visited

Everything posted by jedimasta

  1. From a strictly legal perspective, you can't patent the rules of a game. You can patent the mechanics, i.e. the code or any type of special mechanics used in making the whole thing work, but the concept of a game can't be copyrighted. That's why you see so many hundreds of Candy Crush knock offs (which itself is a knock off of Bejeweled). In my case, this is all scratch written, save for some of the APIs like Easel. At any rate, I don't know how far I'm gonna take it. For now I've registered myself with Microsoft's ID program and I'm soaking up tutorials like a sponge.
  2. I've been discussing this mostly in another thread and forgetting to update this one. To answer your questions: Yes, it's a gambling machine. Basically kind of a social slot machine. The company that makes them also does a more traditional poker game, where you're pulling down cards that get flipped to make the best poker hand, as opposed to a target score. In my case the broad rules are Individual cards from multiple mixed decks are flipped to the center of the table each card has a value the same as they would hold in Blackjack, except that Ace is always 11. each round has a target score and from that, a base maximum hand size players must react quickly to grab cards from the center in order to reach the target goal without going over when one player reaches the max hand size, the game goes into a countdown, where only a limited number of cards are dealt based on the number of players in the game. the game ends when all but one player busts all players fill their hands without going over the deck runs out the player closest to the target without going over wins. There can be and have been ties. So now that I've given you all the rules, I guess there's nothing stopping you from stealing them and making a better game than I could hope to. Regarding performance issues, I blame this solely on the browser capabilities of the Xbox One. Instead of racking my brain trying to optimize it for the browser, I jumped head first into UWP development, converting the title and deploying it as a windows/xbox app which works BEAUTIFULLY. So much so that once I've done some live playtests with friends, I'm may consider putting in the cost and effort to making this an actual downloadable game to sell for a few bucks. I'm sure there's a lot more to doing that than I've discovered so far, but *I* think it has potential, assuming it's fun for people other than me. The one kinda puts the fear of the internet gods in me is the cost of hosting for a node server with sockets that can serve up the game. I'm really not passing much data back and forth, but when you push the scope up from 6 players on a local environment to potentially thousands it starts the boggle my mind, particularly since I've never done anything like this, like, ever.
  3. So naturally, I spend more time asking the wrong questions and attempting unrelated answers that I totally gloss over the ACTUAL solution. The correct way to do this is first: if(typeof Windows !='undefined'){ blah blah blah} That way the browser skips right over it and goes along its merry way like before. The second, and more important step is to actually tell Visual Studio, by way of the appxmanifest, to LOOK FOR Windows Runtime objects, otherwise it's gonna skip over them just like the browser does. Second URI in the attached screen shot did the trick (at least as far as outputting the Debug message to the console, I havent checked on the Xbox yet cuz I'm not home).
  4. That doesn't seem to work either. Oh well. I'll post over at StackOverflow too, maybe I'll get a hit there.
  5. That's makes sense. So I ditched all the WinJS stuff I was doing and tried what you suggested, but I still keep getting errors in the browser. Same thing too, "Windows is not defined". I tried doing a check like this: if("Windows" in window){ And the browser does skip over it, but the UWP doesn't see it either. So I tried a "typeof" statement and same thing. The very last thing I tried was if(window.Windows != undefined){ Debug.writeln("I found windows"); var overscanDisabled = Windows.UI.ViewManagement.ApplicationView.getForCurrentView().setDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationViewBoundsMode.useCoreWindow); } Which, again, allows the regular old browser to work, but when I test it in VS, I get nothing written to the console (unless, it wouldn't since it's not on the Xbox? I dunno) I feel like I'm really close and your help has been amazing thus far. Thank you.
  6. I should maybe also mention, that as far as VS goes, I'm not developing it there. I have a completely working web app and within VS, I'm pointing the Start Page to my locally hosted URL. Which, I'll grant, may complicate things further, but it was the quickest way to get things rolling.
  7. Just throwing another log on this fire. I added the lines like you said (cuz I re-read it and you actually said to put it in the app's JS). Additionally, I used npm to get winjs and added that the page's HTML file thusly: <script src="/node_modules/winjs/js/base.js"></script> <script src="/node_modules/winjs/js/ui.js"></script> but when I load up Chrome, I'm getting: Uncaught ReferenceError: Windows is not defined Edit: The error is throw when I tried to add the Overscan variable. The Navigation snippet works just fine. Another Edit: I changed that line to be var overscanDisabled = WinJS.UI.ViewManagement.ApplicationView.getForCurrentView().setDesiredBoundsMode(WinJS.UI.ViewManagement.ApplicationViewBoundsMode.useCoreWindow); and it gets a bit further. I looked in the base.js and it all calls itself WinJS. Even still, now the error I get is Uncaught TypeError: Cannot read property 'ApplicationView' of undefined
  8. Perfect, but WHERE does this line go? Does it get placed in the manifest somewhere or in the JS of my actual app? And if the latter, what includes do I need in order for it to makes sense to the app?
  9. I'm really pleased to report that just basically pointing to my local server in the app manifest and changing a couple of settings has proved to actually BE the magic bullet. My console has to be in dev mode and I have to run the debug on the remote machine, but wow, what a difference in speed! I'll continue experimenting, but I did have one question you might be able to answer: How do I get rid of the mouse cursor on the screen? I've read that adding navigator.gamepadInputEmulation = "gamepad"; will do it, but I'm not sure where it's supposed to be added and if it has dependencies. Any thoughts?
  10. This is all great information. I really appreciate you laying this out. I'm gonna try and get this all into VS. At the very least, I'll learn a little bit for future projects. I have a feeling that the combination of sockets and nodes and all that is gonna get me all gummed up since I've never used VS before. Not sure on the framerate. I didn't build in any sort of display for it, so that might be a next step as well. It seems to be fine on the PCs browser, whether it's Edge, Chrome, FF or Safari. I think the safe assumption is that its the Xbox communicating with the socket server, but my understanding is that there are website dedicated to Xbox compatible HTML5 games, multiplayer ones at that, and they don't have any issues. They also don't have much of a community to chat with. At any rate, the more I read into it, the more I agree that a VS execution of the code might not be the magic bullet I'm looking for. As paranoid as it sounds, I'm hesitant to share the code. Despite my absolute novice-ness at all this, if there's even a slight chance to market this, especially on the console, I don't want to start giving out all my code. The concept isn't entirely unique, but it's not out there for people to already play either. I repeat though, thanks for taking the time to help.
  11. Hi Stay, I'm about to jump into this, more or less headfirst, and I'm hoping I can pick your brain as I move forward. Thus far, I've created a basic browser driven card game. My first iteration was for a physical, kiosk style execution, but I decided to try and take it up a notch by giving players control using their smart phones as an interface, while having a larger "main stage" screen up on a TV (ever played the JackBox games? Like that.). Combining the EaselJS APIs, NodeJS, sockets and TweenJS, I've got a decently workable game. When I try to load it up in Edge on the Xbox One things start to fall apart. There's an immediate and obvious lag whose cause I haven't nailed down. Either the combined assets are just too heavy, even on local network, or there's a communication breakdown between my node server and the Xbox to the point that it's just unplayable. When I first started reading about UWP, I thought perhaps I could take advantage of the console's native APIs to get things running more smoothly, so I've got VS2015 installed and ready to go, but haven't quite started down that road yet. I'm reading through the MS docs now, but can you give any other guidance to getting started, knowing that I've already got a browser-based app functioning, is it a pain to import and convert all the work I've already done? Are there any specific APIs you've learned to avoid?
  12. Okay, I don't think that's related to my issue, but thanks. I'm otherwise a daily console gamer and don't experience lag there. I think perhaps I'll start a new thread to get a broader pool of experience with HTML5 and the XB1.
  13. Can you explain what you mean by "deactivated game mode". I've built a multiplayer card game that uses phones as interface devices and I'm finding Edge on the Xbox One to be a massive drag down. Button taps on the devices are severely delayed and even sound effects initially fire several seconds after they are supposed to.
  14. Nevermind. Being stuck in traffic for over an hour gave me time to think about how to handle it. I don't fire the player init and room connect until it receives a socket "okay" that then hides the form and takes the user into the room. I think that about covers all the fun stuff. My last concern is performance. This may have more to do with the way MS Edge is handled on the Xbox One than anything else. I wanted to be able to play this with friends on the big screen, but holy crap does it perform poorly on the Xbox browser. Anyone else experienced this? My pages aren't too image heavy. Even with sound effects and music, it isn't more than ~10 megs and all of that preloads anyway. Even when I'm doing this from my local network, Edge just chugs on the Xbox.
  15. Been about a week since I've updated here. I added a lot to the project and learned a lot in the process. I'm not able to post code at the moment, but I thought I'd post another question. I added unique room identification. While I was testing things out on different devices, it occurred to me that I was running into cross talk, cuz I had several "Tables" running at the same time and communicating different cards to different players. I solved this by causing the table to create and display a unique room code that players provide before connecting, so only that specific table sends cards and notifications to players connected to that room. This improved things, if not made them slightly more complicated code-wise. I worked it all out, but I want to create a check so that a client/player only connects to active rooms. I'm not looking for specific code here, more for a method to best handle it. It might help to know the following: Players are directed by the NodeJS server to a player/device specific screen when they load up the URL. Two form fields are presented to them, Name and Table ID. After filling it out and submitting, it takes them to the requested room and the table (not the NodeJS server) stores their user names, socket IDs, etc.. Additionally, the NodeJS server adds each connection to it's own array that stores the socket ID, the room they are in and the type (i.e. player or table). My initial assumption is when a socket connects, it should do a check and if it's a player type, it looks through the array to see if the table code provided already exists and its assigned to a table. If not, no connection is made, but I'm not quite sure how to kick that back to the client/player screen to unhide the form and send an alert because it's already connected to the NodeJS server already. Or maybe I'm overthinking it (I do that more than I'd like to admit).
  16. Thanks Cluster. Over the past few days I've been staying awake far longer than I should be running through various tutorials and examples to get a very rudimentary start. I started a new thread with specifics if you (or anyone else) cares to see where I'm at and how I got there. As for specifics: 1) yes, static IP. I'm running this all off one machine, but it's set up to feed out to my internal network, easy peasy. 2) the RNG is just a basic Math.random with a min max modifier. The random score is based on how many players in any given round and never more than ~60 so I'm not too concerned with being hardcore random 3) most of this is already worked out in the tabletop game. you might have a point on checking/handling disconnects and reconnects, but I don't know how much time I want to dedicate to that since rounds don't last more than 1 minute. If curious, here's is what I'm emulating (ignore the spinner, that's for the casino payouts) https://goo.gl/photos/3QWfsm1ArbDozpm6A
  17. So I made a bit of progress after more trial and error than I care to admit, but here's what I did. Node server code: var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io')(server); server.listen(3000); // handle incoming connections from clients io.sockets.on('connection', function(socket) { // once a client has connected, we expect to get a ping from them saying what room they want to join socket.on('room', function(room) { socket.join(room); console.log(socket.id+" in "+room); }); socket.on('sendCardInfo',function(theCard){ io.sockets.in("players").emit('sendCardInfo',theCard); //console.log(theCard); }); }); My intention here is to set up two different rooms so I can address them seperately. That part seems to work well enough. The second bit of that is supposed to take info gathered from the client and, at some point, send it to other clients. I'd just be happy to get it to log to the console, but it won't do that. Here's a look at the client setup, that places this client into the room "casino" var socket = io.connect('http://172.0.0.2:3000'); var room = "casino"; socket.on('connect', function() { socket.emit('room', room); }); Later on, cards are dealing out an I do the following: //this comes from an array not shown here var valCard = centerDeck.cards["0"].value; socket.emit("sendCardInfo", valCard); Finally, here's the player/client side var socket = io.connect('http://172.0.0.2:3000'); var room = "players"; socket.on('connect', function() { socket.emit('room', room); }); //and its listener, which displays the card value in a text container on the screen: socket.on('sendCardInfo', function(data){ centerText.text=data; }); I think I might be good here for the moment. It's not likely the most elegant or optimized solution, but it seems to be working so far. I imagine it will get much more complex when I'm sending data back to the one specific user. As it stands I need to set up a way to store the socket id and assign it a player number, but it's 1am here and I'm done thinking for today. Thanks for having a look!
  18. I appreciate the response. Based on your suggestion though, I think all this may be over my head. Admittedly, my experience with Javascript is novice at best. Node and Socket are literally things I only started looking into a few days ago thinking they might make this thing a little bit cooler, but I feel like this is already ahead of my pay grade. Is this not doable with the three files I'm working with: nodeserver.js maingame.js/html player.js/html player --> node: gimme that card node -->maingame: this player is taking that card, store it for him maingame-->node: done, here is that card's information node-->player: the card is yours, here's its info
  19. I posted a response in a thread that had some applicable information to it, but it never got a response and I have questions, so this is sort of a re-post. I've created an HTML5 clone of a game I saw in a casino recently wherein players "grab" cards as they are dealt in order to reach a target score determined randomly before the game starts. I specifically created it to be played using physical buttons around a TV embedded into a table. I used the EaselJS APIs and I'm pretty happy with the results. The next level, so to speak, would be in allowing players to use their mobile devices to grab cards from a main play area (i.e. the TV). If you've played any of the Jackbox Party games, you'll know what I mean. I've gathered that in order to do this I'll need to leverage node.js and sockets.io to get players' mobile devices talking to the main game screen, but that's where my understanding ends. I don't really intend on releasing this to the public or anything, more for just me and my gambling friends, so I wan't to spend as little as possible, ideally nothing, on server usage. I've already setup a webserver in my home, strictly to serve internal IPs, using XAMMP on Windows. I created a basic node js server and I'm able to send messages back and forth, basically culling information from tutorials. What I'm looking for is how to best approach having players, using their mobile devices, interact with a separately rendered "main" screen. So, for example, the main screen displayed on the TV flips over a 10 of hearts. If a user wants that card, they tap a button on their device to add it to their hand. Unless I've missed my mark, the client (the player's mobile phone) sends a request to the node server, which then pings the main screen to give it info regarding which card is showing. While the main screen then locally stores that information into it's arrays (tracking players and their points), it sends a ping back to the server, which in turn sends a ping back to the client to animated the card image to their device and updates a score display. Do I have all that right or is there some far easier way to do this? I can't have the node server file the same as the main screen because it doesn't know how to process any of the other stuff going on, but I could be wrong. How do I tell the node server to get the card value from the main table and send it back to the client in one elegant function? There are other things I need to do, but this is the central piece to the entire project.
  20. I've only scanned down through some of the code there and thanks are in order for making the explanations clear and concise. I haven't yet drilled down into the nitty gritty yet, but I wanted to ask a few things before I do, to see if your example relates to my project or if I need to keep researching. I've created an HTML5 clone of a game I saw in a casino recently wherein players "grab" cards as they are dealt in order to reach a target score determined randomly before the game starts. I specifically created it to be played using physical buttons around a TV embedded into a table. I used the CreateJS APIs and I'm pretty happy with the results. The next level, so to speak, would be in allowing players to use their mobile devices to grab cards from a main play area (i.e. the TV). If you've played any of the Jackbox Party games, you'll know what I mean. I've gathered that in order to do this I'll need to leverage node.js and sockets.io (or similar) to get players' mobile devices talking to the main game screen, but that's where my understanding ends. I don't really intend on releasing this to the public or anything, more for just me and my gambling friends, so I wan't to spend as little as possible, ideally nothing, on server usage. I've already setup a webserver in my home, strictly to serve internal IPs, using XAMMP on Windows. Do you think I could glean anything from your example and further, would you have any advice or could you point me in the right direction for adding a node/socket server locally to handle the network requests? Much of this is still new to me, only having come from a PHP front end development background, so I might be in over my head, but I won't know until I ask. Any and all guidance is appreciated.