Forum Replies Created
-
AuthorPosts
-
After a quick look at SDL2 I am guessing monkey needs to expose the SDL_WINDOWEVENT_EXPOSE event so that apps that don’t use continuous rendering can redraw their window when the OS needs it redrawn.
Monkey12345678910111213141516171819202122232425262728293031Function TestSocketConnect()Local s:=Socket.Connect("google.com",80)Local res:=s.Write("GET / HTTP/1.0~r~n~r~n")While TrueLocal t:=s.Read()If t.Length=0 ExitPrint tWends.Close()EndFunction TestSocketListen()Print "Listening on port 8080"Local s1:=Socket.Listen(8080)If s1=NullPrint "Listen failed"ReturnendifLocal s2:=s1.Accept()Print "Got Connection"While TrueLocal t:=s2.Read()If t.Length=0 ExitPrint tWendPrint "Lost Connection"s2.Close()s1.Close()EndSweet abakobo! I was hoping someone was going to pick this up:)
Will be back this weekend…
This code is in development and no windows support yet but may be of use:
https://github.com/nitrologic/m2/blob/master/vhost/posix.monkey2
https://github.com/nitrologic/m2/blob/master/vhost/socket.monkey2
So 1.04 still works correctly without this mod?
i asked in the interwebs and got this:
http://stackoverflow.com/questions/18544881/sdl-2-0-retina-mac
so maybe try changing modules/mojo/app/window.monkey2[335]
Local sdlFlags:SDL_WindowFlags=SDL_WINDOW_OPENGL |
SDL_WINDOW_ALLOW_HIGHDPIAugust 25, 2016 at 10:37 am in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3444Maybe Mark will chime in.
I assumed mojo would force 60hz for full screen mode and that typical games would simply use native resolution fullscreen mode at 60hz.
I see that for casual /windowed games the desktop frequency is something you can’t control (or even query atm) so yes, a fixed timing strategy is not for everyone (just most of us).
August 24, 2016 at 7:49 pm in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3424I would start with looking at the games included in the bananas folder of monkey2.
None use a timer and all expect OnRender to be called at 60hz as Window.SwapInterval defaults to 1 which means App.RequestRender causes subsequent OnRender to be correctly frame synced.
OK, I don’t understand. You have added a textalign property to labels?
label.Gravity.X=-1 ‘ awesome
None of the nonsensical ‘gravity”
Gravity is a view property in most modern layout engines. From the mojox documentation:
if a view’s layout is “fill”, the view is resized to completely fill its frame; if layout is “float”, the view retains its measured size but is positioned within its frame according to its View.Gravity.
Typically alignment is a feature of a text paragraph left, center, right or justified and hence doesn’t really represent the same property in my mind.
August 24, 2016 at 12:26 pm in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3402IMHO a game should run at 60 Hz or 30 Hz (SwapInterval=1 or SwapInterval=2).
If a game doesn’t run well it is typical to allow the user to downgrade visuals or resolution.
A lot of the code above seems to be based on the premise that it is ok to skip frames because it can be fixed with some kind of algorithm. I’m pretty sure it can’t.
I am trying to upload new version of portmidi and I get this:
Module upload failed: Module belongs to another user
I think you need to be testing for event type of EventType.KeyChar before using contents of event text.
Your opinion is that the use case is pointless? The fact is inlining of method AdvancedUpdate by high volume iterators of AdvancedEntities is a worthy request.
you won’t need casting if you apply good use of Polymorphy. and may be useful for generics as well.
What does this even mean? If you are going to post in a negative manner at least try and do it constructively.
Generics are like macro assembler and can generate very optimal code. They are not pointless.
-
AuthorPosts