Page 1 of 3

[Staff][Beta] p3d

Posted: Tue 18 Jul, 2006 3:52 am
by CDI
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.

Image

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

Image

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!)

Posted: Tue 18 Jul, 2006 3:55 am
by DarkAuron
Nifty. :o

Posted: Tue 18 Jul, 2006 3:59 am
by kalan_vod
Great work CDI, I was thinking of doing something of the sort but never got around to it. I really hope you can get a demo of sorts worked out, and perhaps one could work on it in a game if you desire not to make one. Great mock ups, they look amazing!

Posted: Tue 18 Jul, 2006 8:24 am
by tr1p1ea
Looks pretty nifty, and i havent seen one of these engines for a while. I hope you can get some decent speed out of it :).

Posted: Tue 18 Jul, 2006 12:41 pm
by dysfunction
Certainly looks much better than most of that type of engine, and the neat thing is you can get it smoother and smoother just by adding more types of tiles.

Posted: Tue 18 Jul, 2006 1:47 pm
by benryves
Nice :)
Seems to be a bit of a 3D fever running at the moment (which can only be a good thing) -- can't wait to see it in action!

Posted: Tue 18 Jul, 2006 2:46 pm
by Liazon
I like the tile set

p3d

Posted: Tue 18 Jul, 2006 7:31 pm
by CDI
Okay, I have started on the engine, and realized that I could mimic a "eyesight" loading in this fashion.

Image
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)

Posted: Tue 18 Jul, 2006 7:56 pm
by CompWiz
It seems like this engine might not be all that suited to FPS's as they require a high FPS. (don't you love the ambiguity? :twisted: ) Maybe some other kind of puzzle game. Myst might be too complicated though.

Posted: Tue 18 Jul, 2006 9:43 pm
by kv83
How 'bout an RPG, just like the old PC RPG's like Eye of the Beholder

Posted: Tue 18 Jul, 2006 10:43 pm
by CDI
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 =)

Posted: Wed 19 Jul, 2006 2:12 am
by tr1p1ea
You know, you could use xLIB's sprite mirroring function for some of those walls ... might save you some space :).

Posted: Wed 19 Jul, 2006 3:33 am
by DarkAuron
A demo would be fun, then we could hack away with the engine and secretly code a game behind your back :) :twisted:

Posted: Wed 19 Jul, 2006 4:15 am
by CDI
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...
[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
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!

Posted: Wed 19 Jul, 2006 4:30 am
by DarkAuron
*blank stare* :o