Advanced Search

Author Topic: Touhou FPS Project [Standalone]  (Read 16231 times)

0 Members and 1 Guest are viewing this topic.

August 14, 2011, 01:56:11 AM
Reply #30

Offline xColdxFusionx

  • MM8BDM MM&B Contributor
  • *
  • Date Registered: August 02, 2011, 01:07:17 PM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #30 on: August 14, 2011, 01:56:11 AM »
Quote from: "novaxdruid"
Ah I see. Well, lesson there be learned for me. Also, not trying to cheat out of doing the coding, I just want to know what I did wrong so I don't make the same mistakes. I do appreciate the help though.

Well, I fixed the lower and raise tics, however, it still crashes. I know the refire is suppose to happen, but is it the only thing allowed with 0? Did I miss other functions I'm aware of?

Fixing Spawn and Ready would help.

August 14, 2011, 07:22:03 AM
Reply #31

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #31 on: August 14, 2011, 07:22:03 AM »
Edit:
Finally got it to work. My computer wasn't saving the document for some odd reason. However, I still can't seem to make it appear when I use cheats. I have to either summon the gun or cause a forced use of it. I think it might have to do with it clashing with the other custom gun. I noticed when I picked it up, it replaced the delta-wave and I couldn't reselect it again. Other than that, I'm going to work on fixing it more and add an alt fire to it. If you can, can you teach me how to make a "charge" function using the HOLD state?

Edit2:
Here's my new demo with a gun that is more or less with how the character's "weapons" will function (albeit with many changes of course). I still seem to have that weird problem with going to another weapon or picking up the other custom gun disables it from being used. Other than that, I'm having fun doing this. Now I just have to figure out the above (charge and alt charge with the hold command) and the weapon prototype portion will be done.

Edit3:
New question. How do I get it to shoot 3 projectiles at once? (like one to the left, one in the center, and the last to the right all in one fire). Granted I'm working on it as I speak, don't know what is needed yet.

August 14, 2011, 06:22:04 PM
Reply #32

Offline xColdxFusionx

  • MM8BDM MM&B Contributor
  • *
  • Date Registered: August 02, 2011, 01:07:17 PM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #32 on: August 14, 2011, 06:22:04 PM »
Quote from: "novaxdruid"
Edit3:
New question. How do I get it to shoot 3 projectiles at once? (like one to the left, one in the center, and the last to the right all in one fire). Granted I'm working on it as I speak, don't know what is needed yet.

Hint 1: Using a delay of 0 means that the line will execute at the same time as the line(s) after it.

Hint 2: A_FireCustomMissile might come in handy.

August 14, 2011, 10:51:37 PM
Reply #33

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #33 on: August 14, 2011, 10:51:37 PM »
Alright, got that down. I seem to notice the center one goes a bit first. I take it I first have the frame drawn for the firing and then follow it with the 3 different firecustommissles commands? Not a big deal, I can figure that out later. My next concern is figuring out how to properly "charge"/"hold" something on the weapon.

August 14, 2011, 11:09:57 PM
Reply #34

Offline xColdxFusionx

  • MM8BDM MM&B Contributor
  • *
  • Date Registered: August 02, 2011, 01:07:17 PM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #34 on: August 14, 2011, 11:09:57 PM »
Quote from: "novaxdruid"
My next concern is figuring out how to properly "charge"/"hold" something on the weapon.

Here's how Megaman 8-Bit Deathmatch does it, in summary.

Fire:
Check the user's Inventory. If it has more than x Charge items, jump to a different state. (Full charge)
Check the user's Inventory. If it has more than x Charge items, jump to a different state. (Mid charge)
Execute some code for "charging" effect
Give Charge item.
A_Refire
Goto Uncharged Shot

Full Charge:
Execute code for "holding charge" effect
A_Refire
Goto Full Charged Shot

Mid Charge:
Execute code for "charging" effect
Give Charge item
A_Refire
Goto Mid Charged Shot

Uncharged Shot:
Shoot the missiles and whatever
Goto Ready

Mid Charged Shot:
Shoot the missiles and whatever
Goto Ready

Full Charged Shot:
Shoot the missiles and whatever
Goto Ready

Hope this helps you. I'll let you figure out the functions you'll need on your own.  :D

The Touhou charge is pretty fast IIRC, so you might not even need a Mid-Charge step.

August 15, 2011, 10:41:00 AM
Reply #35

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #35 on: August 15, 2011, 10:41:00 AM »
I honestly don't understand any of that. Can you please explain it in details. That's what I really need in order to learn. I can't learn and do something on guesses that I know nothing about. I might be a newbie in all of this, but I don't like being played with like a fool.

August 15, 2011, 01:45:40 PM
Reply #36

Offline xColdxFusionx

  • MM8BDM MM&B Contributor
  • *
  • Date Registered: August 02, 2011, 01:07:17 PM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #36 on: August 15, 2011, 01:45:40 PM »
Alright, sorry. I just didn't want to do the whole thing for you. I'll type out a framework code for a charge code. Replace XXXX X with whatever sprite code you're using.

This code charges in 10 tics. You can modify it as needed to charge in more or less.

Fire:
XXXX X 0 A_JumpIfInventory("ChargeFlag", 10, "FullCharge")
//You can put an animations and sounds that you want to play here. I already went over animations in an earlier code. Keep in mind that the more stuff you put here, the longer it will take the weapon to charge.
XXXX X 1 A_GiveInventory("ChargeFlag", 1)
XXXX X 0 A_Refire
Goto Shot
FullCharge:
//You can put an animations and sounds that you want to play here. I already went over animations in an earlier code.
XXXX X 1 A_Refire
Goto ChargeShot
Shot:
//Put the effect for shooting an uncharged shot (animations, sounds, A_FireCustomMissile, etc.) here.
Goto Ready
ChargeShot:
//Put the effect for shooting a charged shot (animations, sounds, A_FireCustomMissile, etc.) here.
Goto Ready

August 15, 2011, 02:26:02 PM
Reply #37

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #37 on: August 15, 2011, 02:26:02 PM »
For the most part I guess I get it except the JumpIfIventory and ChargeFlag. Like how does JumpIfinventory exactly work?. Also, is ChargeFlag like a script I have to write out separately? Lastly, sorry if I sounded like a jerk. I'm just trying to understand everything fully.

Edit:
I think I get it I hope. Because it's technically giving you the flag to check instead of shooting something, it holds off until you finally release it. I had thought maybe I had to create a special item indicating this. Well, for now, I will test making a gun using these guidelines.

Edit2:
Well, the gun charges (i.e. it holds as I hold the fire button), however, it does not discharge the charged up shot like it should. Unless I botched something (still tinkering around with it), I've used the exact same coding you provided and for the most part understand how it works.

Edit3:
I was looking through a similar charged weapon, and realized some things that were missing. I hadn't identified an ammo for the charge and was not taking the ammo away after the charge was done. However, it completely crashes the games when I attempt to charge. Normal quick shots though seem ok though..

Here is the Decorate for the current charge weapon...
(click to show/hide)

August 17, 2011, 05:33:40 PM
Reply #38

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #38 on: August 17, 2011, 05:33:40 PM »
Been drawing up a HUD design. Wanted to know what some might think of it. It's a really rough design, but something I'd thought worked (at least for the moment)



Been also thinking of how to make the spell card system seem effective. However, the spell cards themselves will probably be the last thing I actually work on.

Charging gun still has that error sadly. Hope I can fix it D:

August 19, 2011, 03:49:34 PM
Reply #39

Offline xColdxFusionx

  • MM8BDM MM&B Contributor
  • *
  • Date Registered: August 02, 2011, 01:07:17 PM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #39 on: August 19, 2011, 03:49:34 PM »
That's odd. I have a feeling I might know what's causing it, though. Try this:

Code: [Select]
SHTG D 1
SHTG D 0 A_Refire
Goto ChargeShot

Also, I like the HUD. It looks simple, yet effective.

August 19, 2011, 07:40:51 PM
Reply #40

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #40 on: August 19, 2011, 07:40:51 PM »
It works now. Oddly it says there is something wrong with line 87 or something like that, but the gun functions correctly. Now I'm going to tweak it a bit to get the animations correct. Now I have to figure out how to make a special melee bind and special ability bind. I know it slightly involves making it use inventory or something like that. My only problem is that each character is to have their own melee attack (different sprites, damage, etc) and special abilities/attacks. Let me know if I'm on the right track at least on these.

Edit:
How would I force the shot to be fired after a certain time? I understand it would be another Goto IfInventory amount, but I don't know how I would force the gun to shoot once it would reach said limit. It's not too important if it can't be addressed, but would bring it closer to 'soku's ways.

Also, what do you think if the character's bangs/hair accessories (ie. reimu's sides, marisa's tied area, etc) in the status bar to make it feel more as though you are that character. I ask of this cause I will more than likely have the weapon frames be blank to signify that the character's arms/hands/etc aren't always up like a typical weapon. Only exception to this rule is to those who actually hold weapons like a gohei, katana, scythe, etc.

August 19, 2011, 08:29:28 PM
Reply #41

Offline xColdxFusionx

  • MM8BDM MM&B Contributor
  • *
  • Date Registered: August 02, 2011, 01:07:17 PM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #41 on: August 19, 2011, 08:29:28 PM »
Quote from: "novaxdruid"
Edit:
How would I force the shot to be fired after a certain time? I understand it would be another Goto IfInventory amount, but I don't know how I would force the gun to shoot once it would reach said limit. It's not too important if it can't be addressed, but would bring it closer to 'soku's ways.

Add a GiveInventory to the Fully Charged state, then add a JumpIfInventory to the Fire state. Fire state should look something like this:

Code: [Select]
A_JumpIfInventory("ChargeFlag", 10, "ChargeShot")
A_JumpIfInventory("ChargeFlag", 5, "FullCharge")

Quote from: "novaxdruid"
Also, what do you think if the character's bangs/hair accessories (ie. reimu's sides, marisa's tied area, etc) in the status bar to make it feel more as though you are that character. I ask of this cause I will more than likely have the weapon frames be blank to signify that the character's arms/hands/etc aren't always up like a typical weapon. Only exception to this rule is to those who actually hold weapons like a gohei, katana, scythe, etc.

...A character face sprite (Doom style, possibly?) in the HUD sounds like a better idea. Having the characters' hair in the frame seems a bit strange to me.

Also, I think the weapon sprites should show the character holding something instead of being blank, but whether or not you want to do that is your decision. Ideas below in the spoiler. (I have a feeling I missed a few characters, but... meh.)

(click to show/hide)

August 19, 2011, 09:27:42 PM
Reply #42

Offline novaxdruid

  • Standard Member
  • Date Registered: August 07, 2011, 06:37:44 AM

    • View Profile
Re: Touhou FPS Project [Standalone]
« Reply #42 on: August 19, 2011, 09:27:42 PM »
Hmm, now it wants to keep firing the charge shot constantly. I swear this thing wants to do something completely wrong when I try to advance. Kind of bugs me that a simple charge function is so difficult. It's not that big of a deal, but seems odd to me. As for the HUD, I really like my idea of the hair D:. Do you have any advice, tips, etc for the 2 other problems?