Author Topic: Two Player Script  (Read 9495 times)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Two Player Script
« on: 2008-01-05, 12:21:27 PM »
Can Someone send me a two player script? I Don't have any knowledge in scripting so please send it as easy as it can get?

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Two Player Script
« Reply #1 on: 2008-01-05, 06:43:18 PM »
You may wanna try SGDK2, which has inbuilt support for up to 4 players.
If you wanna stick with the original SGDK, then I can say there was definantly a script for two people somewhere, try the little search button up there. :p

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2736
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Two Player Script
« Reply #2 on: 2008-01-06, 07:24:06 AM »
Go to http://gamedevprj.sourceforge.net/files/ and look at GD2Player.zip.

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Two Player Script
« Reply #3 on: 2008-01-11, 07:47:38 PM »
Yeah...... The SGDK2.... Um... Doesn't fit for me as well as the  SGDK 1.4.6 because of terms like:
"If" and "Is input pressed" and all of the trouble for making Inertia and Gravity. I'm retro like that.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2736
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Two Player Script
« Reply #4 on: 2008-01-12, 05:05:54 PM »
You don't have to deal with any of that if you just use a sprite from a template.  The rules are already set up for you.

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Two Player Script
« Reply #5 on: 2008-01-12, 09:06:09 PM »
Yeah, I know all of the motions on a simple motion engine template... I learned how to tweek inventory items and fuctions on 1.4.6 to get special moves like double jumps on 1.4.6 without any script, so is there a way to tweek the template in SGDK2 to get such marvels? ( attacks and jumping animations )

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Two Player Script
« Reply #6 on: 2008-01-12, 09:18:38 PM »
yes running and jumping animations are quite possible in SGDK2.
http://gamedev.comdel.net/index.php?topic=1139.msg6098#new
you can us that if u want, but it's not finished.
there's also more here. http://sgdk2.enigmadream.com/index.php

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2736
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Two Player Script
« Reply #7 on: 2008-01-13, 09:45:09 AM »
I think it would actually be easier in SGDK2 because you have much better control over how the sprite behaves (and you can embed it into the sprite rules instead of having special functions to support it on every map).  To achieve these things in version 2, you simply insert a rule into the sprite rules that checks what the sprite is doing and switches it to another state (or whatever customization you want).  I don't know how you could manage to make a sprite double-jump in version 1 without scripting.  If you're clever enough to figure that out, you should certainly be clever enough to alter the SGDK2 sprite templates (or create your own).  (How did you implement a double-jump without scripting?  Check for initial keypress of up arrow and switch to a sprite that follows a vector to alter the velocity?  How did you change the velocity?)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Two Player Script
« Reply #8 on: 2008-01-13, 05:15:07 PM »
Well, I first make four different functions- addinv, subinv, addstamina, and normal state. I then make two sprites- one player sprite- and a double jump sprite (both left/right) and the double jump sprite has a gravity of -10 with "up requires solid checked" the functions are-addinv but the item isn't removed after use. it gives uses an inv item called Stamina+1 with 1 max and 1 int(NOT GLOBAL). I also have a function called sub inv that is simular but subtracts Stamina+1. When the limit is reached of subinv, the function normal state is activated- which switches the player back to the primary state.(New inst, Del old Spr., and Sm loc. as old) Add stamina is global- not inital touch- and uses Stamina +1 but doesn't remove it. It gives you 1 stamina- and if the limit is hit it activates sub inv and resets to its opposite limit. After all of that is done, make a new inv item called doublejump(max2int2) and a new function called jump. It is global, but uses your jump key initial press to add the item called doublejump. Make a function that switches you to your doublejumpsprite but isn't global. And finally make a function that uses 2 doublejump items (remove after use) and your jump key initial press and is global that activates a series of functions... doublejump and then addinv. Then you're done!!!! It looks very long but really isnt. If you want a template for this  I can send it to you as a GDP.


                   It looks like I have outsmarted the creator of SGDK!!! HA HA HA!!!!!!!

                                ( I have an IQ of 210: no lie!)

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Two Player Script
« Reply #9 on: 2008-01-13, 08:00:48 PM »
then try SGDK2... it is actually loads better, just a tad harder to get used to.

Quote
It looks like I have outsmarted the creator of SGDK!!! HA HA HA!!!!!!!
ya, that is actually considered retarded, please don't do that again.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Two Player Script
« Reply #10 on: 2008-01-14, 03:27:37 AM »
that is without script? kudos...
(i don't catch the whole thing)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Two Player Script
« Reply #11 on: 2008-01-14, 07:07:37 AM »
It's really just a mix of the attackIDK and the double keystoke IDK :ugly:


( Oh and I'm not smarter than the creator; if I was I wouldn't be here... :nerd:)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2736
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Two Player Script
« Reply #12 on: 2008-01-14, 07:38:17 AM »
Wow, what a clever scheme.

                   It looks like I have outsmarted the creator of SGDK!!! HA HA HA!!!!!!!
                                ( I have an IQ of 210: no lie!)
Indeed... that's what's so cool about working on these kits: when people use them in ways that I never could have imagined!  And just think... if you can come up with a scheme this clever in version 1 where I couldn't imagine how you could make a double-jump, what could you do in SGDK2, where double-jump would be pretty straightforward, but what amazing things could you do with a crazy scheme there!?  :surprise:

It'd be awesome to have you around working on games with us long into the future and see what else you come up with.  I bet many could benefit from the templates you would create and share.  I hope you stick around!  We like smart people here... or at least I do :).  Putting up with an occasional smarta** comment is a small price to pay for having a genious around ;).

Honestly, I think someone who can think as broadly/creatively as yourself (as demonstrated by this scheme and probably that test result) could contribute some amazing things to SGDK2, and help make it popular by helping other people see what power is hiding in there (that maybe even I can't see).
« Last Edit: 2008-01-14, 07:42:12 AM by bluemonkmn »

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Two Player Script
« Reply #13 on: 2008-01-14, 04:30:15 PM »
Thanks- So do you still want me to send you a gdp for double jumping? Oh and another thing, that
thing you said: double jumping is straight forward in version 2, how do you do that? Maybe I can tweek that too.  :whistle:

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Two Player Script
« Reply #14 on: 2008-01-14, 04:44:12 PM »
[Putting up with an occasional smarta** comment is a small price to pay for having a genious around ;).
Oh... I'll try to limit the smarta** coments and keep them to myself. honesly, I know absolutely NOTHING on programming. Every script in my games were generated by the wizard!
                  'HostObj_sub (That probably means hosting a party with a sub sandwitch)
I never learned