Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Posts posted by jcrapsey

  1. The only engine that comes to mind is the Isogenic Engine.

    Also I have been working on a few myself.


  2. Tiblanc I came up with that exact algorithm, but there is a problem with it (maybe I'm not understanding it completely). When I use that to process the x,y mouse position to 3D, then that 3d position is rendered back to a 2D position in order for it to be visually represented. The Y value is always half of what the position should be, other than that it would be perfect.

    mousePos = {'x':10,'y':20};
    new3D = get3D(mousePos.X,mousePos.Y);
    new2D = get2D(new3D.X,new3D.Y,new3D.Z);
    //This will be my new result
    new2D = {'x':10,'y':10};
    I am guessing this is because of the multiplication from the first algorithm y' = (1/2)*(x + z) + y.

    If you would like to see it visually you can check out an example here.
    The red box represents where the mouse is in 3D space (so I think).

  3. Tiblanc thank you so much for pointing me in the right direction. I have since changed my code to store / manipulate 3D coordinantes. I use a simple algorithm that I found on this forum in order to translate or "project" this data into 2D coordinates that will then render on the screen. Using this algorithm I have reduced all the math in my code to nothing, and the accuracy of my positioning is perfect!

    Algorithm that I use is:

    x' = (x - z);
    y' = (1/2)*(x + z) + y;

    My updated project is here.

    This has produced another problem for me. I would like to get the angle of the users sprite based on the mouse's position in the theoretical 3D space. Is there a way to get 3D position based on the 2D position (with a fixed z) of the mouse? I am using javascript for my logic, but if you have an example in another language or just an idea of how that problem is solved that would be greatly appreciated.

  4. Okay after a little research I started using Math.atan2() in javascript to calculate the angle between my box and my mouse. I added a visual aid in order to see the angle my calculation was producing. It seems really close at 3 different points in the rotation, but it's not perfect. Can anyone tell me if this is the way I should go about this. My plan is to animate a missile away from the box towards the direction from the mouse.

    Here is a snapshot of my work here

    My code that matters is pretty much this.

    var mousePos = {x:0,y:0},
    boxPos = {x:0,y:0}

    //this is where I calculate the angle based on the box's position and my mouse position;
    radians = Math.atan2((mousePos.y) - boxPos.y,mousePos.x - boxPos.x);

    //this gives the marker it's position around my box to visually show the angle
    myMarker.css({ top:Math.sin(radians)*50+boxPos.y , left:Math.cos(radians)*100+boxPos.x });

  5. Okay here is my problem, I have been working on a small little project for a while now and I would to love to add some violence to my little isometric experiment. I wasn't sure if I should have posted this into Web Development or here, but I think for my specific problem here was the better choice.

    So far I only got W,A,S,D movement so you can go ahead and try that out here.

    But I would like that red box to fire a missile every time the user clicks the left mouse button. Does anyone here have any advice, resources or just some tips? I have been doing web development for a while and this is my first attempt at a game so I am just trying to wrap my head around how games are developed.

  6. If you are using jquery maybe you can find what you are looking for here http://jsfiddle.net/7TEsF/1/

    but if I am understanding you correctly are you are trying to use setTimeout() in order to do animations?

    If so you might want to make it into a setTimeout loop and increment your animation accordingly


    var pos = 0;
    (function tick(){
    [color=#1C2837][font=CourierNew, monospace][size=2][color=#660066]Obj[/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#666600].[/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#000000]style[/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#666600].[/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#000000]marginRight[/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#666600]= pos + [/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#008800]'px'[/font][color=#1C2837][font=CourierNew, monospace][size=2][color=#666600];[/font]
    if(pos < 360){

  7. If you are thinking about building a browser based game you might want to consider studying Html CSS and javascript. Some people that are more accustomed to classical type languages (C++/Java) might scoff at the idea of building a game engine with these technologies, but Since the Release of chrome with the V8 engine, javascript has been performing a lot faster. Also you might want to consider server side javascript with node.js so you can do all your programming with one language. With Node you can do use libraries like socket.io in order to keep a constant connection between the server and the client. If you want an example of what I am talking about check out the aves web game engine ( http://www.youtube.c...h?v=Ol3qQ4CEUTo ).
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!