Search Results

Search found 28881 results on 1156 pages for 'javascript is future'.

Page 14/1156 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • design of 'game engine' for small javascript games?

    - by Matt Ball
    I'm making a group of two or three simple javascript games for fun. After someone finishes one game, they'll be presented with a harder or easier version of another game depending on whether the original game was won or lost. I have a high-level question about the design of things: So far I've created a class for one game type that manages the interaction with the UI and the state of the game itself. But for tracking how many of the subgames have been won, or for understanding whether the next game presented should be more or less difficult, are there arguments to be made for making a 'game engine' class? How does the engine communicate to the games? For instance, when a game is won, how is that information relayed to the engine? Is there a better or more common design? (If you want to see what I have so far, the games are slowly taking shape here: https://github.com/yosemitebandit/candela and can be viewed at http://yosemitebandit.com/candela)

    Read the article

  • HTML Javascript Hidden Object or Photo Hunt Game

    - by PeteT
    Is anyone aware of any example photo hunt/hidden object games either in HTML and Javascript or flash if necessary? I am having trouble finding one, I may be using the wrong words to search. Photo hunt being like the wheres wally/waldo books where you look for wally in a complex image until you find him. So if it were played on screen you would press the location of wally and it would either be correct or wrong, possibly timed. I am hoping to find one where you can just load in your own photos and specify some co-ordinates that match where the hidden object is. A spot the difference example may be useful as a starting point but I haven't found an example of either that is web based yet.

    Read the article

  • Here we go again - quest for web hosted forum via javascript

    - by jim
    Hello all, disclaimer If this is the wrong location for this question, then please advise me accordingly. backgound I've been using Disqus and intense debate as a 'comments' service for a variety of my sites to great effect and love the fact that i get alot of the facebook/twitter integration 'for free', as well as the SEO benefits. request To this end, does anyone out there know of similar services that can be used to pull entire forums/threaded discussions into the app in a similar fashion (i.e. via ajax webservices). google has been at a loss to turn anything up on this front and i'm therefore wondeing if it's unlikely that such a 'service' exists. respect hope this stikes a chord out there... btw - altho using this in asp.net mvc, I'm aware that this technology could be used on any platform capable of consuming javascript via ajax, thus the wide spread of 'tags'.

    Read the article

  • Store a formula in a table and use the formula in a javascript/PHP function

    - by Muhaimin Abdul
    I have a MySql database where part of it handles instrument's depth of water. Each instrument has its own formula of calculation how depth the water when the operator collect the reading I stored the formula for each instrument in database/MySql. Example formula: [55-57] this is the simple minus operation, where the number is actually represent the id of a row. How do I represent those number with id of a row and later convert it to javascript readable code. I simply want to do keyup event where everytime user key in something into text field then the other part of HTML would reflect changes based on formula that I fetched from database FYI, I'm using BackboneJS together with RequireJS

    Read the article

  • Javascript: Safely upload a client data file

    - by Jeffrey Sweeney
    I'm (still) working on a template-based XML editing program. It's a GUI-based XML editor that only allows users to add certain tags and attributes based off the requirements. You can see the current version here for an idea. Now, I'd like to allow users to upload their own data templates, but I'm concerned about potential XSS hacks. Currently, the template file is in Javascript object literal notation, which unsurprisingly is a security nightmare if the user can upload their own. I was thinking of using XML instead, but is there an even better alternative?

    Read the article

  • Extending web server controls by providing client side functionality through Javascript

    - by nikolaosk
    In this post I will demonstrate how to extend the functionality of the web server controls by adding client side functionality with Javascript. Let's move on to our example. 1) Launch Visual Studio 2010/2008/2005. (express editions will work fine). Create a new empty website and choose a suitable name for it. 2) Add a new item in your site, a web form. Leave the default name. 3) We need to add some markup. < form id = "form1" runat = "server" > < div > < span id = "test1" > nikos...(read more)

    Read the article

  • I need a webpage to host my javascript!

    - by Amir Reza
    Does anyone know a website that hosts javascripts on their page? I have a research project that needs to collect some RTT from all over the world and compare them together. I have written the javascript code for that but I do not have a high hit rate website to put it on to collect data. I know it is a little bit odd question to ask, but do you know any website or any trick that can help me? Note that the script would not do any harm to anybody! :-) Thanks, Decad is right, I basically need some people to put my script on their "high-hit rate" website ... so I can collect data from large number of clients... Of coarse, the script is run on the background with no harm to the page. It basically measures some RTT and submit it to a server. I already have some pages, but they barely got a hit from outside! Thanks,

    Read the article

  • Anti-cheat Javascript for browser/HTML5 game

    - by Billy Ninja
    I'm planning on venturing on making a single player action rpg in js/html5, and I'd like to prevent cheating. I don't need 100% protection, since it's not going to be a multiplayer game, but I want some level of protection. So what strategies you suggest beyond minify and obfuscation? I wouldn't bother to make some server side simple checking, but I don't want to go the Diablo 3 path keeping all my game state changes on the server side. Since it's going to be a rpg of sorts I came up with the idea of making a stats inspector that checks abrupt changes in their values, but I'm not sure how it consistent and trusty it can be. What about variables and functions escopes? Working on smaller escopes whenever possible is safer, but it's worth the effort? Is there anyway for the javascript to self inspect it's text, like in a checksum? There are browser specific solutions? I wouldn't bother to restrain it for Chrome only in the early builds.

    Read the article

  • AJAX Requests & Client-Side JavaScript

    - by Sarah24
    I am new to AJAX and trying to understand a question I've been given: A HTTP request is generated by a form which contains some drop-down list. When the form is submitted, a new web page is displayed with some relevant text information (which is dependent on the list item selected). Now, the same parameters are sent to the server via an AJAX request, and the same text information is returned. Q. What tasks would the client-side JavaScript have to do to ensure a valid request was constructed and sent? Any useful links or quick explanations greatly appreciated.

    Read the article

  • Javascript Rookie Question: Define Variables Inline

    - by Dylan Kinnett
    I'm proficient with HTML and CSS but I'm still pretty shaky when it comes to Javascript. That said, I've been able to build a site using the Internet Archive Book Reader, which relies on reader.js Here's a copy of one of my versions of reader.js https://gist.github.com/dylan-k/ed4efed2384e221d46cc It's a good site, but I find I have to repeat things a lot. Basically, I have one copy of reader.js for every page/book featured on the site. It seems there must be a better way. I re-use the script, making copies, just so that I can change lines 28, 80, 83, 84. Is there a way I could include just one copy of reader.js and then use a <script> tag to define these 4 lines for the individual pages?

    Read the article

  • Strange javascript error when using Kongregates API

    - by Phil
    In the hopes of finding a fellow unity3d developer also aiming for the Kongregate contest.. I've implemented the Kongregate API and can see that the game receives a call with my username and presents it ingame. I'm using Application.ExternalCall("kongregate.stats.submit",type,amount); where type is a string "Best Score" and amount is an int (1000 or something). This is the error I'm getting: You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround. callASFunction:function(a,b){if(FABrid...tion, can be used as a workaround."); I'm wondering, has anyone else had this error or am I somehow doing something stupid? Thanks!

    Read the article

  • Good resources for JavaScript 2D game programming?

    - by DJCouchyCouch
    As an exercise, I've decided to look into JavaScript for game programming. While it's far from being the best language for that, I do like the idea that it's cross-platform and it's always available as a web page. So I thought I'd see what I could do with it. Specifically, I'd like to make a 2D tile-based game of some kind. Where can I find resources to do that? I'm sure this question's come up before, but I can't find any reference to it.

    Read the article

  • Play audio in javascript with a good performance

    - by João
    I'm developing a browser game where the player can shoot. Everytime he shoots it play a sound. Currently i'm using this code to play sounds in JavaScript: var audio = document.createElement("audio"); audio.src = "my_sound.mp3"; audio.play(); I'm worried about performance here. Will 10 simultaneous sounds impact my game performance too much? Will all audio objects stay in memory even after they are played?

    Read the article

  • Recommended Reading for Polishing JavaScript coding style?

    - by wml653
    I've been coding in JavaScript for a while now and am fairly familiar with some of the more advanced coding features of the language (closures, self-executing functions, etc). So my question is, what advanced books/blogs/or anything else would be recommended to help tighten up my coding style? For example, recently I was coding something similar to: var x = ['a', 'b', 'c']; var exists = false; for(var i = 0; i < x.length; i++){ exists = x[i] === 'b' ? true : exists; } But found that the following condensed code would work better: var y = {'a':'', 'b':'', 'c':''}; var exists = 'b' in y; Both store the same value in 'exists', but the second is less common, but much cleaner. Any suggestions for where I should go to learn more tricks like this?

    Read the article

  • Referencing external javascript vs. hosting my own copy

    - by Mr. Jefferson
    Say I have a web app that uses jQuery. Is it better practice to host the necessary javascript files on my own servers along with my website files, or to reference them on jQuery's CDN (example: http://code.jquery.com/jquery-1.7.1.min.js)? I can see pros for both sides: If it's on my servers, that's one less external dependency; if jQuery went down or changed their hosting structure or something like that, then my app breaks. But I feel like that won't happen often; there must be lots of small-time sites doing this, and the jQuery team will want to avoid breaking them. If it's on my servers, that's one less external reference that someone could call a security issue If it's referenced externally, then I don't have to worry about the bandwidth to serve the files (though I know it's not that much). If it's referenced externally and I'm deploying this web site to lots of servers that need to have their own copies of all the files, then it's one less file I have to remember to copy/update.

    Read the article

  • Is this safe? <a href=http://javascript:...>

    - by KajMagnus
    I wonder if href and src attributes on <a> and <img> tags are always safe w.r.t. XSS attacks, if they start with http:// or https://. For example, is it possible to append javascript: ... to the href and src attribute in some manner, to execute code? Disregarding whether or not the destination page is e.g. a pishing site, or the <img src=...> triggers a terribly troublesome HTTP GET request. Background: I'm processing text with markdown, and then I sanitize the resulting HTML (using Google Caja's JsHtmlSanitizer). Some sample code in Google Caja assumes all hrefs and srcs that start with http:// or https:// are safe -- I wonder if it's safe to use that sample code. Kind regards, Kaj-Magnus

    Read the article

  • Implement Fast Inverse Square Root in Javascript?

    - by BBz
    The Fast Inverse Square Root from Quake III seems to use a floating-point trick. As I understand, floating-point representation can have some different implementations. So is it possible to implement the Fast Inverse Square Root in Javascript? Would it return the same result? float Q_rsqrt(float number) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y = number; i = * ( long * ) &y; i = 0x5f3759df - ( i >> 1 ); y = * ( float * ) &i; y = y * ( threehalfs - ( x2 * y * y ) ); return y; }

    Read the article

  • Build graph of dependencies (calls) in javascript [on hold]

    - by Maximus
    I'm new to a project and I see that everything is so interwoven that small changes here makes stuff break there. I'd like to refactor it and separate into modules. For that I'm going to need a tool that can build a graph of dependencies (calls) to visualize the connections. There are many tools like that for languages like C#, but I've found little information about the available tools for JavaScript. Has anyone done something like this? What tools have you used?

    Read the article

  • JavaScript: scroll position (Webkit engine) [migrated]

    - by Julien
    I'm currently trying to use JavaScript to find out how far down the page the user has scrolled; for Firefox 8.0, the keyword is pageYOffset. To say things mechanically: The page has a certain height. In Firefox, the useful object is document.documentElement.scrollHeight. The browser's visible area also has a certain height. In Firefox, the object is window.innerHeight; in IE8, document.documentElement.clientHeight. I need to know where the user is in the page vertically; in other words, how many pixels down the page the user has scrolled. Does Webkit have a DOM object that refers to the current scroll position? Thank you.

    Read the article

  • Experience embedding javascript

    - by deft_code
    I'm looking into scripting languages to embed in my game. I've always assumed Lua was the best choice, but I've read some recent news about embedding V8 as was considering using it instead. My question is two fold: Does anyone with experience embedding v8 (or another javascript engine) recommend it? How does it compare with embedding Lua? I like that v8 has a c++ embedding API. However Lua API has had lots of time to be refined (newer isn't always better and all that). Note: At this point I'm not too concerned with which is better language or which library has better performance. I'm only asking about ease of embedding.

    Read the article

  • Comparisons of Javascript 'data grids'?

    - by Joe
    I've found plenty of questions between here and StackExchange of people asking for the 'best' data grid / data table, or one that has a particular feature, and plenty of lists out there (of various ages) listing the various data grid implementations ... but is anyone aware of any matrix of what features the various solutions implement? (eg, allow shift-click to select multiple; support checkboxes for selection; can update a regular table in-place; allow editing of cells; support websql or indexeddb for local caching; which browsers they support; infinite scroll; etc.) There's a generic 'javascript framework' comparison on wikipedia, which would be the sort of thing I'm looking for, but it doesn't go into detail on data grids. (which makes sense, as so many are extensions, not core features of those frameworks, and in the case of jQuery, there's lots of 'em.)

    Read the article

  • Has Dart something useful that javascript doesn't have?

    - by marko
    http://www.dartlang.org/ I've checked out the site very briefly, and got curious. Is there any advantages of using Dart? Is it just a replacement for javascript? It looks like simpler java. Writing quite a lot of C# at work, the language feels very much like what I'm used to, so learning the syntax looks like a breeze to learn. Has anybody any opinions or experiences with the language? (Compared to coffeescript (= I'm not doing ruby syntax) the syntax looks more familiar to me).

    Read the article

  • in javascript whay use " var that = this "

    - by tarek11011
    hi i am new with javascript What is the benefit of using this line var that = this An example function Person( firstname, lastname, age ) { this.firstname = firstname; this.lastname = lastname; this.age = age; getfullname = function() { return firstname + “ “ + lastname; }; var that = this; this.sayHi = function() { document.write( “Hi my name is “ + getfullname() + “ and I am “ + that.age + “years old.”); }; } thanks

    Read the article

  • in javascript why use " var that = this "

    - by tarek11011
    hi i am new with javascript What is the benefit of using this line var that = this An example function Person( firstname, lastname, age ) { this.firstname = firstname; this.lastname = lastname; this.age = age; getfullname = function() { return firstname + “ “ + lastname; }; var that = this; this.sayHi = function() { document.write( “Hi my name is “ + getfullname() + “ and I am “ + that.age + “years old.”); }; } thanks

    Read the article

  • Future proofing client-server code?

    - by Koran
    Hi, We have a web based client-server product. The client is expected to be used in the upwards of 1M users (a famous company is going to use it). Our server is set up in the cloud. One of the major questions while designing is how to make the whole program future proof. Say: Cloud provider goes down, then move automatically to backup in another cloud Move to a different server altogether etc The options we thought till now are: DNS: Running a DNS name server on the cloud ourselves. Directory server - The directory server also lives on the cloud Have our server returning future movements and future URLs etc to the client - wherein the client is specifically designed to handle those scenarios Since this should be a usual problem, which is the best solution for the same? Since our company is a very small one, we are looking at the least technically and financially expensive solution (say option 3 etc)? Could someone provide some pointers for the same? K

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >