YesNoOk
avatar

Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features. (Read 35802 times)

Started by Messatsu, March 15, 2007, 01:28:38 am
Share this topic:
Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#1  March 15, 2007, 01:28:38 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Talk of this (stupid) TSMugen got me wondering a bit.  Actually it was before then, but that's what brought it up again.  There is no set of variables that are not taken already*.  Several greedy, I-can't-optimize-my-var-usage whores prior to Messatu's Hey!-Elecbyte-is-not-returning-point decided it would be funny to take the sysvars 2, 3, and 4.  So any hope of adding a standard type of thing to any character has to do nasty swapping (if there are free variables even).  In addition to that, adding such a thing to all characters is a huge amount of overhead.  Fine. >:(

If you could create a helper, then that helper could use the uniquely numbered states within the common.cns.  The actual filesize cost is negligible because all each character needs is a helper call in the appropriate place.  The helper does the rest of the work.  It calls everything needed from the common.cns (though in memory, each character probably has their own copy).  However, any actions required from the player need to be made within their own files.  But a simple variable (using *) communicating mechanism (or if I really need to... a helper anim) could reduce the amount that actually needs to be there.

Each state inside the common.cns would ideally never be in any other existing character.  The state numbers must be sufficiently unique, but other common.cns files can share numbers between each other since only one common.cns may be globally selected.

*there are, but I'm conveniently going to be quiet about them.
**this assumes that TSMugen doesn't already use the common1.cns to accomplish what it needs since it needlessly decides to use a the player variables.  And I actually really dislike the converter since it is going to be naive in making a distinction between helper and player states.
***no, I don't think this solves the problem of transformer characters.

I'm probably not being clear here, but I'm sure at least someone understands part of what I'm getting at.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#2  March 15, 2007, 02:24:31 am
  • *****
  • Tends to lose track of things a lot. :/
    • www.mugenguild.com/~winane/
Still quite busy.

(Yes, I intend to deal with that stuff eventually, but kinda can't just yet, sorry. :/ )
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#3  March 15, 2007, 02:44:43 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Practically discard an entire screenpack lifebar and make more interactive features through the common1.cns.  Each character only needs to make a single helper 9235098 or whatever isn't already taken so that no character prior to development could override it unintentionally.  There are limitations, but this reduces the amount of things needed to change on a per character basis.


Many people risk their lives everyday by having Mugen.
Last Edit: March 15, 2007, 04:34:00 am by Messatsu
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#4  March 15, 2007, 04:17:31 am
  • ****
  • Cute Bounty Hunter
If I remember right, Nijikaku's common1.cns has this very systemhelper thing that you're talking about.  And all the characters in that game create an instance of that helper for themselves.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#5  March 15, 2007, 07:06:19 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Just a few more examples that came to mind.  Stage interactions (except I never bothered to take the time to understand how stages could be detected, so maybe not), Marvel Super Heroes gem system, MvC striker system, a scoring system, etc... without adding everything to all characters.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#6  March 16, 2007, 07:40:04 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Small problem with optimization.  You can't have the helper use the fightfx for its animation. :(  That means each player needs all of the helper animations that need collision data.  But you can still use the sprites in the fightfx through explods.  I was hoping for a proof of concept tonight, but it's not going to happen.

I can't emphasis sloppy enough, but proof of concept. http://mugenguild.net/~messatsu/fightfx.zip  Now I'm really tired, but it's pretty exciting at the same time. :gugoi:

Add this to each (only one is needed to test it though) character's negative state, really doesn't matter which:
[State ]
type = helper
trigger1 = !numhelper(6969696)
stateno = 6969696
ID = 6969696
ownpal = 1

This to each character's air.  All should not refer to sprites in your sff.  Not going to bother to edit it, but since these aren't supposed to display anything, only the total time would be "needed" in the future to cut down on file size, though that disables using animelem triggers.
Spoiler, click to toggle visibilty
When everything is done, select the character and press start. :sugoi:


Many people risk their lives everyday by having Mugen.
Last Edit: March 16, 2007, 09:29:10 am by Messatsu
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#7  March 16, 2007, 11:38:42 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html


Many people risk their lives everyday by having Mugen.
Last Edit: March 16, 2007, 11:46:53 am by Messatsu
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#8  March 16, 2007, 04:20:48 pm
  • ****
  • Aka ShadesTeam/Zeckle
so basically it adds a limited helper?
Shades 2 site:Shades of Manhattan
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#9  March 16, 2007, 06:16:49 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
For this particular thing, yes.  It conveniently tucks away all code in the common1.cns so that the only thing that need to be in all characters besides the initiating helper is the collision based animations.  A specialized lifebar wouldn't need collisions, so it just needs the initiating helper.  And if I'd get off my butt to establish some kind of standard, each little thing could be made in modules of sorts (to add and subtract features as you please).  Additionally, each player could request exceptions via one of teh hidden variables that nobody used, besides in my Cody.

Some things come at a cost though.  A special lifebar would ignore assertspecial=nobar.  A special foreground element would ignore assertspecial=nofg.  There is a limitation to what commands you can globally specify.  I think you're limited to hold directions and the single buttons.  The rest have most likely been renamed.


Many people risk their lives everyday by having Mugen.
Last Edit: March 16, 2007, 06:23:39 pm by Messatsu
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#10  March 16, 2007, 08:29:52 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#11  March 16, 2007, 09:12:16 pm
  • ******
  • [E]
    • Mexico
that looks nice, plan to implement something like that for vgn, ideally putting everithing in st-2 and common1.cns, even putting certain values that change slightly in vars, so they can be modified fast; the current changes in my codde design for eroha made me lose some time and get behind on it, though. I will post more here when i get back to my home.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#12  March 17, 2007, 12:37:31 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Specification to achieve a higher sense of modularity.


I think I'm going to reserve all numbers between 1337000000 and 1337999999.  So any number of the form 1337XYZ***.  Please never use these in any of your characters unless you are intentionally overriding the states for a little more control.  XYZ are unique identifier numbers.  I think they will be arbitrary and sequential as I think three numbers aren't quite enough to dictate purpose when they are also meant to differentiate as well.  They are going to be assigned by me alone, but people are free to poke holes in my numbering system before I finalize it.  For each assigned position, you have 1000 states and anims to declare as your own.

SFF group numbers are limited to 2 bytes, but since it's in the fightfx SFF only, I don't have to worry about stepping on toes with reserving 10 sprite groups per number that I assign.  Sprite groups are reserved as 1XYZ*, the same XYZ assigned earlier.  Sprite numbers are not reserved.  That allows for 655360 unique sprites per assignment, but I doubt that an sff that size would even load.  The division of the SFF exactly matches the division of the common.snd file.

The "master" helper will be assigned stateno 1337000000.  I'm reserving 1337000000 to 1337000999 for that purpose.  My MvC helper system is reserved as 1337001*** (even though it currently doesn't abide by that).  So that being as it is, the sprite groups are respectively assigned to 1000* and 1001*.

The master helper needs to call each of the other child helpers to use their features.  To have some degree of control over the player themself, states can be entered through a message passing system.  The child helper evaluates the actions of the players and does a parentvarset to the master helper to then relay this information back to the root.  I'm concerned with the delay there.  I can't standardize variables since there aren't enough to assign, but the amount of code that depends on the variables will be small, so implementing a feature that requires the master helper to get out will be easy to change.  Perhaps only one helper may be allowed to say what states can be entered by the player.  The two or more helpers may not agree with each other well.

1337000*** Master Helper, author: Messatsu
1337001*** MvC Striker System, author: Messatsu

Can anyone see anything wrong to this approach and could suggest something better?


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#13  March 17, 2007, 08:17:53 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
http://mugenguild.net/~messatsu/fightfx4.zip Updated to spec and made a few minor changes.

Add this to a negative state:
[State ]
type = helper
trigger1 = !numhelper(1337000000)
stateno = 1337000000
ID = 1337000000
ownpal = 1

Add this to each character's air file:
[Begin Action 1337000000];master helper invisible anim
-1,0,0,0,1;invisible sprite

[Begin Action 1337001001];cyclops jump in
Clsn2Default: 1
 Clsn2[0] =   7,-69, 88,  6
-1,0, 0,0,-1

[Begin Action 1337001002];cyclops
Clsn2Default: 1
 Clsn2[0] =   7,-69, 88,  6
-1,2, 0,0, 4
-1,3, 0,0, 4
-1,4, 0,0, 4
-1,5, 0,0, 4
-1,6, 0,0, 4
-1,7, 0,0, 4
-1,6, 0,0,48
-1,3, 0,0, 4
-1,2, 0,0, 4

[Begin Action 1337001003];optic blast
Clsn1Default: 1
 Clsn1[0] =  60,-72,638,-50
-1,5, 0,0, 1
-1,6, 0,0, 1
-1,7, 0,0, 1
-1,8, 0,0, 1
-1,9, 0,0, 1
-1,10,0,0, 1
-1,11,0,0, 1
-1,12,0,0, 1
-1,13,0,0, 1
-1,14,0,0, 1
-1,15,0,0, 1
-1,16,0,0, 1
-1,17,0,0, 1


Many people risk their lives everyday by having Mugen.
Last Edit: March 17, 2007, 08:21:05 pm by Messatsu
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#14  March 17, 2007, 10:00:30 pm
Wow! all of this is very intresting
Thanks alot!
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#15  March 18, 2007, 04:20:26 am
  • ******
  • [E]
    • Mexico
i suggest puting the concept in simple terms before trying to get suggestions form guys who are not overly familiar with it. :P
first, i don't know what tsmugen is....

now, are some of your points...

1) put shared code for systems in common1.cns.
2) to avoid var swapping create a common helper, whose code will be in common1.cns
3) put the gfx in fighfx.sff for the shared code visuals.
4) put the helper creation code in one of the char's negative states.
5) since animations can't be in common.cns, copy paste those in the char's files.
6) enjoy.

your example gives characters a helper.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#16  March 18, 2007, 06:18:24 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Quote
i suggest puting the concept in simple terms before trying to get suggestions form guys who are not overly familiar with it.
I don't want their comments yet.  They probably really can't help right now. :P

Quote
first, i don't know what tsmugen is....
It's a code you put in all characters that lets them have a scoring system and probably other things.  I can't find the specification for it and I was too lazy to create a cloned Mugen to run the TSMugen converter tool (<- I don't trust it).  It uses sounds and sprites from common.snd and fightfx.sff, but I don't think it uses helpers since it bothers to use the player variables.

Quote
5) since animations can't be in common.cns, copy paste those in the char's files.
That's only limited collisions.  So a custom lifebar won't need any animations pasted and it'll just need a helper call per character.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#17  March 18, 2007, 08:42:17 am
  • ***
  • Fuck Windows 8!!!! I use adult OSes to work!!!
    • Mexico
From what i could see, this main helper calls another helpers when necesary... is like an "allways-present" control that enables stuff if you make a command, or just enable them to be there forever (like a score control).

This could have many posibilities... it can be possible to add an advanced tag system without lots of vars...  :o

Keep on the work, this promises a lot of benefits.

See ya!!!! ;D
This is the era in which we will see reason triumphing against brutality... May be better to open your mind to the future.
------------------------------------------------------
<- [Clicky - Clicky]
Current Universal War Official Artwork
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#18  March 18, 2007, 06:46:52 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Suggested release format:

The pcx files with a matching txt file that could be piped into sprmaker.  The snd files with a matching txt file that could be piped into sndmaker.  A set of animations that would be inserted into the fightfx.air.  A set of blank anims that refer to collisions for insertion into the player files.  The master helper that needs to be loaded in all characters.  Your set of code that needs to be inserted into the master helper to call the child helper.  Your child helper code.

I'm just including the base common1.cns, common1.snd, fightfx.sff, and fightfx.air since it's easier on people who would download.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#19  March 18, 2007, 07:15:43 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Untested to let the player enter any state that the child helper dictates.

;negative per character code
[State ]
type = changestate
trigger1 = helper(1337000000), var(0) > -1
value = helper(1337000000), var(0)

;master helper code
[State ]
type = varset
trigger1 = root, stateno = var(0)
var(0) = -1

;child helper code
[State ]
type = parentvarset
trigger1 = complex set of expressions
var(0) = whatever state is needed


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#20  March 18, 2007, 10:49:36 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
And if you intend to release anything concerned with this, please either contact me to get a set of reserved values or don't use the ranges that I've reserved.


Many people risk their lives everyday by having Mugen.