abakobo

Forum Replies Created

Viewing 15 posts - 151 through 165 (of 455 total)
  • Author
    Posts
  • in reply to: how to pass variables by reference to a function? #12851

    abakobo
    Participant

    Mark has been speaking about it but I think it’s in the todo list..

    True that whether you use pointer or array you’ll end with an index!
    Class will slow down your loops.

    in reply to: how to pass variables by reference to a function? #12849

    abakobo
    Participant

    Yes there is two ways:

    The safe one: use a reference based data structure i.e.: Class or Array.
    In your case an array (of size 1) is probably the best solution.

    The “unsafe way” use pointer to pass the variable by reference. You must keep the scope to the variable or you’ll get a fatal “memory access violation” runtime error.

    in reply to: Playniax news #12813

    abakobo
    Participant

    Hi Playniax

    I’ve started to play with pyro2 (pluging box2d+JsonRUBE Reader) but found some little things:

    LayerEllipse and LayerRectangle have ints for their constructors which is bad for debugdrawing/zooming in the physics world. Floats would be better…

    when you unzoom very far you get a memory access violation from the ExpandArray function. Visibly asking for an array too big for the reseved memory or something…
    _zoom is VERY Small 6.7e-007 and the call to ExpandArray maxw=466096c -> maxh=349530 -> creating a HUGE array. Why does Pyro2 needs such array? Again for huge physics world this can be a problem. Isn’t such arrays taking lots of memory when unzooming?

    It would be great if you where making a github repo of pyro2 so we can discuss and improve.

    in reply to: Events and more events.. #12793

    abakobo
    Participant

    but I want do that anonymously not via facebook

    I have no Facebook and I’m backing mx2 via patreon. So yes it’s possible 🙂

    Where and how should I put the source code because I’ve never used Github

    -Create a github accout
    -Fork original mx2 repo
    Repeat
    –browse your github fork to the directory where you want to upload a modified file
    –click on “Upload files” and choose the file(s) (the first time you do it, create a new branch. After that, choose the branch you’ve created.)
    Until all files are uploaded
    -click on compare and make a pull request!

    You can do it with github desktop too but for a one shot it will be simpler via gihub/browser.

    That’s great news that you managed to get it more fluid! Kudos!

    in reply to: Events and more events.. #12777

    abakobo
    Participant

    It would probably be simpler to try pure openGl wich very basic api’s like darwin or carbon…

    Good luck and please make a pull request if you find something sdl2/opengl/mx2/mojo side.

    😉 You could go even further http://wiki.osdev.org/Main_Page 😉

    in reply to: Ted2Go IDE #12759

    abakobo
    Participant

    Indent by fold creates indentation automatically by fold levels. It auto indents all the file by clearing all indentations and then indent all the file according to folding points.

    There’s a well known Notepad++ plugin that does that. It helps a lot in some situation and keeps your brain cooler 😉 else/elsif are not well managed in that plugin though.
    https://www.fesevur.com/indentbyfold/

    in reply to: Events and more events.. #12758

    abakobo
    Participant

    I’d be happy you could find how to get mx2 supper fluid. But it’s becoming too technical for me, I’m affraid I can’t help on that.. And I must say for now I’m not disturbed buy the micro stutters. Doesn’t have SierraHigh though.

    in reply to: Trying to pan and zoom #12757

    abakobo
    Participant

    You can use inverted matrix to reverse the transformation. As for the camera in the center, I pasted a Canvas extension I often use to watch the world “by viewpoint at the center of the screen” so SetCameraByCenter(New Vec2f(0,0)) will place things drawn at 0,0 on the center of the screen. you can even rotate now!

    in reply to: Ted2Go IDE #12752

    abakobo
    Participant

    Hey nerobot great work on the IDE so far.

    I’m personally still dreaming of a folding feature (and an indent by fold feature). Do you plan to work on it some day?
    Can the parser return the lines where a fold can be done (like function, class, multiline if’s,…)
    I’d like to at least make a full file auto indented for my own usage but the problem is detecting multiline if’s..

    in reply to: A better way to set image pixels (With Example) #12751

    abakobo
    Participant

    read this post for pixel by pixel read/write optimisation:

    Faster way to read in pixels?

    in reply to: Static method call without New = Error #12749

    abakobo
    Participant

    This is unrelated really

    sorry, have been reading the code too fast..

    Consts initialization is a weak side of monkey2

    Things have been corrected already, what should be mentioned? To me it’s logical that the code would not work even thought “List” is global (I would have called it “LIST”..). But “List” can be declared in head declarations BEFORE “TEST”. It would have the same effect as it global anyway.
    Do you mean that the fact we can’t make some Forward declaration should be documented?
    An example to illustrate my logic (here there’s no class instance but the global is declared in head declarations):

    About Classes documentation, there’s is a lack about Classes functions. They are not mentioned at all and thus it’s not mentioned that Classes’ functions may not use a class field (“Error : Field ‘xxxx’ cannot be accessed without an instance.”)

    As for a practical working example, wouldn’t a function pointer be more “dynamic”. Here there is a class instance which is Const (and containg only global “fields”)..
    Is all this expected behaviour (note the Const Class has it’s field modified, I suppose it’s the reference that is Const)?

    in reply to: Events and more events.. #12730

    abakobo
    Participant

    you can run/play with the sdl2 banana to see if it’s mojo related, if you still see your micro stutter then you’d probably have to play with xcode and try to get something working out of pure opengl without GC (or sdl2+opengl too)…? I doubt mx2’s GC does those stutters though. I think it’s probably sdl2 too..

    Then when you find the source of the hiccups PLEASE make a Pull Request to the corresponding community and enhance the world of game dev!

    in reply to: Events and more events.. #12709

    abakobo
    Participant

    You code is stressing the computer due to lots of canvas work. Where is the limit? Is any app having jitters? Do you have jitters with this code for example?(I don’t):

    in reply to: Static method call without New = Error #12697

    abakobo
    Participant

    This had changed some months ago. I think it’s to avoid calling uninitialized fields..

    in reply to: Got it to work :) #12696

    abakobo
    Participant

    If you read the December blog post, there’s a explanation on how to use mojo/mojo3d with pure opengl drivers. It could help your need of a perfectly running machine!?

    Cool that you go to the R-Pi way..

Viewing 15 posts - 151 through 165 (of 455 total)