Page 1 of 1

LEARNING TO PROGRAM

PostPosted: April 21st, 2015, 11:14 am
by asdfmoviecaleb
Hey guys, i have some news.
I'm learning to program. And when I learn to program games, I think I might post my version of the level designer for SM63. But I'm going to need your help. It would be helpful for you guys to post helpful flash programing tutorial sites, and also tell me some tips of your own. Also, I don't know what program I should use to program a new version of the level designer, so that would be helpful if you posted that too. :3

Re: LEARNING TO PROGRAM

PostPosted: May 5th, 2015, 4:04 pm
by Raz
Don't expect replies to every single post. I wouldn't say the forum is lacking in programmers, but I think there's other options that you can easily google to find your answer.
If you really want to make a new version of the SM63 level designer though, it wont be easy and I'm sure you'd need to learn for a while to make something properly.

I have no idea how to answer your questions, I'd say try recoding it in java because that's what Last Legacy is being recoded in, but I barely even know.

Re: LEARNING TO PROGRAM

PostPosted: May 6th, 2015, 8:49 am
by asdfmoviecaleb
Raz wrote:Don't expect replies to every single post. I wouldn't say the forum is lacking in programmers, but I think there's other options that you can easily google to find your answer.
If you really want to make a new version of the SM63 level designer though, it wont be easy and I'm sure you'd need to learn for a while to make something properly.

I have no idea how to answer your questions, I'd say try recoding it in java because that's what Last Legacy is being recoded in, but I barely even know.

What is this feeling i'm getting, it's like i'm feeling bad about my previous actions, and I want to say sorry?
k thx 4 advice will stop being atenchin seeking skrub
and by the way i'm already learning to program in flash i just need to know what type of flash

Re: LEARNING TO PROGRAM

PostPosted: June 7th, 2015, 7:33 pm
by Kimonio
Late response with a bigass bump, but I recommend stepping your toes in Flash and Actionscript before ever taking a cannonball into the code itself. I've decompiled it, for education's sake, and trust me when I say it is big as hell. Also difficult to translate, since it was programmed at an earlier age in Rob's lifetime, meaning it is unorganized. Last Legacy, on the other hand, uses a more fluid class approach where the game calls on each class file in the obfuscated compiled edition. This wasn't the case with Super Mairo 63. At all.

My recommendation is that if you have Flash, start with the basics. Learn to work with layers, learn to work with tweens and frames. Learn symbols. Learn everything at the roots. From then on, play with things. Practice. Study the code. Code your own scripts and run them. Play with open-source projects, learn how they work.

I'm going to show you part of the code used in SM63's player engine. Don't take it as a sign of defeat if you can't understand it. Rome wasn't built in a day, and Jobs didn't create the Macintosh flawlessly in his parent's garage. It takes practice and time, even for the best.

Spoiler: show
Code: Select all
 {
         StunTime--;
         if(Water == true)
         {
            StunTime = StunTime - 3;
         }
         else
         {
            _root.Controll = false;
         }
      }
      if(blink > 0)
      {
         blink--;
         if(blink / 3 == Math.round(blink / 3))
         {
            charClip.frame._alpha = 20;
         }
         else
         {
            charClip.frame._alpha = 70;
         }
      }
      else
      {
         charClip.frame._alpha = 100;
      }
      if(yspeed > -3)
      {
         lockon = true;
      }
      else
      {
         lockon = false;
      }
      if(_root.CanSwitchFludd == true)
      {
         if(!_root.KeySHIFT())
         {
            canChangeFludd = true;
         }
         if(_root.KeySHIFT() && canChangeFludd == true)
         {
            changeFludd = true;
            canChangeFludd = false;
         }
         else
         {
            changeFludd = false;
         }
         if(attack == false)
         {
            _root.ChangeFludd();
         }
      }
      if(_root.newstar == true && !(attackFrame == "Star" && attack == true) && _root.Playinglevel == 0)
      {
         attack = true;
         attackFrame = "ExitPainting";
      }
      if(attackFrame == "Star")
      {
         _root.CameraZoom = 100;
         if(yspeed > 7)
         {
            yspeed = yspeed * 0.95;
         }
      }
      if(attackFrame == "frontflip" && attack == true && !_root.Fluddpow == "")
      {
         attack = false;
      }
      if(_root.LastFrameJumpPress == false && _root.KeyUP())
      {
         _root.JumpPress = 7;
      }
      else
      {
         _root.JumpPress = _root.JumpPress - 1;
      }
      _root.LastFrameJumpPress = _root.KeyUP();
      if(air == true)
      {
         if(Water == true)
         {
            if(_root.Course.Water.hitTest(_X * _root.coursescale / 100 + _root.Course._x,(_Y - tall / 2) * _root.coursescale / 100 + _root.Course._y,true))
            {
               if(attackFrame == "Star")
               {
                  yspeed = yspeed + _root.gravity / 3;
               }
               else if(!(_root.Metal === true))
               {
                  yspeed = yspeed + _root.gravity / 3;
               }
               else
               {
                  yspeed = yspeed + _root.gravity / 2;
               }
               
            }
            yspeed = _root.groundFriction(yspeed,0.05,1.01);
         }
         else
         {
            yspeed = yspeed + _root.gravity;
            if(_root.PowerTimer && _root.WingCap == true && yspeed > 3)
            {
               yspeed = yspeed - _root.gravity / 6;
               fallingyspeed = _root.groundFriction(yspeed,_root.gravity / 4.5,1.07);
            }
            else
            {
               fallingyspeed = _root.groundFriction(yspeed,_root.gravity / 5,1.05);
            }
            if(yspeed > 0)
            {
               if(attack == false && yspeed > 7)
               {
                  fallcount++;
                  if(_root.KeySPACE() && _root.Power > 0 && _root.WaterAmount > 0 && _root.Fluddpow == "H")
                  {
                     fallcount = 0;
                     hurtfallcount--;
                     hurtfallcount = Math.max(hurtfallcount,0);
                  }
                  if(!(fallingyspeed < 15) && air == true && yspeed > 15 && !(fallingsfx === true))
                  {
                     hurtfallcount++;
                     hurtfallcount = Math.min(hurtfallcount,7);
                     if(!(hurtfallcount < 5))
                     {
                        fallingsfx = true;
                        _root.Mariosound = new Sound(this);
                        _root.Mariosound.attachSound("Mario-Fall");
                        _root.Mariosound.start(0,1);
                        _root.Mariosound.setVolume(_root.MarioVolume);
                     }
                  }
               }
               else
               {
                  fallcount = Math.round(fallcount / 2);
               }
               yspeed = _root.groundFriction(yspeed,_root.gravity / 5,1.05);
            }
            else
            {
               fallcount = 0;
               hurtfallcount--;
               hurtfallcount = Math.max(hurtfallcount,0);
            }
         }
         yspeed = _root.groundFriction(yspeed,0,1.001);
         xspeed = _root.groundFriction(xspeed,0,1.001);
         if(attack == false)
         {
            if(Water == false)
            {
               if(yspeed > 2)
               {
                  frame = 4;
               }
               else
               {
                  frame = 3;
               }
            }
            if(!_root.KeyDOWN() && !_root.KeyZ() || air == false)
            {
               divewaitcount = divewaitcount - 3;
            }
            divewaitcount = divewaitcount - 1;
            if(_root.KeyZ() && (Water == false || _root.Metal == true) && !(divewaitcount > 0) && !_root.Course.Platforms.hitTest(_X * _root.coursescale / 100 + _root.Course._x,(_Y + 5) * _root.coursescale / 100 + _root.Course._y,true) && !_root.Course.BPlatforms.hitTest(_X * _root.coursescale / 100 + _root.Course._x,(_Y + 5) * _root.coursescale / 100 + _root.Course._y,true))
            {
               yspeed = 0;
               xspeed = 0;
               attack = true;
               attackFrame = "Ground";
            }
            if(_root.KeyDOWN() && (Water == false || _root.Metal == true) && !(divewaitcount > 0))
            {
               attack = true;
               if(_xscale < 0)
               {
                  xspeed = xspeed - (xspeed - _root.Divespeed) / 5;
               }
               else
               {
                  xspeed = xspeed - (xspeed + _root.Divespeed) / 5;
               }
               if(_root.WingCap == true)
               {
                  attackFrame = "Flying";
                  yspeed = yspeed * 0.5;
               }
               else
               {
                  attackFrame = "Dive";
                  yspeed = yspeed + 3;
                  if(_root.CurrentPlayer == "Mario")
                  {
                     soundj = "Mario-Dive";
                  }
                  if(_root.CurrentPlayer == "Luigi")
                  {
                     if(random(2) == 1)
                     {
                        soundj = "Luigi - Yah!";
                     }
                     else
                     {
                        soundj = "Luigi - Yuh!";
                     }
                  }
                  _root.Mariosound = new Sound(this);
                  _root.Mariosound.attachSound(soundj);
                  _root.Mariosound.start(0,1);
                  _root.Mariosound.setVolume(_root.MarioVolume);
               }
            }
            if(_root.KeyRIGHT() && _root.Controll == true)
            {
               xspeed = xspeed - Math.min((xspeed - _root.airwalkspeed) / _root.airmaxWalkspeed / 3,0);
               _xscale = -100;
               if(_root.KeySPACE() && _root.Power > 0 && _root.WaterAmount > 0 && _root.Fluddpow == "H")
               {
                  _rotation = _rotation + 5;
                  xspeed = xspeed - Math.min((xspeed - _root.airwalkspeed) / _root.airmaxWalkspeed,0);
               }
            }
            if(_root.KeyLEFT() && _root.Controll == true)
            {
               xspeed = xspeed - Math.max((xspeed + _root.airwalkspeed) / _root.airmaxWalkspeed / 3,0);
               _xscale = 100;
               if(_root.KeySPACE() && _root.Power > 0 && _root.WaterAmount > 0 && _root.Fluddpow == "H")
               {
                  _rotation = _rotation - 5;
                  xspeed = xspeed - Math.max((xspeed + _root.airwalkspeed) / _root.airmaxWalkspeed,0);
               }
            }
            if(_root.KeyTapRIGHT() && !_root.KeyRIGHT() && _root.Controll == true)
            {
               xspeed = xspeed - Math.min((xspeed - _root.airtapspeed) / _root.airmaxtapWalkspeed / 3,0);
               _xscale = -100;
               if(_root.KeySPACE() && _root.Power > 0 && _root.WaterAmount > 0 && _root.Fluddpow == "H")
               {
                  _rotation = _rotation + 5;
                  xspeed = xspeed - Math.min((xspeed - _root.airtapspeed) / _root.airmaxtapWalkspeed,0);
               }
            }
            if(_root.KeyTapLEFT() && !_root.KeyLEFT() && _root.Controll == true)
            {
               xspeed = xspeed - Math.max((xspeed + _root.airtapspeed) / _root.airmaxtapWalkspeed / 3,0);
               _xscale = 100;
               if(_root.KeySPACE() && _root.Power > 0 && _root.WaterAmount > 0 && _root.Fluddpow == "H")
               {
                  _rotation = _rotation - 5;
                  xspeed = xspeed - Math.max((xspeed + _root.airtapspeed) / _root.airmaxtapWalkspeed,0);
               }
            }
         }



Let's just say you shouldn't expect to jump right into programming without first making your Hello World's. Also, there are no good tutorials. That does not mean they are all bad, it just means no one is better than the other. You have to find what works for you.

Hell, I'm trying to learn VBS right now, along with Java and other programming languages, and I'm still not past the beginner's stages. The most I can do is HTML and CSS, but that doesn't stop me.