Forum Replies Created
-
AuthorPosts
-
I’m on the latest Ted2Go from MX2 1.04 release, it seems ok for now.
Just started getting random crashes in Ted2Go MacOs Sierra, don’t quite know the version, but fairly new.
I’ll compile a new TedToGo soon, and report back.No idea why, it Ted2Go just disappeared : PUF, no error message.
March 30, 2017 at 8:02 am in reply to: Ported particle System "Memory access violation" [SOLVED] #7660Great stuff.
accept functions which define their behavior
Yes!, like you do above with Method New(curve:nsEasingCurve)
In MX2, we should probably be using Structs as mush as possible for the base objects, but if they are recycled, maybe it wont matter.
One difference from what I’m messing with, is that I read Millisecs in my main loop, and pass that to the animation system. That way I can stop and scale time, which I think is super important. Also, that way I’m sure that all objects have the same time. It does mean a lot of passing nowtime around, and I guess you could put it in a global, but passing it, means you can scale/stop time for some objects/systems, and not for others.
[EDIT] Thinking about this, maybe TimeFunc() should just be replacable, where the default just gets TimeManager.DefaultTime (that in turn returns a mainloop updated Millisecs() ) That would mean no passing of nowtime + a simple way to pause/scale the system, with out sacrificing special timescales if needed
March 29, 2017 at 9:27 am in reply to: Ported particle System "Memory access violation" [SOLVED] #7655Hi nobuyuki, nice to hear from you on this.
(You are of course very welcome to clone back the MX2 port, and make your clone the new base version, I’ll delete mine if you do. )
I think MX2 could do with a good particle system, so I’m not done looking into whats out there, but for now, I’ll be using my animation system that has similarities with your particle system, in that it also tweens between positions, and such.
If you do release that other system, give a heads up! .-)
March 28, 2017 at 7:22 am in reply to: Ported particle System "Memory access violation" [SOLVED] #7640Great, fix confirmed working
(‘m on MacOS Sierra)
Well spotted!
I think implementing the “big fix” is worth looking into, although it is a logical error in the code, MX2 should probably catch it, especially because it is hard to reproduce, and only occurs randomly.
[EDIT] I guess Self.something could be a global, set to something and that case should be allowed…
PS: For anyone interested https://github.com/Difference/argyneParticles4MX2 is updated with the corrected version.
Thanks Mark, I’ll just keep it in mind, when new targets arrive then.
March 27, 2017 at 11:49 am in reply to: Ported particle System "Memory access violation" [SOLVED] #7628I’m thinking it may have something to do with that I changed the Clone() Methods from :Object to dedicated types?
March 27, 2017 at 11:43 am in reply to: Do I have to worry about endianness (for Uint Color) ? #7627I wold always go with never assume anything until properly checked.
Very Zen, but not quite the answer I’m looking for
Mark?
Thanks. I’ll think about making a functional replacement, but I think what I’m looking for is probably more along the lines of not using a bumpmap at all, and only having to add a Shadowcaster.
For now, I think I’ll roll my own shadow overlay.
Thanks Mark, I’ve put the Null issue on github (and also a request for the Elvis operator, which I really enjoy in C# )
Thanks for pointing me towards Variants. They a not a perfect for for my intended use, so I’ve ended up copying std.geom Vec2 and making a Vec1 struct, by removing the y vals and a few methods. If it’s not too weird, maybe MX2 could come with a Vec1 struct , to have a standard for float/int boxing ?
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159Namespace difference.geom#rem monkeydoc Convenience type alias for Vec1\<Int\>.#endAlias Vec1i:Vec1<Int>#rem monkeydoc Convenience type alias for Vec1\<Float\>.#endAlias Vec1f:Vec1<Float>#rem monkeydoc The Vec1 type provides support for 2 component vectors.#endStruct Vec1<T>#rem monkeydoc Vector x coordinate.#endField x:T#rem monkeydoc Creates a new vector.#endMethod New()EndMethod New( t:T )x=tEndMethod New( x:T,y:T )Self.x=xEnd#rem monkeydoc Converts the vector to a vector of a different type.#endOperator To<C>:Vec1<C>()Return New Vec1<C>( x )End#rem monkeydoc Converts the vector to a printable string.#endOperator To:String()Return "Vec1("+x+")"End#rem monkeydoc The X coordinate of the vector.#endProperty X:T()Return xSetter( x:T )Self.x=xEnd#rem monkeydoc Negates the vector components and returns the result.#endOperator-:Vec1()Return New Vec1( -x )End#rem monkeydoc Multiplies the vector by another vector and returns the result.#endOperator*:Vec1( v:Vec1 )Return New Vec1( x*v.x )End#rem monkeydoc Divides the vector by another vector and returns the result.#endOperator/:Vec1( v:Vec1 )Return New Vec1( x/v.x )End#rem monkeydoc Adds another vector to the vector and returns the result.#endOperator+:Vec1( v:Vec1 )Return New Vec1( x+v.x )End#rem monkeydoc Subtracts another vector from the vector and returns the result.#endOperator-:Vec1( v:Vec1 )Return New Vec1( x-v.x )End#rem monkeydoc Scales the vector by a value and returns the result.#endOperator*:Vec1( s:Double )Return New Vec1( x*s )End#rem monkeydoc Inverse scales the vector by a value and returns the result.#endOperator/:Vec1( s:Double )Return New Vec1( x/s )End#rem monkeydoc Adds a value to the vector components and returns the result.#endOperator+:Vec1( s:T )Return New Vec1( x+s )End#rem monkeydoc Subtracts a value from the vector components and returns the result.#endOperator-:Vec1( s:T )Return New Vec1( x-s )End#rem monkeydoc The length of the vector.#endProperty Length:Double()Return xEnd#rem monkeydoc The normal to the vector.#end' #rem monkeydoc Computes the dot product of the vector with another vector.' #end' Method Dot:Double( v:Vec1 )' Return x*v.x+y*v.y' End#rem monkeydoc Computes the distance from this vector to another.#endMethod Distance:Double( v:Vec1 )Return v.x - xEnd#rem monkeydoc Normalizes the vector and returns the result.#endMethod Normalize:Vec1()Return Self/LengthEnd#rem monkeydoc Blends the vector with another vector and returns the result.#endMethod Blend:Vec1( v:Vec1,alpha:Double )Return New Vec1( (v.x-x)*alpha+x )End#rem monkeydoc Gets a string representation for the vector.#endMethod ToString:String()Return SelfEndEnd'#rem monkeydoc Transforms a Vec1\<Int\> by an AffineMat3.'#end'Function TransformVec1i<T>:Vec1i( vec:Vec1i,matrix:AffineMat3<T> )'' Local tmp:=matrix * New Vec1<T>( rect.min.x )'' Return New Vec1i( Round( tmp.x ),Round( tmp.y ) )'EndAm I correct in assuming that choosing gles2 will make Windows desktop (through angle) use DX9 , and gles3 on Windows use DX11 ?
For the desktop target, I’d prefer something that runs out of the box on an office computer running Windows 7 and up. For casual gaming, screensavers and simpler 3D tools, that’s where my main user group is at.
@edzup: Android 5.x+ is honky dory with me, I just want to make sure Android X.x+ and iOS stay in focus.
I also believe the vast majority of mx2 users are and will always be desktop users,
I’ll let you guys argue pro/con gles 2-3, but I really hope that you (Mark) don’t see MX2 as a desktop centric solution
I’m investing heavily in developing our next and future apps for iOS and Android in MX2, and I expect MX2 to actively support these targets in the future.
If not I’m out of here, so please confirm that iOS and Android are still first class targets in the future development of MX2
Yes, take a look at at Canvas.DrawPrimitives()
http://monkey2.monkey-x.com/mx2-docs/mojo-mojo-graphics-canvas-drawprimitives/
@monkeyplotter: My guess is you are not getting the asset or name correct. Here is a complete working example:
Monkey12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394#Import "onemegs.xml"#Import "<std>"#Import "<mojo>"#import "<mojox>"#Import "<tinyxml2>"Using std..Using mojo..Using mojox..Using tinyxml2..Function Main()New AppInstanceNew MyWindow()App.Run()EndClass MyWindow Extends WindowField _tree:TreeViewMethod New()Super.New("XML TreeView Test", 640, 480, WindowFlags.Resizable)Local xml := LoadString( "asset::onemegs.xml" )Local doc := New XMLDocument()If doc.Parse(xml) <> XMLError.XML_SUCCESSPrint "Failed to parse embedded XML!"ReturnEndifLocal _tree := New TreeView_tree.RootNode.Text = "XML document"AddXMLNodeToTree(doc, _tree.RootNode)ContentView = _treedoc.Destroy()EndMethod AddXMLNodeToTree(xmlNode:XMLNode, parent:TreeView.Node)Local str := ""Local xmlElement := xmlNode.ToElement()If xmlElementstr += "<" + xmlNode.Value()Local attrib := xmlElement.FirstAttribute()While attribstr += " " + attrib.Name() + "=~q" + attrib.Value() + "~q "attrib=attrib.NextAttribute()wendstr += ">"Elsestr += xmlNode.Value()EndifLocal treeNode:TreeView.NodeIf strtreeNode = New TreeView.Node(str, parent)EndifLocal xmlChild := xmlNode.FirstChild()While xmlChildIf Not xmlChild.NoChildren()If treeNode Then parent = treeNodeEndifAddXMLNodeToTree(xmlChild, parent)xmlChild = xmlChild.NextSibling()WendEndEnd -
AuthorPosts