Forum Replies Created
-
AuthorPosts
-
Looks like a bug to me. Could you post it on GitHub?
Bump!
Looks fine here… try adding something in the background so you can see the transparency:
[/crayon]Monkey12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455[crayon-5cba9cdf7a104489147340 inline="true" ]#Import "<std>"#Import "<mojo>"Using std..Using mojo..Class BoxField x:Int, y:Int, w:Int, h:IntField color:ColorMethod Draw(canvas:Canvas)canvas.Color = colorcanvas.DrawRect(x, y, w, h)EndEndClass MyWindow Extends WindowField listOfBoxs:List<Box> = New List<Box>Method New()For Local i:Int = 0 To 100Local b:= New Boxb.x = Rnd(0, 640)b.y = Rnd(0, 480)b.w = Rnd(10, 100)b.h = Rnd(10, 100)b.color = New Color(Rnd(.5, 1), Rnd(.5, 1), Rnd(.5, 1), 1)listOfBoxs.AddLast(b)EndEnd MethodMethod OnRender( canvas:Canvas ) OverrideApp.RequestRender() ' Activate this methodFor Local b:Box = Eachin listOfBoxsb.Draw(canvas)Endcanvas.Color = Color.Blackcanvas.DrawRect(100,100,100,100)canvas.BlendMode = BlendMode.Alphacanvas.Color = New Color(0.5, 0.5, 0.5, 0.65)canvas.DrawRect(150,50,200,200)' if key escape then quitIf Keyboard.KeyReleased(Key.Escape) Then App.Terminate()End MethodEnd ClassFunction Main()New AppInstanceNew MyWindowApp.Run()End FunctionYes Millisecs is since the start of the app:
std:std.time.Millisecs
Function Millisecs:Int( )
Gets the number of milliseconds since the app started.Is gettimeofday okay to use?
And.. as for monkeyroids – brilliant fun
I really should finish and improve that example… maybe when I get time
SVG format would be better
On the news in Oz, they said the quake was on the South Island.
Anyway, glad you are safe Mark!
Its nice to have choice… but if I would select one it would be SDL2.
August 23, 2016 at 11:22 pm in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3380I havent executed your code, but looking at your logic you are basing your animations on millisecs but using the FRL update control. This may mean you could get bigger gaps with your millisecs calls.
What I’ve done in the past is calculate the number of millisecs to frame time.
[/crayon]Monkey123456789101112131415[crayon-5cba9cdf89566409559564 inline="true" ]Class FrameField duration:FloatField name:StringField img:ImageMethod New (_name:String,_duration:Int)name= _nameduration = GameTime.CalcFrameTime(_duration)img=Image.Load( "asset::"+_name)img.Handle=New Vec2f( .5,.5 )EndEnd Class[/crayon]Monkey123456[crayon-5cba9cdf8956b081009910 inline="true" ]Class FixedRateLogicTimer...Method CalcFrameTime:Float(ms:Int)Return ms / 1000.0 / (logicFPS / 1.0)EndThen in FrameSet you will increase the frametime by 1*delta…
Windows 10 I guess for the OS…
1000W is a bit overkill these days even with SLI. I may up the RAM depends on the budget
Maybe this’ll help:
https://github.com/rttrorg/rttr
Run Time Type Reflection
An open source library, which adds reflection to C++.Now we just need shaders and make it look like a CRT monitor
For “http” they changed it also to plural, so
while “http” will stay for a while (compatibility),
the new and future-proof spelling is plural: “https”Please say you are joking
(s = secure)
OT: I prefer singular… but I’ve yet created a super large project where I wouldnt want to use assets anyway…
I would really like to work with simon or mark on this and get it all folded int the main or deal with it is a separate project entirely?
Mark?
Submit your work as a Git Pull Request to the main repos.
Looks like the debug modules are not built… try rebuilding or using release mode.
-
AuthorPosts