collapse

Author Topic: Cube code.  (Read 1465 times)

0 Members and 1 Guest are viewing this topic.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Cube code.
« on: December 24, 2014, 12:43:18 AM »
I was wondering about the frame rate in a character. Is the frame rate and over all thing? Or can adjust the frame rate per set/ technique.
« Last Edit: January 15, 2015, 01:48:56 PM by Rage »



I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Frame Rate per technique
« Reply #1 on: December 24, 2014, 01:40:28 AM »
Mugen runs at 60fps assuming your computer is up to it. In a character this is identified via ticks. 60 ticks to a second. The framerate of a character will depend on how many sprites you have. Something with 3 standing frames is going to look less smooth than something with 60.

Yes, you can simply make stuff faster by reducing the ticks in a given animation. Won't always look right though. Jump or walk and run will look odd unless you increase the velocity too.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Sprite transparency
« Reply #2 on: January 04, 2015, 10:39:02 PM »
OK I got cha, Mugen parameters are 60fps or ticks. All animation fit into the spectrum.  After playing in FF i found what i wanted to know. Lets say and animation is 12 frames, well thats 12 ticks. well what i wanted to know was can you make each of those ticks last longer, so 12 doubling to 24. You can do this as well as have one frame hold for 1 tick and another for 3 ticks. Anyways its basic animation. I didn't now FF was build on part of a basic animation engine, tho it kinda obvious it would be.  =P~ Thanks for the time and helping lead me to my answer. Gawd i feel stupid....




Ok next question how to you edit a sprite so it is transparent?

I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Frame Rate per technique
« Reply #3 on: January 05, 2015, 12:18:42 AM »
Completely transparent, ie invisible, or a bit transparent like you have there?

If you look in the bottom of the right hand pane you'll see a drop down with "Addition" written on it with a couple of values next to it. Mugen has 3 standards
Addition
Addition1
Subtraction

In a pure text version these are denoted by, for example

spr,grp, x,y, time,,A (or A1 or S)
Mugen has an additional version with more control which is what is in use below. The numbers tell it how much background to add to the sprite, and how much sprite to subtract from the BG (or something like that) text wise this is denoted as
spr,grp, x,y, time,,A###D###

taking values between 0 and 256.

This can also be done via the TRANS sctrls which takes value = add, add1, sub and addalpha which uses an additional line addalpha to specify the same settings as above (look in the docs for more info) Explods can do the same stuff. IIRC angledraw kills a trans set through the air file and you need to force it via the sctrl.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Frame Rate per technique
« Reply #4 on: January 05, 2015, 12:35:40 AM »
Cool, yep i was talking about how the image displayed,  Thanks again Cyanide.

I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12459
  • Country: Brazil br
  • Last Login:April 01, 2024, 11:02:34 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Frame Rate per technique
« Reply #5 on: January 05, 2015, 12:36:35 AM »
Quote
IIRC angledraw kills a trans set through the air file and you need to force it via the sctrl.

Yeah, so you will need to use the Trans sctl

[State 0, Trans]
type = Trans
trigger1 =
trans = default ;none, add, addalpha, add1, sub
;alpha = 256,256
;ignorehitpause =
;persistent =

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Cube code.
« Reply #6 on: January 15, 2015, 02:16:46 PM »
Thanx you gentile men.  Ok  I got a weird are one for you now. I have a character that can create cubes. By default he can stand on these cubes or kick them into player 2(PL2). I know that player 2 cannot stand on the cubes so if player 2 makes contact with them they break hitting PL2. This is the Default usage.

So here is my question: Is there a way to set the code in PL1 so that only those identified as PL1 can stand on cubes and kick them? Here is why I asked for such if such a weird thing is possible. I want to take this line of text and paste it into PL2 so he too could stand on the cubes and kick them.

In theory, if this was the case, the cube attack would function as described in its default usage. All mugen character would be hurt if they made contact with the cubes. But if the someone pasted that line of code into (example) Ryu then Ryu could stand on the cubes and kick them back at PL1 hurting him.... 

Edit:

Also is this too complex. You as and experienced coders would yall just drop the idea or do you think it worth it?

I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Cube code.
« Reply #7 on: January 15, 2015, 05:01:17 PM »
To make both characters stand on them is actually pretty easy.

Use a hitdef with 0 damage and an animtype = none. Add the affectteam = B parameter to hit both teams. No damage. Custom state them to an interim state and then have that selfstate to standing. Clever additional hitdefs based on position of parent or opponent will drop you off the cube.

Now, kicking the cubes, that is actually harder. You either use affectteam = B again which means you can hit your opponent in simul, or you get a little creative with actions based on parent position and animation etc etc. Lets do an example. The cubee is doing nothing, its kicked state is 2000 (i am making up numbers) It detects the parent is in a high kick state and close enough to affect it like so

[State Changestate]
Type = changestate
trigger1 = parentdist X= [-15,10]
trigger1 = parentdist Y= [-40,10]
trigger1 = parent, stateno = 220
trigger1 = parent, animelemtime(4) = 0 (this is the frame in which the clsn1 is active)
value = 2000

And you need one of those for every attack that can contact the cube. To make things a little more easy, you would add explods and sounds to the kicked state right at the start to show the hitspark and sound rather than doing it over and over per hit as above.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Cube code.
« Reply #8 on: January 15, 2015, 05:35:04 PM »
Ok, understood, So lets drop the kick portion for PL2 and go with they can stand on the cube only.


So if i used the info you wrote:

Quote
Use a hitdef with 0 damage and an animtype = none. Add the affectteam = B parameter to hit both teams. No damage. Custom state them to an interim state and then have that selfstate to standing. Clever additional hitdefs based on position of parent or opponent will drop you off the cube.

I could do this:
 
So the cube is technically an object with no properties beyond being step on by BOTH PL1 & 2.  Now PL1 kicking it could charge the cube state to that of a projectile. Thus the cube slide and hurting PL2.

Ok, so back to what you said Cyanide:

Quote
Use a hitdef with 0 damage and an animtype = none. Add the affectteam = B parameter to hit both teams. No damage. Custom state them to an interim state and then have that selfstate to standing. Clever additional hitdefs based on position of parent or opponent will drop you off the cube.

This section of code for the cube doesn't require any code to be placed in PL2 to obtain the standing portion of what I ask?




I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Cube code.
« Reply #9 on: January 15, 2015, 05:46:07 PM »
No, it's a simple attack state with guarddist set to 0 so nobody will enter guard states. Your hitdef is active when someone is above you and has a positive Y velocity (ie jumping down) Probably worth it only hitting Air opponents so hitflag = A

You use p2stateno to send them to some temporary hitstate, and then from that they are instantly set to standing. Like Bane84's mario game which i helped him with.

It could POSSIBLY cause issues in simul, but not too many i shouldn't think.

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12459
  • Country: Brazil br
  • Last Login:April 01, 2024, 11:02:34 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Cube code.
« Reply #10 on: January 15, 2015, 06:19:41 PM »
Just remember that Mugen does not have a TRUE platform system/detection, and some bugs could occur. This is one of the things Mugen could borrow from OpenBOR because he outshine Mugen on this area.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Cube code.
« Reply #11 on: January 15, 2015, 06:39:36 PM »
Thanx for the info now to see if i can put it to use. Also i know mugen isn't meant for these things and the engine is very narrow mind at times unlike obr but i have to try and do something a lil unique.

I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Cube code.
« Reply #12 on: March 25, 2015, 06:13:13 PM »
Ok so this is the data obtained from Whiplash on the cubes and their functionality. He seems to be running into some issues.


I need help with the Cube.

Here's what's done so far:
P2 cannot pass through it and both players can walk and fall off it, p2 can destroy it after 5 hits.

what still needed:

need to make it so that you land on top of it no matter when it is, I saw an idea of storing the position in the fall.damage value, but I can't seem to get that working.
P1 needs to note be able to walk through it and hit it like player 2.

I REALLLY need help with this. I'm at a loss as to what to do.

I'm going to skip it and move on, but hopefully someone better then me can take a crack at it.

here's what I was told about the cube BTW:

Quote
Quint pulls in junk fro the stage to create a cube that stops both his and the enemy's projectiles. Both players can jump on it. Quint can use his crouching heavy kick to make it slide until it hits something and it breaks, damaging whoever's near them. Quint can also create cubes in the air that he can knock downwards, which makes it shatter upon hitting the ground.


(that's paraphrasing, but whatever.)



heres the code:

(click to show/hide)

So any advice?

I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Cube code.
« Reply #13 on: March 26, 2015, 03:18:03 AM »
Done correctly, and using affectteam = B to hit both players, you should be able to use targetbind or snap to lock p2 to the stop position. Don't forget to set their velocity on Y to 0 when they do the fake landing state. The helper knows how tall it is, so it knows what position to targetbind them to.

To prevent p1 walking through it... not by any NORMAL means. Block detects how close the parent is and sets a variable. The parent cannot X vel, or gets posset to his X pos over and over if that variable is set. Jumping will of course let you escape, as should walking backwards.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Cube code.
« Reply #14 on: March 29, 2015, 12:17:19 AM »
Done correctly, and using affectteam = B to hit both players, you should be able to use targetbind or snap to lock p2 to the stop position. Don't forget to set their velocity on Y to 0 when they do the fake landing state. The helper knows how tall it is, so it knows what position to targetbind them to.

To prevent p1 walking through it... not by any NORMAL means. Block detects how close the parent is and sets a variable. The parent cannot X vel, or gets posset to his X pos over and over if that variable is set. Jumping will of course let you escape, as should walking backwards.
Thanx for your expertise.

I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Cube code.
« Reply #15 on: March 29, 2015, 01:46:08 AM »
Also, why isn't whiplash posting these requests for help. He's a member here isn't he? It seems a bit odd to go through an intermediary. Obviously he's READING the thread, getting assistance completely second hand would be weird.

Offline Rage

  • IMT Princess
  • IMT Content Architect
  • *
  • Posts: 7305
  • Country: United States us
  • Last Login:April 23, 2024, 02:43:34 AM
  • The trend setter
Re: Cube code.
« Reply #16 on: March 29, 2015, 02:57:47 AM »
Also, why isn't whiplash posting these requests for help. He's a member here isn't he? It seems a bit odd to go through an intermediary. Obviously he's READING the thread, getting assistance completely second hand would be weird.
why isn't whiplash posting these requests for help? IDK and IDC why he hasn't, this thread and others i created i do of my own accord. If a coder is having issues Ill post threads for solutions, I did it for Axl too. I sprite but I feel thats not the end of my role...

Yeah i know its weird too but knowledge is power, so even if they dont ask for the info, they it because it can only help.


I AM THE PRINCESS. LOVE ME!!!     
Proud supporter of CROM                 DONT CLICK THIS LINK...

Offline -Whiplash-

  • Prince of Latis
  • RMM Contributor
  • ****
  • Posts: 1754
  • Country: Canada ca
  • Last Login:December 25, 2021, 12:18:48 AM
  • Destroy the Core!
    • Email
Re: Cube code.
« Reply #17 on: March 29, 2015, 12:57:07 PM »
Also, why isn't whiplash posting these requests for help. He's a member here isn't he? It seems a bit odd to go through an intermediary. Obviously he's READING the thread, getting assistance completely second hand would be weird.

Uhh... I haven't posted here yet, because I've just been reading it and getting all my questions answered/asked.

sorry Cyanide, I would've made the topic and asked the questions, but rage did it before I did, so I figured, why ask?

Though I admit, it's odd having someone else ask questions for me, but I'm not complaining.

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Cube code.
« Reply #18 on: March 29, 2015, 06:28:01 PM »
I'm not annoyed in any way, it's just weird. It would be less weird if you weren't a member or were banned =P

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

* IMT Calendar

April 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 [24] 25 26 27
28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal