Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Hot_Dog on December 30, 2010, 02:29:31 am

Title: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on December 30, 2010, 02:29:31 am
I sadly have no time to work on this myself, but seeing as it can be done using Axe or even Ti-Basic, I decided to throw it out and see what people think.

The idea is to create a 3d engine that uses only 8x8 sprites without the need to distort, rotate or stretch them.  I attached some concept art below.  Notice how the walls all consist of 8x8 sprites.  I also imagine that nothing has to appear in front until the person gets close to it, a concept of distance.

Something like this might take a length of time, but it won't be hard.  I could do something like this using completely Ti-Basic and Correlation if I had the time ;D

If you have questions or comments, I'm afraid I was too tired to talk about this much (I will be happy to discuss it later.)  By the way, I don't see this as smooth scrolling, but rather a person taking one step at a time. 
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: z80man on December 30, 2010, 02:37:16 am
I wouldn't use this for a shooter, but it could be useful for rpg games. Even better if there was some support for people to quickly write their own rpg stories and maps to run on the engine.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on December 30, 2010, 02:53:53 am
THat looks old-skool, but in a cool way, for some reasons. A while ago someone made a raycaster using the home screen. I'm unsure how feasible this would be, though. I guess it might be an idea to try.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Builderboy on December 30, 2010, 03:38:00 am
I think this could definitely be doable, maybe even in correlation ^-^ i think that rotation would have to be at 90 degrees tho, since im not sure you could get enough fidelity with 8x8 for the graphics necessary for full rotations.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on December 30, 2010, 03:42:10 am
Yeah most likely 90°

That said Axcho did it at 30° though. It just looked weird. :P
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Builderboy on December 30, 2010, 03:43:33 am
o.O that sounds cool, where can i find a copy?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: TIfanx1999 on December 30, 2010, 07:27:18 am
This does look pretty interesting. I definitely like the idea! =)/me is considering making some mock-ups of sprites later himself...
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Silver Shadow on December 30, 2010, 07:31:57 am
In OmnomIRC, I saw this: ;D
 
[05:32:13](O) New post by Art_of_camelot in Idea: 3D Engine using nothing http://omniurl.tk/5943/104769
 
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: squidgetx on December 30, 2010, 07:32:58 am
Yeah, me too, and i was like O.o

This sounds pretty interesting, almost just like normal 3D but extremely low-res (8x8 sprites instead of pixels)?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: matthias1992 on December 30, 2010, 09:40:17 am
Good idea. Also the swapping of sprites (one light then one dark then one light etc) creates a depth effect. the biggest problem with 3D on this limited a screen is that sometimes it is hard to see depth.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on December 30, 2010, 10:43:09 am
I think this could definitely be doable, maybe even in correlation ^-^ i think that rotation would have to be at 90 degrees tho, since im not sure you could get enough fidelity with 8x8 for the graphics necessary for full rotations.

Anything other than 90 degrees is almost out of the question  ;D  But I've been wrong before

Good idea. Also the swapping of sprites (one light then one dark then one light etc) creates a depth effect. the biggest problem with 3D on this limited a screen is that sometimes it is hard to see depth.

Yeah, to get a depth effect, one would either have to create dark/light or do a different "wall piece" for every column of 8x8 sprites.  I only made a mockup, but if done right, I think people could actually put different kinds of pieces in one section of wall.

Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Binder News on December 30, 2010, 11:28:59 am
I like it a lot. However, I think 45 degrees would be possible. (I don't know how, just a feeling. I'll think on it more later)
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on December 30, 2010, 12:02:15 pm
I like it a lot. However, I think 45 degrees would be possible. (I don't know how, just a feeling. I'll think on it more later)

Yeah, now that I think about it, 45 degrees and even 22.5 degrees would be possible, if done correctly.  However, without smooth scrolling, 22.5 is a little bit too much.  Also, floors and ceiling are a litle bit more difficult when turning 45 degrees.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Ashbad on December 30, 2010, 05:27:24 pm
hmm, very interesting idea.  Good luck to whoever takes it up O.o

Anyone have a link to that homescreen raycaster?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: z80man on December 30, 2010, 09:06:47 pm
It might be possible to code this as several small programs used as functions which could then later be used in games. You could store map information and textures inside strings and then the sub functions could use that to render a scene.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: leafy on December 30, 2010, 09:26:55 pm
I've seen games do things similar to this, like Doom RPG. It shows the animation for rotation, but locks player movement to 90 degrees.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Builderboy on December 31, 2010, 01:47:00 am
Maybe instead of 22.5 degree turning, it could have 90 degree turning but with 22.5 or smaller degree animations when you turn?  It probably could even be cheated ;D
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on December 31, 2010, 11:00:06 pm
I've seen games do things similar to this, like Doom RPG. It shows the animation for rotation, but locks player movement to 90 degrees.
Oh I think I remember seeing something like that before. I think it was Phantasy Star for the Sega Master System
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: TIfanx1999 on January 01, 2011, 07:52:58 am
I didn't know Phantasy Star was that old! O_o That would be interesting to see in action. =)
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on January 01, 2011, 10:06:00 pm
Yeah it came out in 1987 I think. I got the 3 Sega Genesis ones on the Xbox 360 under Sega Genesis Mega Collection, although dungeons aren't 3D-ish view like the first.

Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: TIfanx1999 on January 02, 2011, 09:15:49 am
Oh, wow... that looks like it would be very confusing to navigate.  O.O
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on January 03, 2011, 08:46:34 pm
hmm, very interesting idea.  Good luck to whoever takes it up O.o

Anyone have a link to that homescreen raycaster?
I forgot about this question, but here is it: http://www.ticalc.org/archives/files/fileinfo/349/34947.html
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: willrandship on January 03, 2011, 10:25:37 pm
I got an engine like this started after I saw the thread. you can't move yet, or turn, but you can change your position in the src file :P for some reason the walls aren't rendering, probably a math error.

And wow, that kinda sucks :P but I guess that's just cause it's BASIC :P amazing for that.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 03, 2011, 11:02:09 pm
I got an engine like this started after I saw the thread. you can't move yet, or turn, but you can change your position in the src file :P for some reason the walls aren't rendering, probably a math error.


At least you started it!  Way to go!  If you continue it, I look forward to seeing how it turns out!
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: willrandship on January 03, 2011, 11:55:10 pm
but yeah, like I said, it's not working. I'd say it was the way I'm referencing the sprites, but that would just give me garbage. Right now it's giving me nothing, which is odd. I'll post some screenies when there's something to look at, and probably the source too. Also, the walls are much higher Detail than most. :) One Sprite column represents one pixel of the Pic1 file it references from :P and right now the sprites dither as they get more distant, from solid black to near-white (white isn't rendered) and you will be able to see ~4-5 layers of walls, going farther away, say, in a corridor. Think like Morrowind's view distance fog   :thumbsup:
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 04, 2011, 12:00:37 am
but yeah, like I said, it's not working. I'd say it was the way I'm referencing the sprites, but that would just give me garbage. Right now it's giving me nothing, which is odd. I'll post some screenies when there's something to look at, and probably the source too. Also, the walls are much higher Detail than most. :) One Sprite column represents one pixel of the Pic1 file it references from :P and right now the sprites dither as they get more distant, from solid black to near-white (white isn't rendered) and you will be able to see ~4-5 layers of walls, going farther away, say, in a corridor. Think like Morrowind's view distance fog   ;D(http://www.omnimaga.org/Themes/default/images/gpbp_arrow_up.gif)

So is it based on the first post with a couple of your own touches thrown in?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on January 04, 2011, 02:55:39 pm
I got an engine like this started after I saw the thread. you can't move yet, or turn, but you can change your position in the src file :P for some reason the walls aren't rendering, probably a math error.

And wow, that kinda sucks :P but I guess that's just cause it's BASIC :P amazing for that.
Yeah the result isn't too great since it's hard to see where you're going, although it's still pretty good for BASIC.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: willrandship on January 04, 2011, 07:26:15 pm
Yep, that's right. I figured since the view distance is so short it shouldn't just cut off. Also, it made more sense to me to do it with the higher resolution, since it's one detection per column. Also, that allows for walls to have different sized holes, perhaps for peeking through a crack you don't fit through :P collision detection (and movement for that matter) are still not implemented.

Hang on, I'll make a mockup screenie of what I mean.

Edit: Who wants a Fake Screenie? :P  :evillaugh:

Sorry for the small size. It's actual calc resolution used for the actual bars (solid black covers full screen)
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 04, 2011, 08:41:09 pm
Wow, I know it's a mockup, but that's impressive
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: willrandship on January 04, 2011, 08:57:45 pm
And, once I get it working, it should work exactly like the screenshot. It'll use pt-offs, drawing back to front. You won't be able to see anything directly to the side of you, but anything in front of and up to 5-6 block to the sides. Still though, it's not showing me anything  :mad:  :banghead: I can't figure out why. Hang on and I'll post the source.

Also, my dithering sprites could be improved. I need 4-5 levels if someone's interested in making some for this.

Edit: Here's a Paste. It expires in a month though, hopefully by then it will be very different :P

http://pastebin.com/pR57e81a
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 04, 2011, 09:42:15 pm
And, once I get it working, it should work exactly like the screenshot. It'll use pt-offs, drawing back to front. You won't be able to see anything directly to the side of you, but anything in front of and up to 5-6 block to the sides. Still though, it's not showing me anything  :mad:  :banghead: I can't figure out why. Hang on and I'll post the source.

Also, my dithering sprites could be improved. I need 4-5 levels if someone's interested in making some for this.

Edit: Here's a Paste. It expires in a month though, hopefully by then it will be very different :P

http://pastebin.com/pR57e81a

I can't help much because of my poor Axe skills.  But will the engine support textures similar to the mockup on the very first post?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: willrandship on January 04, 2011, 09:44:27 pm
Yes, they already do (except it doesn't render) in fact I used those same textures for the mockup :)
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 04, 2011, 09:48:32 pm
Okay, I said it once and I'll say it again, I'm really looking forward to this
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Builderboy on January 05, 2011, 12:16:27 am
I myself might go about making a raycaster using only sprites, i wanna see how this turns out :D
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 05, 2011, 12:18:55 am
I myself might go about making a raycaster using only sprites, i wanna see how this turns out :D

I'm confused: Why do we call it raycasting?  Raycasting and drawing flat sprites are two different things.  Is it because we're so used to the term? 0_0
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Builderboy on January 05, 2011, 12:21:35 am
Oh whoops my bad, i thought this was about performing raycasting operations, but instead of displaying wall slices, display 8x8 sprites.  Hmmm this is interesting, i shall have to think about this
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 05, 2011, 12:23:57 am
Oh whoops my bad, i thought this was about performing raycasting operations, but instead of displaying wall slices, display 8x8 sprites.  Hmmm this is interesting, i shall have to think about this

Ah, that makes sense.  Well, it depends on how you want to go about it, and I guess raycasting operations could work well.  ( Don't let me keep you down ;D )  My idea on the first page was something different from raycasting, so I wouldn't know if it could work or not
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Builderboy on January 05, 2011, 12:27:51 am
Hmmmm so what other methods could be used to display a map in 3D?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Hot_Dog on January 05, 2011, 12:35:35 am
Hmmmm so what other methods could be used to display a map in 3D?

Well to make a long story short, I had in mind an absence of formulas.  Anything other than that is kind of hard for me to explain without doing it myself--which I don't have time for 8)
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on January 05, 2011, 04:03:15 am
Yep, that's right. I figured since the view distance is so short it shouldn't just cut off. Also, it made more sense to me to do it with the higher resolution, since it's one detection per column. Also, that allows for walls to have different sized holes, perhaps for peeking through a crack you don't fit through :P collision detection (and movement for that matter) are still not implemented.

Hang on, I'll make a mockup screenie of what I mean.

Edit: Who wants a Fake Screenie? :P  :evillaugh:

Sorry for the small size. It's actual calc resolution used for the actual bars (solid black covers full screen)
(http://www.omnimaga.org/index.php?action=dlattach;topic=5943.0;attach=5401;image)
Nice. I wonder if the top/bottom parts could maybe use different sprites that are kinda diagonal so it looks smoother?
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: Quigibo on January 05, 2011, 04:31:27 am
Wouldn't it look a lot better to have the top and bottom sprites be triangles to make a smoother transition between slices?  Also, I'm pretty sure it would still be raycasting, but 8 times faster since there are 1/8 as many rays being casted which is plenty fast considering how fast the pure axe raycasters were already.  Any other way of doing it would not allow you to move around as smoothly since you would have to always stay in the center of the path.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: DJ Omnimaga on January 05, 2011, 04:40:11 am
Yeah this is what I meant. I just couldn't find how to explain it.

One idea I had was to simply do the 90° rotation thing like in Phantasy Star or TI-BASIC FPS'es and display walls with different possible depth levels. I would probably need to make an example to explain what I mean.
Title: Re: Idea: 3D Engine using nothing but unaltered 8x8 sprites
Post by: willrandship on January 05, 2011, 04:39:06 pm
Well, it's not really raycasting since walls do not move closer to the screen as you get further away. Also, the mockup I posted is larger than the actual calc screen, and the Black bars will extend all the way to the bottom.

Quigibo, that would work, but I'm not doing it yet. By the way, do you have any idea why my code isn't displaying anything? (I have a paste posted above)