Windowed ORX

2»

Comments

  • edited October 2011
    ainvar wrote:
    sure I'm wrong with stdcall instead of cdecl in naming the define...well...after few tests I forgot to check the name. :)

    Yes, maybe you're right about the define name but:

    orxFAST_CALL_AS_CDECL means the user must know what his language needs and make proper choices.
    orxDOTNET meand orx must know about the existence of .net.

    I totally agree but it's very similar to the existing __orxWINDOWS__, __orxFREEBASIC__, __orxIPHONE__, etc. The knowledge concerning the calling conventions and the types are in one place in this case. Whereas in your case the user has to know what those are for each platform.
    So happy birthday to your daughter. I have so many things to make that I can live without resizing for a while :) I still have to implement editors for all animations, graphics, bodies and so on...

    Thanks!

    But I got some time tonight anyway so the resize is in. You simply have to call orxDisplay_SetVideoMode() and if the mode are compatible (ie. we're in windowed mode and the depth doesn't change) the window will be resized instead of deleted/recreated.
    I also added AllowResize in the Display config section to allow user-controlled resize using the window's handles.
    Lastly, the viewport are listening for the SetVideoMode event and will resize automatically if they're linked to the screen (ie. no texture bound).

    Let me know if this works for you. :)
  • edited October 2011
    WOW!
    Thank you very much!

    Is it in SVN?



    EDIT : I saw it. I'm gonna test on Ocean
  • edited October 2011
    Ok! It works perfectly!

    Now I have to solve a little problem about window messages and I think I can start the Ocean<->Orx iteraction functions.

    As of now, after forcing the orx window to be a child of a control, the orx window doen't receive window messages.
    I have to investigate more but I guess/hope it's a silly problem.

    Thank you for the modification!
  • edited October 2011
    Hi,

    I've done a modification in orx code and glfw code to allow creating an orx child window.
    The parent handle can be read from a ParentHandle value in the Display section of the main ini file.

    I attach the code of plugind+include+src folders of orx and the full folder of glfw.
    Modifications are tagged with a comment "// AINVAR" so you can search for that comment. I commented the original code.

    For now it seems to work. https://forum.orx-project.org/uploads/legacy/fbfiles/files/orx_1.zip
    orx_1 1.1M
  • edited October 2011
    Thanks, I'll integrate that probably during next week end. Don't hesitate to send a SVN patch next time, this way you won't need to manually add tags. :)
  • edited October 2011
    Ok, the only problem is that I don't have much experience with SVN so I try to minimize the possible damage I can do :)

    Bye
  • edited October 2011
    No worries. :)

    If you're using TortoiseSVN as a windows client, simply right-click on the orx folder and select TortoiseSVN->Create patch.
    Then you can select which modified files you want to include in the patch and it'll generate a patch that will only contain the changes you made. :)
  • edited October 2011
    In a previous message you told me to use orxObject_BoxPick to select objects into a rectangular area.
    I have problems to understand how I should use that.

    I have created a RectangularSelection object using a 1x1 pixel image.

    If I call orxObject_GetBoundingBox of RectangularSelection and use that obox with orxObject_BoxPick the returned object is RectangularSelection. That's ok.

    How can modify the obox to make orxObject_BoxPick to find other objects?

    Another question about Z coords...where are positive Z? near me or behind my monitor? :)

    Cheers.
  • edited October 2011
    ainvar wrote:
    In a previous message you told me to use orxObject_BoxPick to select objects into a rectangular area.
    I have problems to understand how I should use that.

    How can modify the obox to make orxObject_BoxPick to find other objects?

    I'm not sure what you mean with your question but here are the two answers I can think of.

    You can extend the 2D area under which you want to do picking by modifying your box either directly (it's a public structure) or by using the orxOBox_2DSet() function.

    If you want to object 'behind' the first one returned, simply move your box a bit deeper. Or you can also use the Create/DeleteNeighborList to build a list of objects whose box intersect yours.
    Another question about Z coords...where are positive Z? near me or behind my monitor? :)

    Cheers.

    The world is right-handed, X goes right, Y goes down and Z goes away from the camera, into your monitor. :)

    Cheers!
  • edited October 2011
    Hi all,

    news from the editor:

    -It's possible to insert multiple elements into the "world".
    -It's possible to select objects and move them inside the world.
    -Objects are created in the editor with few clicks and the hierarchy is supported.
    -It's possible to save and load scenes.
    -It's possible to edit multiple scenes and for each scene there can be multiple layers.
    -The layer controls the Z coordinate of objects (but for each object in a layer it will be possible to change the default Z coord.)

    Well, the editor is far from being stable because i changed the way files are stored and I had to modify a lot of stuff.
    Before I was using binary files but now I load/save custom ini files (custom because for each object there's one field that help me to reconstruct the class when loading).

    Now that I'm working with ini files i'd like to try to use the orxConfig_* functions to load/save the contents of the scenes, updating the contents in memory.
    As of now, when an object is modified, I save the ini files and force orx to reload the configuration.
    That's slow and it's not the "right" way.
    I'd like to substitute my ini functions with calls to the opxConfig_* functions to add/remove/modify sections in orx engine's memory.

    Where can I find a good example about orxConfig_* functions?
  • edited October 2011
    Hi!

    Nice to see your progress! As for an example of using the orxConfig API, I don't think I have better than ScrollEd.

    I know that I added some functions for EyeCreate's Pey editor, so maybe you can contact him via the forum and ask him about that.
  • edited October 2011
    No problem, I've done it yesterday.
    Now Ocean uses the orxConfig functions when editing and the old ini management for saving/loading the project files.

    Now I need to find the origin of some bugs and work a lot on the user interface.
    Yesterday night I was able to build the first "level" with different objects and load/save it.
    As soon as I started to compose the level I saw the first limits of the current interface. I mean that things could be done faster...

    But for now it's a good start.

    Bye
  • edited October 2011
    How can I hide an object?
    Alpha channel?

    I tried orxObject_Enable but it does not seem to do what I need.



    EDIT: orxObject_Enable works, it's just the coder that is not working :)
  • edited October 2011
    Hehe, that happens sometimes! ;)

    With orxObject_Enable() you'll completely deactivate the object though, not only its rendering.
    If you want to simply hide it (but still keeping the other aspects of your object functional), you can apply an alpha of 0, as you said, or you can also move its Z coordinate outside of the camera frustum or even, more clean and more efficient, listen to the orxRENDER_EVENT_OBJECT_START and when you receive it for your object, simply return orxSTATUS_FAILURE which will abort rendering for it.

    Looking forward to seeing more about Ocean, it looks like it's progressing pretty fast. :)
  • edited October 2011
    Hi all,

    I modified a bit the user interface to make things easier.
    Here's a screenshot. screenshot_ocean1.jpg
  • edited October 2011
    Hi ainvar,

    Your screenshot look really nice, it seems it's a really good starting point.

    Is it possible to test something ? Even if it's not really functionnal, just because I'm curious ... ^^

    Perhaps, in the future, when I have time and if you want, I could help you on that project. I don't promise something, but I'm interrested, for me, the only one problem is the time ... like you and a lot of people :)

    Cheers.
  • edited October 2011
    Oh...thank you! :blush:

    I have nothing ready to test because I had not much time to end few parts of the editor.
    I don't have a running executable in this moment because I'm doing an heavy modification and it's not yet ended :)

    This w.e. I think I'll fix few major bugs and put the last features I need to consider to release a 0.0.0.1 beta of beta version.

    I will appreciate the help of anyone who wants to spend time on this project.
    As soon as I have something usable i'll release all the sources and executables.
    Before that, I have to clean a bit the code and discuss with iarwain (and then release ) about all modifications i've done to the engine (nothing really dramatic).

    Stay tuned!

    ByeBye
  • edited October 2011
    Ok ! I'm waiting, no problem !

    I you want some help on your project, a good idea will be to host your project in a source control system (when your first release will be done) !

    Cheers.
  • edited November 2011
    For who wants to try a version of the Ocean editor, I put an executable in this thread

    I'll continue to inform you about Ocean on the specified thread.

    Bye
Sign In or Register to comment.