## [Staff][Beta] p3d

**Moderator:** MaxCoderz Staff

- CDI
- Maxcoderz Staff
**Posts:**317**Joined:**Tue 24 May, 2005 7:25 pm**Location:**If I find out, you'll be first to know.-
**Contact:**

### [Staff][Beta] p3d

This is just something a bit too much fun to be worth it. It's probably never going to be made into a game, but I never know. What it is, is a psudeo 3d engine in BASIC. By using Pic files and xLIB I can generate somewhat realistic 3d scenes (looking VERY blocky, but reasonable) Using only 2 sets of tiles, (walls and doors... celings and floors = NO) and a bit of math, the results are pretty decent. I haven't any 100% working engines as of now, but I am working on it. What I do have is mockups and tiles!

Keep in mind, that this is BASIC, and probably will not ever be fast.

is the tiles and ingame pics (without hud of course!)

Is how you see the walls in 2d and 3d (2d is top down)

There isn't anything really useful for this, but I thought I'd give it a shot, besides, all I really want to do is make a scene where you walk into a big room and can see the tiny walls for a good distance (like in the first pic!)

Keep in mind, that this is BASIC, and probably will not ever be fast.

is the tiles and ingame pics (without hud of course!)

Is how you see the walls in 2d and 3d (2d is top down)

There isn't anything really useful for this, but I thought I'd give it a shot, besides, all I really want to do is make a scene where you walk into a big room and can see the tiny walls for a good distance (like in the first pic!)

Last edited by CDI on Mon 24 Jul, 2006 4:59 pm, edited 2 times in total.

- dysfunction
- Calc Master
**Posts:**1454**Joined:**Wed 22 Dec, 2004 3:07 am**Location:**Through the Aura

- CDI
- Maxcoderz Staff
**Posts:**317**Joined:**Tue 24 May, 2005 7:25 pm**Location:**If I find out, you'll be first to know.-
**Contact:**

### p3d

Okay, I have started on the engine, and realized that I could mimic a "eyesight" loading in this fashion.

This is my refrence, I can load the blue wall first (if need be), if it is there, then I can ignore the Dark Grey, Dark Yellow, Dark Blue, Brown, Dark Green, Green, Light Red, Light Green, and Cyan walls.

This way, I can speed things up where the walls are closer to you, by loading the screens away from you (does that make any sense?), I only need 30 screens though (I can (in the future) use more than 1 object to a screen with fancy math) 15 for the walls, and 15 for the doors, I can later add in objects and/or more "tiles" later, I am working on making the "tiles" in 64x96 screens so I can load them onto the calc and test my engine's speed.

I cannot imagine it being all that speedy, but I can make it run faster than most of the ones I have made, do you guys have any ideas for what this could be used for though? (I was thinking, simple BASIC FPS, or maybe a Myst like game)

This is my refrence, I can load the blue wall first (if need be), if it is there, then I can ignore the Dark Grey, Dark Yellow, Dark Blue, Brown, Dark Green, Green, Light Red, Light Green, and Cyan walls.

This way, I can speed things up where the walls are closer to you, by loading the screens away from you (does that make any sense?), I only need 30 screens though (I can (in the future) use more than 1 object to a screen with fancy math) 15 for the walls, and 15 for the doors, I can later add in objects and/or more "tiles" later, I am working on making the "tiles" in 64x96 screens so I can load them onto the calc and test my engine's speed.

I cannot imagine it being all that speedy, but I can make it run faster than most of the ones I have made, do you guys have any ideas for what this could be used for though? (I was thinking, simple BASIC FPS, or maybe a Myst like game)

- CDI
- Maxcoderz Staff
**Posts:**317**Joined:**Tue 24 May, 2005 7:25 pm**Location:**If I find out, you'll be first to know.-
**Contact:**

That would be very possible, and fun at that.

I have all 30 images on my calc now, now I need to write the flipping code (oh so much fun) and test it with real(1...

atm, with real(3 on my 83+ I can get all 30 in about 2 seconds from archive (23010b of data!) I can't imaging real(1 being all that much slower. And rendering the screen can't be all that slow unless you are in a very large room because it renders away from you.

I also have a nice little map that should test everything I need it to, sooner or later I'll have a demo up for it so people can nitpick at it =)

I have all 30 images on my calc now, now I need to write the flipping code (oh so much fun) and test it with real(1...

atm, with real(3 on my 83+ I can get all 30 in about 2 seconds from archive (23010b of data!) I can't imaging real(1 being all that much slower. And rendering the screen can't be all that slow unless you are in a very large room because it renders away from you.

I also have a nice little map that should test everything I need it to, sooner or later I'll have a demo up for it so people can nitpick at it =)

- CDI
- Maxcoderz Staff
**Posts:**317**Joined:**Tue 24 May, 2005 7:25 pm**Location:**If I find out, you'll be first to know.-
**Contact:**

I indeed am using xLIBs mirror function =) but I have 15 walls and 15 doors. I also have a neat little treat for anyone that wants to see something painful...

That is the code to draw the screen. Aside from simple optimizations (I can get on those later) how is it? Oh, and this is the pic files I am using, they are .PNG atm, but meh. I have them on calc now![A](C+(E=3)-(E=1),D+(E=2)-(E=4

If Ans:Then

real(3,1+15(Ans=2),2,0

Else

[A](C+2(E=3)-2(E=1),D+2(E=2)-2(E=4

If Ans:Then

real(3,2+15(Ans=2),2,0

Else

[A](C+3(E=3)-3(E=1),D+3(E=2)-3(E=4

If Ans

real(3,3+15(Ans=2),2,0

[A](C+2(E=3)-2(E=1)+(E=4)-(E=2),D+2(E=2)-2(E=4)+(E=3)-(E=1

If Ans:Then

real(3,6+15(Ans=2),2,0

Else

[A](C+3(E=3)-3(E=1)+(E=4)-(E=2),D+3(E=2)-3(E=4)+(E=3)-(E=1

If Ans

real(3,9+15(Ans=2),2,0

End

[A](C+2(E=3)-2(E=1)+(E=2)-(E=4),D+2(E=2)-2(E=4)+(E=1)-(E=3

If Ans:Then

real(1,0,0,12,63,6+15(Ans=2),0,0,2,1,0

Else

[A](C+3(E=3)-3(E=1)+(E=2)-(E=4),D+3(E=2)-3(E=4)+(E=1)-(E=3

If Ans

real(1,0,0,12,63,9+15(Ans=2),0,0,2,1,0

End

End

[A](C+(E=3)-(E=1)+(E=4)-(E=2),D+(E=2)-(E=4)+(E=3)-(E=1

If Ans:Then

real(3,5+15(Ans=2),2,0

Else

[A](C+2(E=3)-2(E=1)+(E=4)-(E=2),D+2(E=2)-2(E=4)+(E=3)-(E=1

If Ans:Then

real(3,8+15(Ans=2),2,0

Else

[A](C+2(E=3)-2(E=1)+2(E=4)-2(E=2),D+2(E=2)-2(E=4)+2(E=3)-2(E=1

If Ans:Then

real(3,11+15(Ans=2),2,0

Else

[A](C+3(E=3)-3(E=1)+2(E=4)-2(E=2),D+3(E=2)-3(E=4)+2(E=3)-2(E=1

If Ans

real(3,13+15(Ans=2),2,0

End

End

End

[A](C+(E=3)-(E=1)+(E=2)-(E=4),D+(E=2)-(E=4)+(E=1)-(E=3

If Ans:Then

real(1,0,0 12,63,5+15(Ans=2),0,0,2,1,0

Else

[A](C+2(E=3)-2(E=1)+(E=2)-(E=4),D+2(E=2)-2(E=4)+(E=1)-(E=3

If Ans:Then

real(1,0,0,12,63,8+15(Ans=2),0,0,2,1,0

Else

[A](C+2(E=3)-2(E=1)+2(E=2)-2(E=4),D+2(E=2)-2(E=4)+2(E=1)-2(E=3

If Ans:Then

real(1,0,0,12,63,11+15(Ans=2),0,0,2,1,0

Else

[A](C+3(E=3)-3(E=1)+2(E=2)-2(E=4),D+3(E=2)-3(E=4)+2(E=1)-2(E=3

If Ans

real(1,0,0,12,63,13+15(And=2),0,0,2,1,0

End

End

End

End

[A](C+(E=4)-(E=2),D+(E=3)-(E=1

If Ans:Then

real(3,4+15(Ans=2),2,0

Else

[A](C+(E=3)-(E=1)+(E=4)-(E=2),D+(E=2)-(E=4)+(E=3)-(E=1

If Ans:Then

real(3,7+15(Ans=2),2,0

Else

[A](C+(E=3)-(E=1)+2(E=4)-2(E=2),D+(E=2)-(E=4)+2(E=3)-2(E=1

If Ans:Then

real(3,10+15(Ans=2),2,0

Else

[A](C+2(E=3)-2(E=1)+2(E=4)-2(E=2),D+2(E=2)-2(E=4)+2(E=3)-2(E=1

If Ans:Then

real(3,12+15(Ans=2),2,0

Else

[A](C+2(E=3)-2(E=1)+3(E=4)-3(E=2),D+2(E=2)-2(E=4)+3(E=3)-3(E=1

If Ans:Then

real(3,14+15(Ans=2),2,0

Else

[A](C+3(E=3)-3(E=1)+3(E=4)-3(E=2),D+3(E=2)-3(E=4)+3(E=3)-3(E=1

If Ans

real(3,15Ans,2,0

End

End

End

End

End

[A](C+(E=2)-(E=4),D+(E=1)-(E=3

If Ans:Then

real(1,0,0,12,63,4+15(Ans=2),0,0,2,1,0

Else

[A](C+(E=3)-(E=1)+(E=2)-(E=4),D+(E=2)-(E=4)+(E=1)-(E=3

If Ans:Then

real(1,0,0,12,63,7+15(Ans=2),0,0,2,1,0

Else

[A](C+(E=3)-(E=1)+2(E=2)-2(E=4),D+(E=2)-(E=4)+2(E=1)-2(E=3

If Ans:Then

real(1,0,0,12,63,10+15(Ans=2),0,0,2,1,0

Else

[A](C+2(E=3)-2(E=1)+2(E=2)-2(E=4),D+2(E=2)-2(E=4)+2(E=1)-2(E=3

If Ans:Then

real(1,0,0,12,63,12+15(Ans=2),0,0,2,1,0

Else

[A](C+2(E=3)-2(E=1)+3(E=2)-3(E=4),D+2(E=2)-2(E=4)+3(E=1)-3(E=3

If Ans:Then

real(1,0,0,12,63,14+15(Ans=2),0,0,2,1,0

Else

[A](C+3(E=3)-3(E=1)+3(E=2)-3(E=4),D+3(E=2)-3(E=4)+3(E=1)-3(E=3

If Ans

real(1,0,0,12,63,15Ans,0,0,2,1,0

End

End

End

End

End

Last edited by CDI on Wed 19 Jul, 2006 5:29 am, edited 1 time in total.