Arjailer

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 62 total)
  • Author
    Posts
  • in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3446

    Arjailer
    Participant

    As I say, all SwapInterval does is call SDL_GL_SetSwapInterval(), which just enables vsync – it doesn’t force any particular frequency.

    So just setting SwapInterval won’t do what you want, but yes if you explicitly set a 60hz (presumably fullscreen) mode then you’re probably good to go  🙂

    Edit: that was in response to Simon  🙂

    in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3441

    Arjailer
    Participant

    As peterigz says, given all the different hardware available I don’t think it’s as simple as “default SwapInterval to 1 and never have to do delta timing again”.

    Looks like SwapInterval just sets SDL_GL_SetSwapInterval(), which when set to 1 means “updates synchronized with the vertical retrace” – i.e. it enables vsync, so updates are then linked to your monitors refresh rate.

    Great if all monitors were 60hz. But monitors that runs at different frequencies will update a different number of times per seconds (e.g. 60hz, 75hz, 120hz, 144hz). So if you write fixed logic assuming 60hz and run it on a non-60hz monitor your game would run at a different speed  🙁

    Plus there are plenty of examples out there of PCs/GPUs just not honouring vsync, which again would break your game.

    I just don’t see how we can avoid delta timing – I see it as a fundamental part of ensuring your game runs properly on “every PC” and I’ve never seen anything magical that would take that burden away, and given the complexity of PCs, I doubt we ever will.

    in reply to: Issue with CopyPixmap #3234

    Arjailer
    Participant

    I just added this to flip the image the correct way up:

    in reply to: Issue with CopyPixmap #3232

    Arjailer
    Participant

    I’ve also been trying to add “screenshot” code and am seeing the same flipped image.

    in reply to: What do you do if it parses fine but the linker throws up? #3083

    Arjailer
    Participant

    I’m getting the same error if I have a class who’s methods are not directly called by any static code.

    The class in question is created by a factory class which can return one of many implementations of an interface. One of those implementations contains the only call to a particular method in another class. Compilation fails with the same error “source is a pointer to incomplete type”.

    If I add a call to the method in question from somewhere else in the codebase then it compiles fine, but that’s a bit daft, and as it stands I can’t proceed with my current design (which worked fine in Monkey X, C# etc)  🙁

    Unfortunately I can’t replicate in a test harness either  🙁

     

    Edit: Having just read MikeHart’s comment above I changed my code to declare the objects without = Null at the end and now it works! Wha?

    Edit: Also I can now replicate it with a small test harness (by adding an = Null). Build app.monkey2 in the attached zip and it should fail. If you remove the = Null from the end of the line Field globalState:GlobalState = Null in logic.monkey2 or put all the code together in one file it should work. Any one know why?

    Attachments:
    1. example.zip
    in reply to: Generic function types? #2889

    Arjailer
    Participant

    Hmmm … I’m getting myself confused …

    I was writing tests for a generic class and wanted to test it with various types. To do this I was having to write two methods for each test, sort of like:

    This was getting a bit tedious, so I was looking for a way to cut this down a bit.

    But thinking about it again there’s two obvious problems with that:

    • What I was trying to do was nonsense (I somehow convinced myself that what I was trying to do was possible in C#, but it’s not – total brain-fart)
    • I don’t need to test it with different types – one is enough (another brain-fart)

    So, sorry to waste your time  🙂

    in reply to: Can't debug #2745

    Arjailer
    Participant

    Looks like the problem is the call to _process.WriteStdin() in Console.WriteStdin():

    Unhandled exception at 0x771161BC (ntdll.dll) in ted2.exe: 0xC0000005: Access violation reading location 0x77D2E2B1.

    Unfortunately the Process class is C++ so not sure how to debug any further and I can’t read assembler to save myself  🙂

    I’ve been trying to write a simple test using the Process class, but I can’t get past “type Process not found”.

    I’ll keep trying.

    in reply to: Application exit code #2665

    Arjailer
    Participant

    Thanks – I’ll give it a whirl  🙂

    in reply to: Fatal error on build: Broken declaration in scope. #2632

    Arjailer
    Participant

    BendMode is an Enum. Do:

    Not sure why putting it in an Int ever worked – it shouldn’t have.

    Edit: actually, I’m wrong – the Implicit Type Conversions section in the help says putting it in an Int should work.

    in reply to: Ted 2 on Mac OSX #2627

    Arjailer
    Participant

    I’ve logged it as a issue.

    in reply to: Ted 2 on Mac OSX #2585

    Arjailer
    Participant

    Okay – figured it out – was spaces in the path.

    I had it in “~/development/monkey 2” – removed the space and it now works.

    Spaces in the path are fine in Windows 7 and 10.

    Nice to get it working on my MacBook  🙂

    in reply to: Image.Radius #2573

    Arjailer
    Participant

    <nods> that makes sense – I had left the handle at 0,0.

    Thanks for the explanation  🙂

    in reply to: Ted 2 on Mac OSX #2572

    Arjailer
    Participant
    • Monkey2 (Macos).app – yep, using that.
    • ~/monkey2 installation folder – my folder is deeper, will try moving it to a shallower folder later.
    • Permissions – not convinced – it creates the built app fine, which I can run manually, it just doesn’t run it from Ted and there’s no error, just “Done”. I’ll check later though.
    • ~/monkey2/tmp – yep, that’s there.
    in reply to: Ted 2 on Mac OSX #2556

    Arjailer
    Participant

    OSX is 10.11.6 as stated (the latest version).

    Latest command line tools installed (at least I ran the command in the readme and it said they were already installed).

    I habitually keep all my computers and software up to date (I loooove an update) apart from my work machine, which they’re keeping on Windows 7.


    Arjailer
    Participant

    Just realised I reflexively downloaded the 64-bit version by mistake. The 32-bit version of https://www.microsoft.com/en-us/download/details.aspx?id=52982 works fine  🙂

Viewing 15 posts - 31 through 45 (of 62 total)