A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: Please Halp A Young Programer In Need

Hybrid View

  1. #1
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272

    Please Halp A Young Programer In Need

    i wrote a long 14 MB txt script....however since its a TXT file ill have to copy it back to 3DFA

    but i have not much of a RAM on my pc...so pleas...IF YOU HAVE MORE THEN 512 RAM LET ME KNOW

    all im asking is a simple 5 minuts action ,just copy the text from the file ill give you and past it onto a script file and send me back the .movie file

    PLZ HELP !!!
    ok....what ?

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I replied in the other thread send it to me
    bret@bretlanius.com and I'll do it. Not sure if 14mb will email though can you put it on a server to download?

  3. #3
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    here , i realy hope you will be able to do this , once the script is there i can move it the the flash game

    dont be suprised from its size , it have to do something important

    (this is my games DEMO script ,the full game script will be ever larger)
    ok....what ?

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Sorry dude ain't gonna happen. File is just too big....

    Looking at your code it seems to me that you are doing it the hard way anyway and even if you could get it to load it would be so slow in running.

    1)Why not use an Array of dots? that way you could loop trough them instead of having to set them one at a time as you are doing.

    2)I'm guessing the dots represent a map of some kind. I'd suggest storing the the map in an array

    I'm sure there is a way to reduce this code to just a handfull of lines. Hard to say exacly without seeing the rest of the movie though.

    Check out this Thread about how to do it. Includes an example
    http://www.flashkit.com/board/showth...hreadid=425609
    Last edited by blanius; 07-14-2004 at 09:22 AM.

  5. #5
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    NOTE THE CODE IN THAT EXAMPLE IS FOR EARLIER VERSION OF 3DFA.
    I reworked it for you if you want a copy that works in v4
    Attached Files Attached Files

  6. #6
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    well , you were almost right about the dots , they are the board of a chess like game ,but i made it more advaced ,it will have all kind of stuff aplied to it ,but as for the slow to run thing you were a bit wrong ,not only that i dont think it will work slow ,i even dont give a damn if it will because that the whole game will work directly from you PC and not be on the web ,so i dont realy care how heavy it will get ,if a game like all this 3d crazy games work ,im sure that my flash game will do just fine

    the thing about my game that i need all of this IF checks to check my character's movement value (according to the number it will be able to move) so i need all of this checks...if you think you can offer me some other way be my guest

    as for the arreys thing ,i found no good example of using one or about how to use it ,if you can teach me the basic of using an arreys and what is their job maybe i will try this out

    i gave the the small beta version of the main idea ,this thing does not use a changing values so you can go only 1 plat at a time
    Last edited by cyber reaper; 07-14-2004 at 11:58 AM.
    ok....what ?

  7. #7
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    beta demo
    ok....what ?

  8. #8
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    An Array is basicly just a collection of things. The things can be just about anything, it can be movies, strings, numbers whatever. Where it is helpful is like in you game. Lets say we make your game board as an array

    board=new Array()
    board_background=element("animation")
    then we fill it with a clone of your animation in a loop

    for (x=0;x<9;x++){
    board[x]=board_background.clone()
    }

    we now have 9 spaces that we can refer to by number: board[0], board[1] etc and you can loop through them in a for loop as above.

    Now to get more specific I'd make your particular board just like in the example above for the title like game. You can assing variables to each array element like enabled just assign board[x].enabled=true/false
    board[x].safe=true/false

    whatever you need to keep track

    To really blow your mind I'd use a multidimensional array here, but you had better wrap your head around basic arrays first.

    The example in my last message really is worth looking over for your purpose as it uses the very technique I'm suggesting.

  9. #9
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    now that i think about it...it might be pretty helpful , insted of having 100 dots ill just have one wich will be cloned 99 times...but...i have to check with you something first ,if ill use your array and clones way ill have to know something :

    1) my game is having an actions wich are sometimes applied to the dots...(traps and other effects) if ill use a clone , will i be able to make them work saperatly ? (some traps and affects will cause the dot to be not accessible...so can it be done with an array ?)

    2)how do i make the dote become not accessible if im using an array?
    (like i say the dots will have traps on them wich will make them be not accessible , i hade it all worked up in my head of how to make it work with my way but the arrays thing i have no idea what so ever of how to make this... )

    hope it is not to much truble...

    if you do not understand what im talking about tell me (im not a native speaker so it can happen )

    also i have in mind an idea wich im not sure about it yet...if we (me and my friend) will have to many programing problems will you be interested in working with us on our first game production...
    we do this for free and for our own fun...

    if its sounds good to you tell me and ill fill you up with the details

    one last thing...

    if you are interested just know this - we are a two mens company ,each one of us have its own lable...me (cyber reaper.Inc) and one of my friends (2 Much Free Time) , each one of us have its own speciality , im the artist and the main animator , and my friend is taking care of all the sounds and the official website...i was hoping you will become our main programer while i will assist you if i can , all the parts will be warped up on my pc (my causen will soon get a pc with 2G RAM so export will become a minor problem )
    like i sayed im not sure about this yet but i will still be happy to hear what you think
    ok....what ?

  10. #10
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I'm afraid I wouldn't be able to take on a direct role in your project I will help you where I can with suggestions and examples.

    As to handling of CLones, since you can assign new propertys to ANY object including clones you should be able to do it the same way you were going to do it with seperate objects. The biggest advantage is you can access ALL the dots or group of dots quickly in a loop with very little code.

  11. #11
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    well...i did take a look at "title.movie" that you send me , first of all i did not understand half of it ,some of this lines are just way beyond my understand....second of all i did try to make somthing like is but all i got was a big headic and not an actoal resolt...i know you sayed you wont be able to take a main part of the production but can you please do me a favore and write for me that small script ?

    all i need is a script that will clone "element("dot")" to a 10x10 board , and thats pretty much it ,im not sure how i will work with it next but i think ill be able to do something with the script

    if you could just spend a few minut of your time helping me you will do me a huge favore...
    ok....what ?

  12. #12
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    OK

    Here you go. What I did was make a DOT as a 100x100 movie clip so I could show you how to animate the individual dots.

    I've commented the code as much as I could
    Attached Files Attached Files

  13. #13
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    ok , all this dot do is blink...but i think thanks to your script i got the general idea ,

    but i dont realy see how it will make my script smaller , i will still have to make all the dot[1].enabled = true... so its actoaly will be the same...and i saw you never used all the 0011101110 things on that movie...so what are they for ? (unless they are have nothing usful to my kind of game so i wont care a lot what they do...
    ok....what ?

  14. #14
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    well the 100101 array was a little different, As for enabling your dots.

    Since they are numbered you can enable all of them in a loop

    for (idx=0;idx<10;idx++){
    dots[idx].enabled=true
    }

    I can think of a couple of ways to do the sort of thing you are thinking of but it kinda depends on what determines if a dot is enabled or not. How do you determine to enable a dot?

  15. #15
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    well , like i say i made it advanced ,first of all each character will have an edit box wich is called "slugMOVE" what i want to happen is that once i click on the character the script will first check the card used (move,attack...)and if it is move it will check the value of "slugMOVE" , then according to the number the character will be able to move in sright lines only (left ,right ,up ,down)

    so in short the character will move according to the value of "slugMOVE" in sright lines (for ex: the value is 3 so the charcter will be able to move 3 dots in each direction)

    well , im sure there is a way of doing this (i saw many chess games on the web that work that way...)

    to bad i never study java script before...i figure you did if you know all this things , cause there is no way you learned that all from 3DFA help page...
    ok....what ?

  16. #16
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    yikes ok this is a large project you are talking about here. Give some more thought to how you want to represent you playing field. Using 10x10 you can do things that would not be practicle on larger field.

    Like checking if there is a square up,down,left,right,left of the current square. I do it in the tile example for a much larger map.

    with only 10 dots in two rows of 5 you always know if current dot is <5 you cannot go up and if =>5 cannot go down. 1,5 no left and 4,10 no right so pretty easy there. So assing something to the slug instead of the dots that indicates which way he can go based on the card drawn. Then check if there is a square there and if so animate it and allow the move.

  17. #17
    Senior Member cyber reaper's Avatar
    Join Date
    Apr 2004
    Location
    israel
    Posts
    272
    well , this is pretty ,much what i did ,first i made th script check the card drawn (edit box "card")then after the card have been used on the character i make another edit box called "use" , this edit box will show wich card is under use (so i can make later another edit box with commets) so next i made the script check the "use" card and if its = 1 (move) then it will check the value of "slugMOVE" and after that i make it check the location of the character ,well i guess i might be able to make meny small scripts to the dot , but i realy cant see how , maybe ill better make them 100 dots and will let the each one have its own small script...
    ok....what ?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center