Author Topic: (srry if im anoying) ok these are what i want to do except i cant figure it out  (Read 7181 times)

NightFang

  • Regular
  • **
  • Posts: 23
    • View Profile
    • Email
ok i want to do these things

1.i want to make a sprite that can move side to side and animate corectly and not go crazy (yes i figured out how to move left right except i just dont think its right or nabye it is and i forgot what im using)

2. Next i want to fix the hills i made there just not exactly working cause when i use them my sprite is about {  } that much away fromt the actual hill

3. Third i want to be able to jump right instead of it looking like its using a jetpack do to it being able to sit there and hold up down to just go up and no stop

4. Then i want to be able to program the enemies in the game and the health code ill get from the older post

5. I want to get a status bar at the top to keep track of health, a spirit energy, magic (thats split in 4), exp. (doesnt have to be absolute cause i dont even know how i could program that with the lvls and such), and a sheild (but very weak to protect yourself and it regenerates)

6. I want to be able to make a sword using sprite and i cant figure that out ive read about colisions and alls i can find on collisions in the thing is mask collision and i cant figure that out

7. this one is a sorta root from 5 i want to switch between magic and sword fighting by just holding down shift or something to switch to magic and then when you let go it returns to sword and i made a health/mana/spirit/sheild/exp. on paper and i can import it but i was wondering if it is actually posible to even though its in one pic its still able to do what i want

o yeah if it helps at all im using SGDK version 2 or from were ive read somewere Alpha 4. Srry for the list but ive tried and tried and i cant seem to find how to fix those things otherwise im pretty much cool besides a couple more thing that i cant name right now

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
o yeah if it helps at all im using SGDK version 2 or from were ive read somewere Alpha 4. Srry for the list but ive tried and tried and i cant seem to find how to fix those things otherwise im pretty much cool besides a couple more thing that i cant name right now

In that case you've been posting in the wrong area.  You were posting in the forums for version 1.  SGDK 2 is not done yet, which would probably be most of the reason you're having trouble figuring out how to use it.  The documentation is not done yet.  You're welcome to try working it out without documentation, but it might be tough, and you might run into a lot of problems because SGDK2 is still in alpha (not completely tested).  I can try to give a short answer to your questions, but I'm not sure how helpful it will be without documentation or examples to back it up yet.  There is one example project for SGDK2 in Library\Projects\SHFL.sgdk2 you could try to load to see if it has any helpful details.
1. Compare your sprite to the sprites defined in the SHFL to see if left/right sprites are being done correctly.  Check the "Solid Width" and "Solid Height" of your sprite states.  They should probably match the width and height of the graphics you're using for your sprite.  These numbers may affect how your sprite is positioned when turning around.
2. Check the "Solid Width" and "Solid Height" of your sprite states.  That would also affect how far away the sprite is from solid ground.
3. Look at the player sprite in the SHFL project.  You'll notice that the up arrow has some special rules to make the sprite behave like it's jumping.
4. If you're getting code from GameDev 1.x posts, it will not work with SGDK2, which is a completely different program, rewritten from the ground up in a new language with new technologies, and completely incompatible with version 1.  But SGDK2 is powerful enough that you might not have to write any code because the rule system in SGDK2 is more flexible.
5. Use DrawCounterAsTile to draw inventory on the screen in SGDK2.  Sorry, the documentation for that hasn't been released yet, (it's done, but I haven't posted it yet).
6. To detect a collision between two sprites, use TestCollisionMask and pass in a sprite category containing all the sprites you want to check to see if they're hitting the current sprite.  No examples of this yet, and the documentation for this is not released yet sorry.  If you can find durnurd's post with the SGDK2 project he was working on, though, it has some collision testing examples, I think.
7. It's possible to detect when the player presses a key and when it's released and switch to another state and back on these events.  Use IsInputPressed to determine if a button is pressed, and use SwitchToState to switch the sprite to another state.  You can also if the "==" function to check to see if a sprite is already in the right state.

So how did you stumble across SGDK2?

NightFang

  • Regular
  • **
  • Posts: 23
    • View Profile
    • Email
lol well that would explain a lot so i guess ill just wait till ya realese the actual version before i start trying all that stuff however i think ill still practice so i dont have to take longer than it should...well i found SGDK 2 when i was using google to find a game engine and i ended up finding that except it was all script and i had no clue how to use it or at least i think it was script but i didnt really like it i wanted an easyer program but i got this which this isnt to easy nor to hard i like it but anyway i typed in a 2D scrolling game engine and i ended up with something and i figured i should put 2D scrolling game kit and after about and hour of searching i found this i told my freinds and now were kinda making a game well im making the game theyre helping with the storyline and the graphics........and thats my story and ive left the details (i didnt get to detailed though) in the projects however it is in the SGDK 1 projects but ill check up on that stuff after doing what ive done so far its not really confusing anymore lol what you guys said was pretty much right once you learn a bit of it its easy to learn the rest and i actually did notice that it did have the If then Statements except then is in the form of Do which is no prob so once i noticed that it was kinda my "now its easy"

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Hopefully it'll be even easier with documentation :)

NightFang

  • Regular
  • **
  • Posts: 23
    • View Profile
    • Email
it should be ill let you know if i run in to probs oh and by the way would it be posible to make a enemy moving and that gets killed i know i can add a test collision and nabye put after it to deactivate but how would i make it move towards me is prefered

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
I think you're going to need to start using complete sentences with punctuation and proper grammar.  I can't understand what you're saying.

NightFang

  • Regular
  • **
  • Posts: 23
    • View Profile
    • Email
it should be ill let you know if i run in to probs oh and by the way would it be posible to make a enemy moving and that gets killed i know i can add a test collision and nabye put after it to deactivate but how would i make it move towards me is prefered
Ok i can revise, I just try to get everything out (not to mention im not so great in english but im an A student in everything esle so).....Anyway I'll edit the quote, if you need the other one done to I can do that too....
"It should be I'll let you know if I run in to problems, Oh and by the way would it be possible to make a enemy moving and get killed, I know i can add a test collision and nabye put after it to deactivate but... how would i make it move towards me?"

(by the way thanks for making me do that I have to learn to use punctuation, grammer, etc. better) So there you go.. Let me know if there is a problem with the one I sent before.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
There are a number of rule functions whose name begins with "Push" which are designed to push sprites in various directions for various reasons.  A few of them are designed to push a sprite toward another sprite, but (I can't remember for sure) that may just be in the current version I'm working on, which hasn't been released yet.  I will try to do another alpha release soon; then you should have what you need.  I'm not at home right now so I can't give a clearer answer, but just know that an answer is on the way.  Keep your eyes out for the next alpha release.  Hopefully early this week.  Meanwhile you can check to see if any of the existing "Push" functions would do what you want.  Or if you're really adventurous, you could try editing the source code of SpriteBase or PlanBase in your game project to create your own push function that does what you want.

NightFang

  • Regular
  • **
  • Posts: 23
    • View Profile
    • Email
well I'm open to trying new things but i dont know about trying that just yet I still almost dont understand fully of the SGDK2 so It'd probably be a good idea to learn that first.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
There, now in alpha 5 (if you make sure your project has the most current source code -- use the Reset Source Code command if not) you can define a rule on a sprite definition whose function is "PushTowardCategory" which will push the sprite toward the nearest sprite in the specified category (if you pass "-1" for Index). So if you have a sprite category with just the player in it, you can pass that category in and the sprite will move toward the player.

NightFang

  • Regular
  • **
  • Posts: 23
    • View Profile
    • Email
ok I'll try that out. Thanks!