Castlevania Dungeon Forums

The Castlevania Dungeon Forums => Fan Stuff => Topic started by: reiko26 on March 14, 2012, 10:22:38 PM

Title: I need minor help correcting some coding
Post by: reiko26 on March 14, 2012, 10:22:38 PM
Hey guys, i have been having problems with getting certain enimies in game  to work properly, for instance, me and one of my friends are trying to code the skull knight from cv3 we just about have his movement right but it apears that he hits the player before you see the attack animation. can someone help us please. we are still getting the feel of coding but we are not pros. I dont want to get in anyones way if they have work to do, so if someone is available and knows gmk pretty well, please feel free to let  me know something. thanx in advance guys.
Title: Re: I need minor help correcting some coding
Post by: Lumi Kløvstad on March 15, 2012, 02:59:19 AM
This needs to be in fanworks.

As for the topic, sorry. I'm rubbish at coding, so I would do more harm than good.
Title: Re: I need minor help correcting some coding
Post by: uzo on March 15, 2012, 05:19:54 AM
You're going to have to be far more detailed than that. Let's start with; What language do you code in? C++? Java? VB? etc.
Title: Re: I need minor help correcting some coding
Post by: VladCT on March 15, 2012, 09:58:43 AM
You're going to have to be far more detailed than that. Let's start with; What language do you code in? C++? Java? VB? etc.
...and knows gmk pretty well...
I don't think he's coding from scratch... :-X
Title: Re: I need minor help correcting some coding
Post by: Corpsecrank on March 16, 2012, 08:26:48 AM
Yeah gonna need someone who knows game maker to answer the question. This would be gml.
Title: Re: I need minor help correcting some coding
Post by: Inccubus on March 16, 2012, 11:42:06 AM
How is the sprite set up? Are you using the built in hot detection? Did you set each image in the sprite to use it's own bounding area? If there's code involved post it so we can evaluate it and give you feedback.
Title: Re: I need minor help correcting some coding
Post by: TheouAegis on March 16, 2012, 09:22:15 PM
The first reply you would have gotten from GMC would have been without a doubt, "We need to see your code." Inccubus, Esco and I can't help you at all if you don't post code.

But even without knowing your code, I can give you some insight on how to program the Skull Knight. First off, his sword is NOT A PART OF HIS SPRITE. Weapons are separate objects; the worst thing you can do is treat a weapon as part of the same sprite/object. For starters, it's a waste of memory, because the sprite needs to be larger to accommodate the extra width added by the sword. Also, some enemies deal more damage with their weapons than with their bodies (or vice-versa, as is the case with Axe Knights and Bone Skels). Second, it's easier to check for collisions with a sword if it's its own object, as opposed to checking the image_index of the Skull Knight. Download the latest release of GMvania (my Castlevania engine) from this forum and look at how the Sword Skel was handled. The Skull Knight attacks about the same way.
Title: Re: I need minor help correcting some coding
Post by: Las on March 26, 2012, 05:17:34 PM
@TheouAegus i checked your latest cv3engine(ah i though i did anways),but i didn't see anything about  a sword skel just a regular skeleton. Do you have a more updated version i could view? Just figured i'd ask.

@ Corpsecrank, sorry i didn't get a chance to post a while back but i seen your post about something you did that was cool with candles.Yeah sounds cool man.  i'm looking into lightning effects at the moment which provide cool special effects.
Title: Re: I need minor help correcting some coding
Post by: reiko26 on June 16, 2012, 08:32:22 PM
hey guys, las and I are having problems with having the left door shifting with the camera as it shifts to the left for left doors. we have the rightside working fine but we cant figure out how to make the same thing happen on the left. can someone help explain what we need to do in order to make it shift left please? :)
Title: Re: I need minor help correcting some coding
Post by: TheouAegis on June 16, 2012, 08:51:56 PM
I take it you're not using my Door Transitions scripts. If you are, the problem is you're using the wrong script. Since you're likely not using my door transitions, you will probably want to do what I did for my door transitions and make sure you have two different scripts for each direction. Don't try to use a universal script for both directions as that will seriously fuck with your head. Just make a script for moving to the right through a door and make another script for moving left through a door. Check which side of the door the player is on and use the proper script accordingly.

@LAS
The sword skeleton has been updated. I think I posted the code for it recently in my NES-Style Castlevania thread. Well, part of it. I didn't post the attacking (did that with a timeline).  The script for it though works for both custom engines and using hspeed. Make sure you guys aren't using direction/speed to move enemies. In a platformer there's no point in using anything other than hspeed and vspeed (this goes for diagonal movement too).