User Tag List

Results 1 to 6 of 6

Thread: A complete Noob in distress

  1. #1
    No Products Registered

    Join Date
    Dec 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A complete Noob in distress

    Hey people, im a student in Bsc Computer games programming and im completly new to MMF2, i have been given a task to create an educational game for 6 year olds.

    I have a basic idea of what i want to do.

    Its going to be a scrambled up picture of an egyptian pharoah, the kids will click on the individual picture parts and try to piece together the original image.

    I have found a little tutorial that demonstrates how to make an object follow the mouse which is what i need to do but when the user release's the object it needs to either stick to the grid if its in the right space or return to the side if its incorrect.

    I did this using the event:

    Repeat while left mouse-key is pressed = set X position to XMouse and the same for Y this makes the pic follow the mouse as long as the left button is clicked in.

    thats about as far as i have got, does anybody know of a decent tutorial out there that covers a similar sort of topic? or could someone let me know if this is just too big of a project for a noob to try haha

  2. #2
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A complete Noob in distress

    Except for the scrambling (creating pieces from a picture) this should be quite straight forward.
    You should indeed use some sort of grid, and store in the alterable values of the pieces the row and column that the piece should be at. So name them "column" and "row".
    Then you'd have an event "Start of frame" doing this:
    > Set "column" of piece = x("piece") / gridsize
    > Set "row" of piece = y("piece) / gridsize
    // gridsize would be the size of your grid.
    Another event "Start of frame" would scatter the pieces around:
    > Set x position of piece = random(framewidth - piece_width)
    > Set y position of piece = random(frameheight - piece_height)

    Now if the user releases the mousebutton (be creative on this one), you would check if the piece is at the right position with conditions like these:
    + x("piece") / gridsize = column("piece")
    + y("piece") / gridsize = row("piece")
    and as action you snap it where it should be:
    > set x position of piece = column("piece") * gridsize
    > set y position of piece = row("piece") * gridsize
    and maybe somehow mark that the piece is done, e.g.
    > piece > animation > paste into background
    > piece > destroy
    (this would remove the piece and only leave unsolved pieces on the frame)

    Hope this helps.

    EDIT: A hint for beginners seeking help - you get far more responses if the title of your post resembles your problem. E.g. "How to snap to a grid?" instead of "I have a question" or "Programming a jigsaw puzzle" instead of "Help!".

  3. #3
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A complete Noob in distress

    Excellent post by Random - I think that about covers it. But why I'm really posting is that I'm very interested in the idea of MMF2 as part of a university-level course - is this what it's taught in, or is it your own choice of environment?

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A complete Noob in distress

    For completeness, here are the likely pitfalls of the approach that I have outlined earlier:

    * make sure the hotspot of your pieces is in the upper left corner, where it should snap to the grid
    * testing if the user released the mouse button can be a bit tricky, especially if you want to know which piece he was dragging. You should use another alterable value, which you set to a different value once the mouse drags it, and reset once it is released. Just before resetting, do the snap-in-place code, so you can use that value to see which one was dragged
    * it can happen that the user drags more than one piece at a time. You could use the "select object extension" to always get the piece that is topmost.

    EDIT: Oh and.. as you are a complete beginner, it might be a good idea to do some of the interface tutorials or beginner tutorials, so you get an idea how everything works before you dive into it. Here's a link:
    http://www.clickteam.com/eng/learning_resources.php

  5. #5
    No Products Registered

    Join Date
    Dec 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A complete Noob in distress

    Thanks for the help dude i cant wait to give it a shot, just a note, i dont need the pic to scramble itself, i am planning on having the grid in the page and then maybe 10-15 picture squares at the side.

    Once again thanks for the help man i shall give it a shot

  6. #6
    No Products Registered

    Join Date
    Dec 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A complete Noob in distress

    Quote Originally Posted by DavidN
    Excellent post by Random - I think that about covers it. But why I'm really posting is that I'm very interested in the idea of MMF2 as part of a university-level course - is this what it's taught in, or is it your own choice of environment?
    Yeah my course is mostly programming in C#, but we have a games design module and for the assessment we were asked to make a 2D educational game in a group, the MMF2 project is there so that we get an understanding of what its like to design and build a game for ourselves

Similar Threads

  1. Complete PDF Object
    By Kracker in forum Paid Design & Development Requests
    Replies: 4
    Last Post: 15th October 2015, 06:13 PM
  2. Hey everyone my first complete game
    By MightyMark in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 22nd March 2012, 12:38 AM
  3. Help me to complete my project
    By Evilesses in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 17th April 2011, 02:51 PM
  4. Complete Overlap
    By Jaffob in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st August 2008, 10:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •