Scrolling Game Development Kit Forum

SGDK Version 1 => Projects => Topic started by: SmartBoy16 on 2010-05-25, 03:11:24 AM

Title: The RANAT Foundation: Before the Truth
Post by: SmartBoy16 on 2010-05-25, 03:11:24 AM
Yes, I am back! I've been pretty much caught up with a lot of homework, so I haven't been able to do too much, but I have finally decided to go ahead and restart on my game after a year-long hiatus.

I'm planning on doing a few changes to the way I will work on this.


I want to be able to finish this in at my own pace, so I won't set a release date...yet. Hopefully I can get it done before I graduate (for my portfolio).

I'll keep posting as I get stuff done!
Title: Re: The RANAT Foundation: Before the Truth
Post by: bluemonkmn on 2010-05-25, 04:46:11 AM
Are you still stuck back on version 1?
Title: Re: The RANAT Foundation: Before the Truth
Post by: SmartBoy16 on 2010-05-25, 05:30:59 AM
Yes, I decided I wanted to use SGDK1 because I know that better than SGDK2. I kinda feel bad that I have put this off for so long, so I want it to get done quickly. Maybe when I get a little more time, I'll port this game to SGDK2 or XBLA.
Title: Re: The RANAT Foundation: Before the Truth
Post by: SmartBoy16 on 2010-06-04, 10:07:38 PM
Ok guys, I am having a few outside issues to deal with before I can start working on this, so I will uploading my first scans by next Saturday for sure!
Title: Re: The RANAT Foundation: Before the Truth
Post by: SmartBoy16 on 2010-06-06, 08:50:11 PM
Alrighty, I am (officially) back with a few question!!! *insert fanfare here*

Ok, so, there is a certain way that I want to handle control here. I want it to be able to be played on a Gamepad and I am having a few issuses on how Buttons are detected.

Basically, I want the game to be able to determine whether a certain button is being pressed or not being pressed. (Similar to VC#'s KeyUp, KeyDown)

As I noticed that the basic functions can only tell when a key is just pressed once, I decided to use the dreaded helpful scripting to accomplish this. So far: i came up with this code:

Code: [Select]

Dim Btn1, Btn2, Btn3, Btn4
Dim DirU, DirD, DirL, DirR

Sub Player_OnBeforeMoveSprite()
ProjectObj.GamePlayer.PollJoystick 0
If ProjectObj.GamePlayer.JoyButton1 = True Then
Btn1 = True
ProjectObj.GamePlayer.InvQuantityOwned(0) = 2
Else
Btn1 = False
ProjectObj.GamePlayer.InvQuantityOwned(0) = 1
End If
End Sub

And so far, as many of you probably guessed, nothing showed up. Am I doing this right, or is there a better way of doing this?
Title: Re: The RANAT Foundation: Before the Truth
Post by: bluemonkmn on 2010-06-06, 08:56:39 PM
Honestly, although you may see a benefit in using SGDK 1.x because you have already learned it, the drawback is that you're probably going to have a lot more trouble getting support for it these days than for SGDK2.  You might want to take that into consideration in choosing the version of SGDK that you're using too.

That said, I don't see any obvious problems with the code unless you forgot to make sure that player events are hooked up to the event handlers.  Did you run any kind of basic test to at least make sure that Player_OnBeforeMoveSprite is being called?