Search Results

Search found 3347 results on 134 pages for 'html5 canvas'.

Page 31/134 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Android - Rendering HUD View to SurfaceView

    - by Jon
    I have developed a relatively simple game in android, to get my head around it all, and on the back of it developed a crude game engine (in the loosest sense!). I use a SurfaceView and canvas (no OpenGL) - I'll cross that bridge another time! I have implemented a game HUD, title screens etc. by overlaying standard Android view widgets over my SurfaceView. This all works reasonably well maintaining an acceptable frame-rate, but it is a simple game with not a lot happening on or off screen. What I am wondering now is whether one could (and whether one would get any advantage by) drawing all my views to the one SurfaceView, all controlled by the main game thread. At the moment I have handlers flinging messages around and runOnUiThreads here, there and everywhere. Quite cumbersome. Any thoughts on this would be much appreciated (before I perhaps waste time trying to do it!)

    Read the article

  • Are there any good html 5 mmo design tutorials? [on hold]

    - by Dwight Spencer
    Hey all. I got a rather inspired after playing gaia online's zOMG and wanted to revive an old project idea I've had laying around for a few years now. I'm looking to work with html5 (ie canvas, svg based sprites, & WebGL) to build a graphical web based MUD/MMO. Obviously, this is a new take on an old idea and after searching google I haven't really turned up many good resources. But does anyone have any tutorials or other resources to point me in the right direction?

    Read the article

  • how to transform child elements position into a world position

    - by MrGreg
    So Im making a 2d space game and I have a bunch of spaceships that have turrets. Objects have a position and orientation, the ships being in world coordinates while the turrets are children and coordinates are relative to their parents. How do I efficiently calculate the position of a turret in world coordinates (i.e. when it fires and I need to know where to place a bullet in the world)? Calculating the turrets orientation is trivial - I just add the turrets relative angle to its parents. For position though, I guess I could do a bunch of trigonometry but this MUST be a common problem with a good/fast general solution? Should I be relearning how to do matrix math again? :) btw - Im creating the game in javascript+canvas but its the math/algorithm im interested in here Cheers, Greg

    Read the article

  • How to work with edge Texture

    - by XzenTorXz
    Im not sure if i use the right terms, but im not able to find something to start with. Im trying to develop a little HTML5 game. I have a ground with a texture and now I want to make a surrounding texture. The texture is an image wich should be bend around the ground. At the moment im using easelJS for display my images/textures. So im looking for some sort of Tutorial/Script/Advice. Im not even sure if I can bend a image in javascript. So the worst case I can think of is split the image in 100 pieces and then put it back together and rotate each piece. for example like this:

    Read the article

  • More FlipBoard Magazines: Azure, XAML, ASP.NET MVC & Web API

    - by dwahlin
    In a previous post I introduced two new FlipBoard magazines that I put together including The AngularJS Magazine and The JavaScript & HTML5 Magazine. FlipBoard magazines provide a great way to keep content organized using a magazine-style format as opposed to trudging through multiple unorganized bookmarks or boring pages full of links. I think they’re really fun to read through as well. Based on feedback and the surprising popularity of the first two magazines I’ve decided to create some additional magazines on topics I like such as The Azure Magazine, The XAML Magazine and The ASP.NET MVC & Web API Magazine. Click on a cover below to get to the magazines using your browser. To subscribe to a given magazine you’ll need to create a FlipBoard account (not required to read the magazines though) which requires an iOS or Android device (the Windows Phone 8 app is coming soon they say). If you have a post or article that you think would be a good fit for any of the magazines please tweet the link to @DanWahlin and I’ll add it to my queue to review. I plan to be pretty strict about keeping articles “on topic” and focused.   The Azure Magazine   The XAML Magazine   The ASP.NET MVC & Web API Magazine   The AngularJS Magazine   The JavaScript & HTML5 Magazine

    Read the article

  • How to handle the different frame rate on different devices?

    - by Fenwick
    I am not quite sure how frame per second works on a web page. I have a Canvas game that involves in moving an image from point A to B, and measuring the time elapsed. The code can be as simple as: var timeStamp = Date.now(); function update(){ obj.y += obj.speed; text = "Time: "+ (Date.now() - timeStamp) + "ms"; } The function update() is called every frame. The problem is that the time elapsed is different from device to device. It is pretty short on my PC, but get longer on my iPad, and is much longer on my cell phone. I thought it is because the FPS is smaller on mobile devices, so instead of calling update() every frame, I call it every 1ms by using a setInterval. But this does not solve the problem. In my understanding, the function for setInterval is invoked based on the increment in system time, other than frame rate, so it should fix the problem. Am I missing anything here? If the setInterval function is called based on FPS, is there any way to get around with the FPS difference across devices? On a side note, I have sort of a "water simulator" on the same canvas. It involves in redrawing about 60 objects which can be 600x600 pixels for every frame, so it could be a frame rate killer. I am using Phaser.js but not really using much of its functionalities, if that helps.

    Read the article

  • Serve up syntactic XHTML5 using the text/html MIME type?

    - by cboettig
    I have a site currently written with HTML5 tags. I'd like to be able to parse the site as XML, with support for namespaces, etc, to facilitate programmatic extraction of data. Currently I have <!DOCTYPE html> and <meta charset="utf-8"> Which I gather is equivalent in HTML5 to explicitly setting the content-types as <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> for my current setup. In order to serve XML it sounds like the right thing to do is <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> Should I also change my Content-Type to <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> Or is that not necessary? What is the advantage of having content-type be "application/xhtml+xml"? What is the disadvantage? (Sounds like it may break internet explorer rendering of the site? but maybe that information is out of date now?) Many thanks!

    Read the article

  • Opera 12 est arrivé, capture vidéo en HTML5 et accélération graphique pour tout le navigateur

    Opera 12 est arrivé capture vidéo en HTML5 et accélération graphique pour tout le navigateur Edit de la partie sur WebGL Opera 12 est de sortie. On passera rapidement sur la possibilité de customiser plus facilement le navigateur et on soulignera plutôt une utilisation expérimentale de l'accélération matérielle pour le rendu des pages web (et pas simplement les animations) et même pour l'affichage de son UI. Les deux pour un surf et un fonctionnement beaucoup plus rapides. Cette nouvelle fonctionnalité doit être activée en mettant à 1 le paramètre opera:config#UserPrefs|EnableHardwareAcceleration [IMG]http://ftp-developpez.c...

    Read the article

  • HTML5 : quelques nouveautés de l'API DOM pour JavaScript, un billet de blog par Bovino

    La spécification HTML5 définit différents modules indépendants. Cette modularité a pour avantage de permettre de travailler sur certains aspects du standard sans avoir besoin de se soucier de l'état d'avancement des autres. Parmi ces modules, l'API DOM est celui qui permet de définir les propriétés et méthodes disponibles en JavaScript pour manipuler le DOM. Nous allons voir les différentes nouveautés particulièrement utiles de cette API.

    Read the article

  • HTML5 + Quake II

    In case you missed it on the Google Web Toolkit Blog , check out this HTML5 port of Quake II. (Yep, that is a browser pushing 30 frames...

    Read the article

  • Can Flash Survive HTML5?

    <b>Linux Magazine:</b> "Is HTML5 going to put the hurt on Flash? Rumors of Flash's demise may be greatly exaggerated, but the long term prospects for Adobe Flash seem pretty dim indeed."

    Read the article

  • Drawing to the canvas

    - by Mattl
    I'm writing an android application that draws directly to the canvas on the onDraw event of a View. I'm drawing something that involves drawing each pixel individually, for this I use something like: for (int x = 0; x < xMax; x++) { for (int y = 0; y < yMax; y++){ MyColour = CalculateMyPoint(x, y); canvas.drawPoint(x, y, MyColour); } } The problem here is that this takes a long time to paint as the CalculateMyPoint routine is quite an expensive method. Is there a more efficient way of painting to the canvas, for example should I draw to a bitmap and then paint the whole bitmap to the canvas on the onDraw event? Or maybe evaluate my colours and fill in an array that the onDraw method can use to paint the canvas? Users of my application will be able to change parameters that affect the drawing on the canvas. This is incredibly slow at the moment.

    Read the article

  • Filling a region draws it off canvas

    - by Xanyx
    Hi Using the following code in Delphi 2007: procedure TfrmTest.PaintBox1Paint(Sender: TObject); const Rect_Size = 10; begin PaintBox1.Canvas.Brush.Color := clYellow; PaintBox1.Canvas.FillRect(Rect(0, 0, PaintBox1.width, PaintBox1.height)); PaintBox1.Canvas.Brush.Color := clRed; DrawARect(PaintBox1.Canvas, 0, 0, Rect_Size, Rect_Size); end; procedure TfrmTest.DrawARect(ACanvas: TCanvas; iLeft, iTop, iWidth, iHeight: Integer); var rgnMain: HRGN; begin rgnMain := CreateRectRgn(iLeft, iTop, iLeft + iWidth, iTop + iHeight); try SelectClipRgn(ACanvas.handle, rgnMain); ACanvas.FillRect(ACanvas.ClipRect); SelectClipRgn(ACanvas.handle, 0); finally DeleteObject(rgnMain); end; end; I get this: (Yellow area shows boundaries of PaintBox1). HMMM, NOT ALLOWED TO POST IMAGE Please go to: http://www.freeimagehosting.net/uploads/62cf687d29.jpg (Linked image shows a form with a yellow box [PaintBox1] in the center. However my red rectange [rgnMain] has been drawn at pos 0,0 on the form) My expectation was that the red rectangle would be at the top left of the PaintBox1 canvas, not the form's canvas. Why is it not? Can regions only be used with controls that have a Windows handle? Thanks

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >