chrisbrobs's Forum Posts

  • I didnt want to start a new thread, so i will ask the question here? (it is related)

    Iv'e got the offset image thingy sorted, but now i'm struggling with the next bit -

    How do i create an event to detect when each puzzleblock is in its correct position within the puzzle.....similar to a jigsaw puzzle.

    I gave each block, 2 private variable's ( 'xpos' and ypos') and set the values of each to the required resting position....ie Square 9 should be at 552, 608 to be correctly placed.

    I tried the following-

    + System: Always (every tick)

    + System: For each puzzlecubes

    + System: puzzlecubes.Value('x') Equal to puzzlecubes.X

    + System: puzzlecubes.Value('y') Equal to puzzlecubes.y

    -> puzzlecubes: Destroy

    but it didnt work?

    Can anybody help me with this?

  • I'd use sprite, tiles are usualy used only as static images. Just click on lydia, than animator tab and in the top window (there is probably the Default animation with 9 frames) right click to add another animation - name it "Image 2" (or whatever) and add 9 frames of the new picture. After, you can add "Image 3" animation for the next picture and so on. Than you can call correct frame with "Set animation" and "Set animation frame" actions.

    Great idea! thanks for your help.

  • [quote:2g1q9ttl]This doesn't solve the problem (it still pastes to all the sprites)

    The Sprites share the same texture, so if you change the texture on one all of them change. One way you can do it is give the Sprite 16 animation frames and assign each instance a different frame. Another method is use TiledBackground objects instead of sprites. They can each have different textures but only with the load texture action, so you'll have to save the image from the canvas to a file first before loading.

    In the actual game i need the solution for, i am using a sprite with 9 animations.

    <img src="http://dl.dropbox.com/u/22173473/small%20splash.png">

    These events start when the level loads-

    + PickLevel: On fade out finished

    -> System: Create object puzzlecubes on layer 1 at (488, 272)

    -> puzzlecubes: Set 'numb' to 1

    -> System: Create object puzzlecubes on layer 1 at (240, 272)

    -> puzzlecubes: Set 'numb' to 2

    -> System: Create object puzzlecubes on layer 1 at (616, 408)

    -> puzzlecubes: Set 'numb' to 3

    -> System: Create object puzzlecubes on layer 1 at (752, 152)

    -> puzzlecubes: Set 'numb' to 4

    -> System: Create object puzzlecubes on layer 1 at (648, 152)

    -> puzzlecubes: Set 'numb' to 5

    -> System: Create object puzzlecubes on layer 1 at (328, 416)

    -> puzzlecubes: Set 'numb' to 6

    -> System: Create object puzzlecubes on layer 1 at (304, 152)

    -> puzzlecubes: Set 'numb' to 7

    -> System: Create object puzzlecubes on layer 1 at (744, 408)

    -> puzzlecubes: Set 'numb' to 8

    -> System: Create object puzzlecubes on layer 1 at (400, 152)

    -> puzzlecubes: Set 'numb' to 9

    -> System: Create object lydia on layer 1 at (60, 446)

    -> lydia: Activate Platform movement

    Everything works fine as it is, but i was looking for a way to let the player choose a picture for the puzzle or start the level with a different 'picture' every time.

    If i was to use tiledbackground objects could i still make them pushable blocks (platform behaviour) ?

  • Quick addition to above -

    I changed the events in the 'main events group' to-

    + MouseKeyboard: Mouse is over photos

    + System: Always (every tick)

    -> TiledBackground1: Set image offset to photos.Value('valx'), photos.Value('valy')

    + MouseKeyboard: On Left Clicked on photos

    + System: Repeat 2 times

    -> Canvas: Paste TiledBackground1 into canvas

    -> ImageManipulator: Copy image from sprite Canvas

    -> ImageManipulator: Copy image to sprite photos

    After doing this, i didnt have to double click on the 'photos' to paste in the image.

    This doesn't solve the problem (it still pastes to all the sprites) but it stops the 'paste' lag that seems to happen.

    Thanks

  • I need to find a way to copy and paste images from tiled background into a sprite.

    (actually several instances of the same sprite)

    Iv'e got as far as creating the the image offset x,y events, but i cant work out the rest.

    Ive searched the forums, downloaded loads of caps but still can't get it to work.

    Here's my cap-

    http://dl.dropbox.com/u/22173473/Tile%20copy%20to%20sprite.cap

    Iv'e added comments inside the cap that explain things a bit clearer.

  • MoonViewer

    http://dl.dropbox.com/u/22173473/Moon/index.html

    Half finished app iv'e been working on.

    Not very exciting unless your into astronomy.

    I was trying to create an educational application, but im struggling to work out how

    i can insert large paragraphs of text.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your still stuck, you can use these-

    http://dl.dropbox.com/u/22173473/muzzle.rar

    <img src="http://dl.dropbox.com/u/22173473/muzzlepic.png">

    It contains 3 PNG images with transparency and instructions.

    I made them for a shooting game i am working on.

    I used these events -

    Line 7 + MouseKeyboard: On Left mouse button Clicked

    -> System: Create object muzzleflash on layer 2 at (gun.X-6, gun.Y-20)

    Line 8 + muzzleflash: Any animation finished

    -> muzzleflash: Destroy

    The animation settings were -

    Animation speed 50

    Loop OFF

    Repeat # 2

    Repeat to 1

    Ping-pong OFF

    if you want to download the game cap (you can copy them out of the cap) go here-

    http://www.scirra.com/forum/viewtopic.php?f=4&t=8778#p67345

    Feel free to use them if they want.

  • Thanks for the tips. After reading through your comments -

    "Some games can work well with timedelta, others suffer from problems/ annoyances"

    "Be aware though, setting a fixed framerate means you rely on your player's hardware to be able to calculate that much frames of your game per second, which is not always given. Also, as soon as there is anything that inhibits the pc at times, your game will run much slower, etc."

    I'm gonna stick to using time-delta. Ive not even thought about how the 'Toggled events' will perform when i switch them back on.

  • It's because of timedelta. As your frame rate varies slightly timedelta changes slightly which affects the trajectory. Try ticking the "Override timedelta" tick box in Application properties->advanced. (this will make your game frame rate dependent btw)

    If you want your game to use timedelta, then you have to accept that you won't have perfect consistency.

    Thanks for the solution Davioware.

    Is over-riding time-delta and creating a game frame rate dependent not something you would recommend ?

  • In the following example, The player presses the 'launch' button to fire an object 'ball' at a group of boxes.(the boxes need to land in the tree branches)

    Why does the projectile's path change slightly on each press of the 'launch button?...Sometimes i can dislodge all the boxes at the first attempt, but the next time the projectile's path changes slightly?

    Start window

    <img src="http://dl.dropbox.com/u/22173473/Anrgy1.jpg">

    Goal

    <img src="http://dl.dropbox.com/u/22173473/Anrgy2.jpg">

    http://dl.dropbox.com/u/22173473/BlocksTest.rar

    Thank in advance.

  • Looks cool! The cannon should probably be below the camera, though. xP

    <img src="http://dl.dropbox.com/u/22173473/viewpoint.png">

    I'm only the driver.

  • I just realised i didnt include a sound for the sniper bullet in the above rar file.

    you can get it here -

    http://dl.dropbox.com/u/22173473/richochet.wav

    Just drop it into the 'sounds' folder.

    Cheers

  • The other thing i forgot to mention....I had provide 'proof' that the videos(contents) were mine.

    This involved taking screenshots of the software i used to create them(In some cases this could be 5 or 6 different graphics and sound programs) and then submit these screenshots with a written explanation as to how each part of the video was produced!

    I have stopped making them now....Not worth the hassle.

  • For those of you who have an interest in graphic design and animation, here is a link to my youtube channels-

    http://www.youtube.com/user/johnbrobs

    http://www.youtube.com/user/chrisbrobs

    I had to use 2 names because of legal stuff....If you have any questions re the vids, please ask?

  • Yeah sounds about right, but it varies depending on your click trough ratio.

    Not sure why you would be getting paid for such a low amount tho....

    Usually you have to accumulate much more than that.

    Anyway I wouldn't plan on getting rich off of it, unless you have a way to get 40k hits... a day.

    I just checked my account, this is the balance -

    <img src="http://dl.dropbox.com/u/22173473/google.png">

    Not planning to retire any time soon!