Author Topic: The Chosen One  (Read 51158 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
The Chosen One
« Reply #60 on: December 06, 2005, 03:13:00 am »
c1-->
CODE
ec1[A]((Y/8)+T+1,S+1+(X/8->L
If Y=0:Then
If .1<>fPart(L:Y+8->Y
If T>0:T-1->T
prgmZDRAW
Return
End
If .1=fPart(L:Y-8->8
prgmZDRAW
Returnc2
ec2saves 4 bytes in prgmZUP. I'll try to figure out how to pack all this into one program asap. Actually that would make it even faster :)smile.gif

Offline necro

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1295
  • Rating: +17/-2
  • +3 vaporal mustache
    • View Profile
The Chosen One
« Reply #61 on: December 06, 2005, 03:22:00 am »
subrotines are slower than if:then:ends...so make sure to fix that
I'm like a woot burger with awesome fries


VB.Net, C#, C++, Java, Game Maker

CDI

  • Guest
The Chosen One
« Reply #62 on: December 06, 2005, 10:04:00 am »
they are? good to know

dragon__lance

  • Guest
The Chosen One
« Reply #63 on: December 06, 2005, 10:24:00 am »
QuoteBegin-Spellshaper+6 December 2005, 9:48-->
QUOTE (Spellshaper @ 6 December 2005, 9:48)
nice, though I packed it into 1 prgm :)smile.gif
didn

tenniskid493

  • Guest
The Chosen One
« Reply #64 on: December 06, 2005, 01:03:00 pm »
LOL..im at like 38 right now...im gonna have to cut those down.  They all start w/ Z though so they don't clutter up your program menu.

Offline necro

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1295
  • Rating: +17/-2
  • +3 vaporal mustache
    • View Profile
The Chosen One
« Reply #65 on: December 06, 2005, 04:40:00 pm »
it takes longer to find and run an external subrotine than an interenal block (if:then) in most cases...I am not sure, but I think the more programs the slower it gets (more to sort through to find your program in the vat index)
I'm like a woot burger with awesome fries


VB.Net, C#, C++, Java, Game Maker

tenniskid493

  • Guest
The Chosen One
« Reply #66 on: December 06, 2005, 04:42:00 pm »
That makes sense....that'll be my project for the next few days to redo that into one program...does anyone know if it be faster to come up with one equation to move the sprite, no matter what button you pushed, or 4 if:then statements depending upon which one you push?

dysfunction

  • Guest
The Chosen One
« Reply #67 on: December 06, 2005, 05:39:00 pm »
One is always faster, but if you have extremely complicated movement code (which I doubt you do for this sort of game) it can be a nightmare to code. If statements are certainly far more understandable. Also, to make it quicker to code and keep your code shorter while still in the dev process, I recommend keeping the subroutines, and only combining them into one program when you're finished.

Offline necro

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1295
  • Rating: +17/-2
  • +3 vaporal mustache
    • View Profile
The Chosen One
« Reply #68 on: December 06, 2005, 05:46:00 pm »
isn't i better just to use comments to devide your code and remove them at the end?  That's what I do...
I'm like a woot burger with awesome fries


VB.Net, C#, C++, Java, Game Maker

tenniskid493

  • Guest
The Chosen One
« Reply #69 on: December 07, 2005, 02:02:00 am »
@necro, thats what I was going to do, so it was still easy to understand yet is fast and small

@dysfunction, I'm right now facing a sort of issue w/ space (seeing as how the original goldensun had over like 150 weapons and the same amount of types of armor, not to mention the over 100 different items) so I need to cut out size and space wherever possible

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
The Chosen One
« Reply #70 on: December 07, 2005, 03:16:00 am »
hmm dont add all original weapons O_Oshocked2.gif just add like 5-10 weapons in the game and that should do, also flash gordon/resource and future xlib archived program running ability might help a lot. Also in the new xlib you can let all pic archived and you'll barely see any speed difference

dragon__lance

  • Guest
The Chosen One
« Reply #71 on: December 07, 2005, 10:00:00 am »
yep, i agree with xlibman, new xlib is far better....if only it was released... :)smile.gif
anyways, for movement, i have a main prgm, then if u press left, right,down, or up, it goes to the movement prgm. in the movement prgm, if i detects a wall, itll simply return to the main prgm. if not, itll move the sprite :)smile.gif sorry for not posting code, kinda lazy B)cool.gif

oh, and instead of using 4 if-then statements, use thisc1-->
CODE
ec1X+(k=26)-(k=24)->X
Y+(k=34)-(k=25)->Yc2
ec2
this uses boolean logic :)smile.gif, but only increments the pixel by one, if u need to move it by 8 pixels, then just put 8 before watevers in the parentathese

tenniskid493

  • Guest
The Chosen One
« Reply #72 on: December 07, 2005, 01:07:00 pm »
Wow..the pic archive thing would be the best because that's where a lot of my lack of speed is coming.  I'm using flash gordon already but I'm running into the fact that it is too slow to use on some of my programs that I use repeatedly so I have to leave them unarchived, which is eating away at my space.  I'm going to have to rework them so that I only have what is essential unarchived.  I'm planning on including about 20 different weapons (1-15 weapons bought at the weapons shop and 5 "enchanted" weapons that you find after beating a large temple) and about 20 different types of armor (armor, helmets, gloves etc.) and prob 2-30 diff. types of items (herbs, water of life, nuts, bread, apples etc.)

@dragon_lance, Its ok that you didn't post code.  I got what you meant and now I'm gonna try to implement it..and thanx for those equations, I'm gonna use those.

EDIT:  Sorry for that.  All better now.

dysfunction

  • Guest
The Chosen One
« Reply #73 on: December 07, 2005, 02:48:00 pm »
tenniskid: Using subroutines actually results (usually) in smaller code, though slower code. That's only if these are subroutines that occur more than once or twice in the code however, otherwise the space saved is negligible.

Offline Spellshaper

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1690
  • Rating: +0/-0
  • This is me. Or maybe not.
    • View Profile
The Chosen One
« Reply #74 on: December 08, 2005, 04:17:00 am »
QuoteBegin-tenniskid493+8 December 2005, 1:07-->
QUOTE (tenniskid493 @ 8 December 2005, 1:07)
@Spellshaper, Its ok that you didn't post code.  I got what you meant and now I'm gonna try to implement it..and thanx for those equations, I'm gonna use those.  

 eh... that was dragon__lance, not me %)rolleyes2.gif