jump to navigation

Search:  

Retrospec Forum » Feedback on Retrospec Utilities

[closed]

Isomot

(12 posts)

Tags:

No tags yet.

  1. Anonymous

    Feedback Here
    Posted 13 years ago #
    Login to Send PM
  2. Anonymous

    Well, Isomot has just been upgraded to version b0.5. now it comes with room darkening, dirty rectangles and a few more improvements.
    Jut go to http://retrospec.sgn.net/game-overview.php?link=isomot and take a look by yourselves smile.gif
    Posted 12 years ago #
    Login to Send PM
  3. Anonymous

    Hi! I was told to post here if I had any problems with Isomot. First of all, let me say that Isomot is fantastic and I absolutely love it smile.gif

    I have a few questions. At the moment, I spawn my character like so:

    CODE
    player.objId = ism_put_free_object(x, y, TOP, 3, 8, 16, (BITMAP *)gfx_game[p_upleft_1].dat, NULL);


    (NOTE: inside of the player struct I assign objId as: ism_id objId;)

    How do you best suggest spawning a character to stand on the ground?

    My second question:

    I have written a nice Pathfinding routine that I want to use with the mouse (clicking a square sends the player in that direction). What I'm looking for is a way to take my mouse_x mouse_y coordinates and convert them to 'free' coordinates so that I can use the below code to get their grid coords!

    CODE
     ism_get_cell_coords(x, y, player.tx, player.ty);
    Posted 12 years ago #
    Login to Send PM
  4. Anonymous

    QUOTE(Nial @ Aug 11 2005, 12:34 PM)
    Hi! I was told to post here if I had any problems with Isomot. First of all, let me say that Isomot is fantastic and I absolutely love it smile.gif

    Glad you like it, and I hope you find it useful too smile.gif

    QUOTE(Nial @ Aug 11 2005, 12:34 PM)
    I have a few questions. At the moment, I spawn my character like so:

    CODE
    player.objId = ism_put_free_object(x, y, TOP, 3, 8, 16, (BITMAP *)gfx_game[p_upleft_1].dat, NULL);


    (NOTE: inside of the player struct I assign objId as: ism_id objId;)

    How do you best suggest spawning a character to stand on the ground?

    Using TOP as the z parameter, just as you do now, the object will be placed as if it had fallen from the sky. If there are no objects under it it will be placed right on the floor, but if there are some it will be placed just over the topmost one. This is an ideal method to build stacks of objects withouth caring about calculating each one's z coordinate, but not the best if you want to put an object right on the floor. To do this, just pass zero as the z parameter, and Isomot will put it just over the floor, unless it crashes with another object when doing so (if this happens, ism_put_free_object will return ID_ERROR) .

    QUOTE(Nial @ Aug 11 2005, 12:34 PM)
    My second question:

    I have written a nice Pathfinding routine that I want to use with the mouse (clicking a square sends the player in that direction). What I'm looking for is a way to take my mouse_x mouse_y coordinates and convert them to 'free' coordinates so that I can use the below code to get their grid coords!

    CODE
     ism_get_cell_coords(x, y, player.tx, player.ty);

    [right][snapback]1262[/snapback][/right]


    Well this is an interesting subject smile.gif
    Problem is a bitmap point doesn't give you a certain iso point, but a proyection line that is perpendicular to the projection plane (the bitmap you are drawing the isometric world to). So, a certain bitmap point matches an infinite number of isometric points. And even then, they depend on the bitmap coordinates you tell Isomot to draw the 0,0,0 isometric point when calling ism_draw_isom_world, which may vary from one frame to the next if you are scrolling, or similar.
    What I could do is a new function on Isomot to calculate the isometric pixel that comes from the intersection of the projection line with a given plane parallel to the floor, that is, the isometric x and y for a given bitmap point, a given isometric z (zero for the floor), and for the last screen coordinates of the 0,0,0 isometric point. That's really easy to do, so it will be there for sure on the next version.
    Anyway, if you don't want to wait a few days until I do this, you can calculate this point by yourself on the floor plane, just by using the following equations:

    x=(mouse_y-y0)/2+(mouse_x-x0)/4
    y=(mouse_y-y0)/2-(mouse_x-x0)/4

    where x0 and y0 are the bitmap's point where you are drawing the isometric 0,0,0 point (the same ones you pass to ism_draw_isom_world).

    ¡Hope that helps!
    Posted 12 years ago #
    Login to Send PM
  5. Anonymous

    I don't mean to hijack this thread but for some reason I can't start my own. Anyway, I'm getting some strange problems using ISOMOT. I'm using MSVC++ 6.0 and using C++ not C. I did extern "C" {
    #include "isomot.h"
    }

    and it was working for a while. But then out of the blue I get this error:

    CODE

    fm_funcion(void, ism_habilitar_rect_sucio, ism_enable_dirty_rect, (char habilitar), (habilitar))


    I don't know what the deal is. Any help would be nice. Thanks.
    Posted 12 years ago #
    Login to Send PM
  6. Anonymous

    Hello,
    Visual Studio compiles files based on the extension. What I did was simply renamed isomot.c to be isomot.cpp and all is well in my project using isomot.

    Neil.
    Posted 12 years ago #
    Login to Send PM
  7. Anonymous

    It's also possible to force C++ by calling up the properties for that specific file and changing the language option.

    However IMO it's better to use the extern "C" { } around the header and compile the C file as C. Not all C is valid C++ so you may get errors reported that aren't 'real'.

    In the future, I suggest that the isomot header should use the #ifdef __cplusplus trick that is commonly used.

    Pete
    Posted 12 years ago #
    Login to Send PM
  8. Anonymous

    QUOTE(peterhull90 @ Nov 17 2005, 10:53 PM)
    In the future, I suggest that the isomot header should use the #ifdef __cplusplus trick that is commonly used.


    Sure, it will.
    So is the header the only one that needs it, or does the .c file need it aswell?
    Posted 11 years ago #
    Login to Send PM
  9. Anonymous

    Just the header

    Pete
    Posted 11 years ago #
    Login to Send PM
  10. Anonymous

    OK, thanks!
    Posted 11 years ago #
    Login to Send PM
  11. Anonymous

    Spam removed, IP added to ban list

    - Wolfy
    Posted 11 years ago #
    Login to Send PM
  12. Anonymous

    Hi .. i need help with isomot .. can someone do me an example .. how to select and move objects on a map.?
    Posted 10 years ago #
    Login to Send PM

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.