Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Cartesian Chaos - Game.Dev Comp 15 Final Entry

  1. #1

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Hi All,

    I'd like to show you guys the final entry I made for the local Game.Dev competition. The prototype version was previously featured here under the old name 'Monster Maths'.

    The mandate for the competition was to build an educational game which breaks away from the traditionally boring way in which such games are presented. In other words, to build a game that's fun, but happens to be educational at the same time.

    Cartesian Chaos (formerly Monster Maths) is a game based on teaching players about the cartesian plane, starting with quadrants, then X,Y points, and finally line formulas.

    I didn't manage to complete the game in its entirety for the comp, what what is finished is working pretty well, and I'm looking into releasing a commercial version in the months to come.

    See the links below:




    I hope you all enjoy the game.

    Evil_Toaster,
    Retrotoast Studios
    Always nearly there...

  2. #2

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    I already have the previous version , also the name was different "Monsters Math", vry funny game ^^ i liked a lot

    Hey you can tell me how make these light links ?


    *sorry my english
    From brazil (:

    Pascal pownz!

  3. #3

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    [quote="arthurprs"]I already have the previous version , also the name was different "Monsters Math", vry funny game ^^ i liked a lot

    Hey you can tell me how make these light ]

    Thanks.

    The lightning? It's a little complicated. The lightning is made of eight 512x64 images which I cycle through.

    I use the asphyre graphics library, which allows you to draw a quad with 4 arbitrary vertices. (The library you use will need to support that) To draw the lightning, I start with having a beginning and an end point, but I actually need 4 points. So, I map two points per side out at an angle of 90 degrees from the line formed by the start and end points. This is done with vector maths. To find this, you go something like:

    [pascal]
    LineVector := PointReal(End.X-Start.X,End.Y-Start.Y);
    PerpVector := NormaliseXY(-LineVector.Y,LineVector.X); // Find normalised vector perpendicular to line.
    { To normalise, Divide the vector's X and Y by its magnitude (length), calculated by going Magnitude = Sqrt(Sqr(Vector.X)+Sqr(Vector.Y)) }
    Points[0].X := Start.X + MultiplyVector(PerpVector,32);
    Points[0].Y := Start.Y + MultiplyVector(PerpVector,32);
    Points[1].X := Start.X + MultiplyVector(PerpVector,-32);
    Points[1].Y := Start.Y + MultiplyVector(PerpVector,-32);
    Points[2].X := End.X + MultiplyVector(PerpVector,32);
    Points[2].Y := End.Y + MultiplyVector(PerpVector,32);
    Points[3].X := End.X + MultiplyVector(PerpVector,-32);
    Points[3].Y := End.Y + MultiplyVector(PerpVector,-32);

    // Draw the image using Points
    [/pascal]

    This basically gives you a rotated rectangle, which is centered on, and between the line formed by the Start and End points

    In Asphyre, you also need to ensure that those points are drawn in a clockwise order. Not too sure how I did that, I just tried different things until it worked.
    Always nearly there...

  4. #4

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Thx for the reply, i think i have understand but what is draw with 4 vectices ?
    From brazil (:

    Pascal pownz!

  5. #5

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Quote Originally Posted by arthurprs
    Thx for the reply, i think i have understand but what is draw with 4 vectices ?
    To put it simply, a vertice is a point. In 2D, it's (x,y), in 3D it's (x,y,z). A number of vertices make up a shape:
    2 vertices: Line
    3 vertices: Triangle
    4 vertices: Quad
    etc

    So what I mean by drawing with 4 vertices is instead of a draw function which accepts an X, Y, Width, Height, you need one that will accept 4 vertices (points) to draw.
    Always nearly there...

  6. #6

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Quote Originally Posted by Evil_Toaster
    Quote Originally Posted by arthurprs
    Thx for the reply, i think i have understand but what is draw with 4 vectices ?
    To put it simply, a vertice is a point. In 2D, it's (x,y), in 3D it's (x,y,z). A number of vertices make up a shape:
    2 vertices: Line
    3 vertices: Triangle
    4 vertices: Quad
    etc

    So what I mean by drawing with 4 vertices is instead of a draw function which accepts an X, Y, Width, Height, you need one that will accept 4 vertices (points) to draw.
    2d with 4 points :?

    looks vry strange to me :?
    From brazil (:

    Pascal pownz!

  7. #7

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Quote Originally Posted by arthurprs
    Quote Originally Posted by Evil_Toaster
    Quote Originally Posted by arthurprs
    Thx for the reply, i think i have understand but what is draw with 4 vectices ?
    To put it simply, a vertice is a point. In 2D, it's (x,y), in 3D it's (x,y,z). A number of vertices make up a shape:
    2 vertices: Line
    3 vertices: Triangle
    4 vertices: Quad
    etc

    So what I mean by drawing with 4 vertices is instead of a draw function which accepts an X, Y, Width, Height, you need one that will accept 4 vertices (points) to draw.
    2d with 4 points :?

    looks vry strange to me :?
    Well how about looking at it this way. A draw function defined as:
    Draw(X, Y, Width, Height : Real);

    If you call it using:
    Draw(0,0, 64, 32);

    It will draw a rectangle with the following 4 points:
    Point1: (0,0)
    Point2: (64,0)
    Point3: (0,32)
    Point4: (64,32)

    You could write a different function which accepts 4 points instead:
    Draw(Point1, Point2, Point3, Point4 : TPointReal);

    And call it using:
    Draw(PointReal(0,0),PointReal(64,0),PointReal(0,32 ),PointReal(64,32));

    Both functions do exactly the same thing in this case, but the second function (if implemented correctly) would allow you to draw something using -any- 4 points, whereas the first will limit you to squares and rectangles aligned with the X and Y axis.
    Always nearly there...

  8. #8

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Quote Originally Posted by Evil_Toaster
    Quote Originally Posted by arthurprs
    Quote Originally Posted by Evil_Toaster
    Quote Originally Posted by arthurprs
    Thx for the reply, i think i have understand but what is draw with 4 vectices ?
    To put it simply, a vertice is a point. In 2D, it's (x,y), in 3D it's (x,y,z). A number of vertices make up a shape:
    2 vertices: Line
    3 vertices: Triangle
    4 vertices: Quad
    etc

    So what I mean by drawing with 4 vertices is instead of a draw function which accepts an X, Y, Width, Height, you need one that will accept 4 vertices (points) to draw.
    2d with 4 points :?

    looks vry strange to me :?
    Well how about looking at it this way. A draw function defined as:
    Draw(X, Y, Width, Height : Real);

    If you call it using:
    Draw(0,0, 64, 32);

    It will draw a rectangle with the following 4 points:
    Point1: (0,0)
    Point2: (64,0)
    Point3: (0,32)
    Point4: (64,32)

    You could write a different function which accepts 4 points instead:
    Draw(Point1, Point2, Point3, Point4 : TPointReal);

    And call it using:
    Draw(PointReal(0,0),PointReal(64,0),PointReal(0,32 ),PointReal(64,32));

    Both functions do exactly the same thing in this case, but the second function (if implemented correctly) would allow you to draw something using -any- 4 points, whereas the first will limit you to squares and rectangles aligned with the X and Y axis.
    WoW thx for the explanation, look looks fine to my mind

    and sorry for disturbing
    From brazil (:

    Pascal pownz!

  9. #9

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Quote Originally Posted by arthurprs
    WoW thx for the explanation, look looks fine to my mind

    and sorry for disturbing
    No problem, I hope it helps you. I know I spent long enough figuring out how to do such things.
    Always nearly there...

  10. #10

    Cartesian Chaos - Game.Dev Comp 15 Final Entry

    Congratulations to Evil Toaster for winning the game programming competition over at http://forums.tidemedia.co.za/nag/showthread.php?t=579
    and
    http://mailowl.co.za/wordpress/?p=159
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •