Author Topic: 3D in Axe?  (Read 7312 times)

0 Members and 1 Guest are viewing this topic.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
3D in Axe?
« on: July 02, 2011, 08:36:39 pm »
Is 3D possible in Axe? If so can I make a game like maze 3D (on ticalc) in Axe? Also post sprites and code I could use (Axe 5.3b)
This used to contain a signature.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: 3D in Axe?
« Reply #1 on: July 02, 2011, 08:43:28 pm »
3D is definitely possible in Axe. In fact, I've done it before:



You can find the thread I made for this project, which I called YAAR, here. If you want to get an idea for how I did it, I attached a zip file containing the source and executable for it. Feel free to look at my code to learn how it works and maybe write your own engine, or you can just use my engine. If you do the latter, I would request that you please credit me for the raycasting engine in any project you make with it, though.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: 3D in Axe?
« Reply #2 on: July 02, 2011, 08:51:02 pm »
cool I will try it out and can I use some of the source?
This used to contain a signature.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: 3D in Axe?
« Reply #3 on: July 02, 2011, 08:53:11 pm »
Sure, I'm not really doing anything with the engine so you can use it if you like. My only request is that if you use this engine, you credit me for my hard work making it. :)
« Last Edit: July 02, 2011, 08:53:39 pm by Runer112 »

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: 3D in Axe?
« Reply #4 on: July 02, 2011, 08:54:25 pm »
cool I will try it out and can I use some of the source?

I wish you good luck in trying to use it. I looked at it and my head exploded lol xP

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: 3D in Axe?
« Reply #5 on: July 02, 2011, 08:56:13 pm »
Yes I will give credit WOAH +21 RESPECT FOR ONE POST!
This used to contain a signature.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: 3D in Axe?
« Reply #6 on: July 03, 2011, 03:13:53 pm »
Yes my head almost exploded I added sidestepping but not muchI need to figure out what code does piece by piece (I was up all night looking at it(not joking I did))
This used to contain a signature.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: 3D in Axe?
« Reply #7 on: July 03, 2011, 03:27:13 pm »
Keep in mind that this is raycasting, which has more limitations in order to have a reasonable speed on the calculator.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: 3D in Axe?
« Reply #8 on: July 03, 2011, 03:39:18 pm »
Yes but still I will add stuff and I will make a fast less feature version and a slower but more features version
This used to contain a signature.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: 3D in Axe?
« Reply #9 on: July 03, 2011, 03:49:18 pm »
I wondered from this, if it was possible to have true 3D, the kind where you could look up and down. And I found these.

http://www.falloutsoftware.com/tutorials/gl/gl0.htm

http://gamecode.tripod.com/tut/tut03.htm

It actually doesn't seem that complicated to be able to look up and down, I mean, here's the code to make a point look 3D

Code: [Select]
// initialize point

POINT3D point = { 5, -3, 2 };

// find the right position on the screen in 2D coordinates
int x2d = HALFWIDTH + point.x * ViewingDistance / point.z;
int y2d = HALFHEIGHT + point.y * ViewingDistance / point.z;

// project the 3D point to the screen
Pixel(x2d, y2d);

And here's the equations to move the camera

Code: [Select]
x'=z*sin(yaw)+x*cos(yaw)
y'=y
z'=z*cos(yaw)-x*sin(yaw)
x"=x'
y"=y'*cos(pitch)-z'*sin(pitch)
z"=y'*sin(pitch)+z'*cos(pitch)

x"'=y"*sin(roll)+x"*cos(roll)
y"'=y"*cos(roll)-x"*sin(roll)
z"'=z"

Idk how you could do it with planes and textures but, at least with points, it doesn't seem too taxing. :P

I could be completely and utterly wrong though. :S

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: 3D in Axe?
« Reply #10 on: July 03, 2011, 03:53:08 pm »
Yes I figured out how to move it easily but planes and textures like you say are hard but up and down I could not think of code to add for it to work I will try that
This used to contain a signature.