Forum Replies Created
-
AuthorPosts
-
don’t suppose you can improve on this?
[/crayon]Monkey1234567[crayon-5cba844204f13537412415 inline="true" ]' boiler plate just to ensure random is different each runlocal tv:timevalgettimeofday( varptr(tv) )local t:long = tv.tv_sec * 1000 + tv.tv_usecSeedRnd(t)see some rather better implementations http://monkey2.monkey-x.com/forums/topic/perlin-noise/
very nice, I especially like the hill method, but notice sometimes a definite plus sign shape in them sometimes.
I assume you realise that seeding with millisecs will often have almost identical results (its millisecs from app start)
but nice work.
…ah jee that should be in the docs!
errr wot!
[/crayon]Monkey123456789101112[crayon-5cba84420f6fb744524975 inline="true" ]Global a:Int[] = New Int[10]global b:Int[][]'Global c:Int[][] = New Int[10][10]'Global d:Int[][] = New Int[10]Int[10]'Global e:Int[][] = New Int[10] New Int[10]Function Main()End Functionif b works why the heck doesn’t c (like a few other languages) – do I really need a loop just to make an empty array?
I honestly don’t see much issue with the API docs, but you need rather more than API docs
Its more about how a module should or could be used, this kind of documentation isn’t the type that you could put in the auto doc comments.
As well as some introductory text – a selection of examples are vital – ideally ones that can be pasted into an IDE and “just work”
I really dont understand Mark’s reticence to engage with the communoty and get help with documentation, guess he just doesnt like money, cause for sure the way the docs are now it must be putting off droves of people…
Scalimg down has always worked finne for me..?
http://monkey2.monkey-x.com/forums/topic/monkey-2-app-template/#post-6538
you’ll need to add
[/crayon]Monkey123[crayon-5cba844218d18075887396 inline="true" ]canvas.Scissor=New Recti( Xoffset*scaleX,Yoffset*scaleY, (960+Xoffset)*scaleX, (540+Yoffset)*scaleY )just before drawing on the canvas
the only caveat might be if a small device has sufficient resources to cope with a large virtual resolution
would it be adequate enough for your purposes to scale to a fixed ratio (ie 16:9) ?
you can render to a large “virtual resolution” and downscale it depending on the screen size
I posted some code that also scissor clips the letter box as needed.
right, got it! the point being & will only work with integrals
its a pity the error message doesn’t include an indication how far along the line the error is, Java does this and its quite handy!
could you explain why? so what if the & 255 is within the brackets it should all be evaluated to a single value cast to an int and put in the variable surely ???
this also fails
[/crayon]Monkey123[crayon-5cba84422248e580450310 inline="true" ]local X:int = Int(Floor(v) & 255)this however works….
[/crayon]Monkey123[crayon-5cba844222493537354097 inline="true" ]local X:int = Int(Floor(v)) & 255I didn’t say they were unimportant, just not as important (by a way!) everything is a balance, but gameplay and balanced (game) rules should be the primary importance, yes presentation is important, but be honest how many so called AAA games have you seen that look gorgeous, yet have really boring gameplay…
I shouldnt worry once you have sussed out how one call back works in detail then any others are obvious !
You can always hold a c ptr in a class field, and an mx2 ptr in a c/c++ user data void pointer, if you c struct or c++ class doesnt have user data then you might add one or make a custom c++ class containing pointer to the c class and a void pointer for the mx2 ptr.
Id love to see the ability to link classes/structs with mx objects, object finalisers (onDestroy method) would be famtastic but the doesnt see much interest…
-
AuthorPosts