Pode's Recent Forum Activity

  • Kyatric : yes, same disease as yours ;)

    Thanks for the help.

  • Kyatric : it's my fault, I realized the plugin used is the old version (http://dl.dropbox.com/u/31151399/Construct2/Plugins/randomArray_old.zip) of RandomArray. I remember I kept that one, because I can use the "CurValue", which is missing from the new version).

    (Something completely unrelated. I saw that you are in France, but I don't remember where I saw that, are you french yourself ?)

  • R0J0hound: is it possible to add a function to you Canvas plugin to retrieve the canvas' image as data (I think the best is to retrieve a base64 text string) ?

    I'm trying to add a property inside the canvas object, but it doesn't works...

    (In fact, I'm trying to implement a floodfill like there http://www.williammalone.com/articles/html5-canvas-javascript-paint-bucket-tool/, but perhaps I'm trying to climb a too high mountain...

  • Here is the capx of a Fifteen game I made (the tiles are a bit small, but they are going to be replaced by a larger image at the end).

    Fifteen Game capx

    And here's the screenshot : <img src="http://dl.dropbox.com/u/1412774/15pb.png" border="0">

    (By the way, I'm using the Random Array plugin)

    As you can see, the logic I tried to make to switch between tiles is a bit strange, since at the time I didn't want to use a second array to store the game. In fact, I store the properties of the tile I clicked on, I move the mouse with the left button pressed, and I store the properties of the tile I lifted my finger on. If the two are a tile next to the empty spot, the move is "valid". With that, I have the problem that I can jump across the board, if the destination spot is the empy spot...

    Right now, I have two more problems : the first one (which is minor and doesn't bother me if I can't do it another way) is that I want to slide the tile with the mouse, without going outside the grid, and without allowing collision without another Sprite (just letting the player go to the empty spot with his selected tile). For the moment, there is no "sliding" movement. I validate the tile switch after the gesture, and there is nothing "dynamic". Anyway, it's just a cosmetic problem so it's not the biggest one.

    The other problem is that I want a "victory" condition. For that, I need to know if the tiles are in the right order. Since I don't use an array (and using an array seems difficult for me in that context of "sliding" tiles), I need to find a quick trick to do that.

    One of my idea was to use an invisible "growing bar" on the left of the game, which count the tile it intersect at each tick, and if the order of those tiles is the right one (i.e. "1", "2", "3", and "4"), then that row is good ! Repeat that for the 4 rows, and we have a victory condition...

    In the end, I think that all my code is overly complicated and that the victory condition can be made simpler. Does anybody have an idea ?

  • I wanted to have the possibility to click on something, and while the button isn't released, that the object follow the mouse, but only allong one of the two axis (i.e. when you go to the left or right, the object only slides allong the X axis, and vice-versa).

    I needed that kind of behavior for a game, and since there is no pre-made behavior for that, here's a solution : capx

  • You can't draw SVG inside an HTML5 canvas. One solution would be to use an hidden SVG context as a plugin, and dump the drawing done on that SVG context in a PNG, which is then pasted inside C2's canvas...

  • Ashley: My bad ! Why do it the easy way when you can do it the hard way ? ;) (I didn't saw the accelerometer in that object before, by lack of use for it for the moment...)

  • Quick response (I only have 2 minutes right now) : you can put the javascript to access the acceleromter in its own function, inside the exported index.html. Then you can use the CallJS plugin to call that function, and update the various items you are drawing with the information from the accelerometer.

  • Lprez: sadly, you can't play two sounds simultaneously, even with that method.

    : I tried to play wave file over an already playing audio background (tried with an .mp3 and a .mp4 on the ipad), and it doesn't work (I remember one of your comment saying that perhaps you would try wav SFX on top of compressed audio background). From my experience, it doesn't work, but I can be wrong in implementing that hack.

    I also tried some javascript libs to generate wave audio data (like riffwave.js), it doesn't work either. And Mobile Safari doesn't want to play a wave or an mp3 base64-coded dinamically inserted into the DOM.

    So I think we need to wait for Apple to change that on their browser, or find a XCode Project that uses a UIWebView and some tricks to bind the JS audio calls to some native code...

  • Same thing for me...

    Edit : correction - the board said yesterday that I have it, and today it's gone.

  • Ashley: I think you are right. By checking quickly the samples on the site of Impact JS, I saw that you need to call specific CSS tags and JS stuff for the ImpactJS framework to do its magic (I suppose that for the OpenGL/OpenAL layer to find its eggs, it's the sensible thing to do).

    So I'm going to investigate the AppMobi route.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry to bring back from the dead that old thread.

    I was thinking about the fact that ImpacTJS doesn't use a UIWebView, but was translating JS to an OpenGL/OpenAL underlying engine.

    Since we have a problem with HTML5 audio on iOS (impossible to have two sounds playing simultaneously), does somebody knows if it's possible to bypass that limit by running the C2 export through ImpactJS ?

    Does somebody already tried to run the exported index.html through that engine ?

Pode's avatar

Pode

Member since 3 Sep, 2011

Twitter
Pode has 11 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies