Omnimaga

Calculator Community => Casio Calculators => Topic started by: flyingfisch on August 29, 2011, 02:03:23 pm

Title: How do 3d games work?
Post by: flyingfisch on August 29, 2011, 02:03:23 pm
I was wondering about how 3d games work, so I can make one myself. I'd like to know how to make a 3d engine that can do 360 x,y, and z. I'd also like it to be done in luaFX when finished, but I only want to know the basics right now (the theory, formulas, etc.).
Title: Re: How do 3d games work?
Post by: AngelFish on August 29, 2011, 02:06:29 pm
What type of 3d graphics are you talking about? 3D wireframes? Wolfenstein? The jets in your signature? Also, do arbitrary viewpoints have to be supported? What about rotating frames? How high quality does the rendering need to be?

Basically, there's a huge field of stuff out there. It'd help others tremendously if you were a bit more specific about your eventual goals :P
Title: Re: How do 3d games work?
Post by: Ashbad on August 29, 2011, 02:07:09 pm
1) this is in "humor and jokes", which is the wrong place for anything besides funny jokes, obviously :P

2) they work in multiple ways.  Too many ways to sum up in a paragraph, a post, possibly even a thread.  What do you want to work with?  What language?  Low level or high level graphics interfacing?  What *specific* questions?  Did you look at any tutorials first, or do you need help finding some good ones?
Title: Re: How do 3d games work?
Post by: fb39ca4 on August 29, 2011, 02:11:07 pm
Graphics were soooo simple in the 2D days :P
Title: Re: How do 3d games work?
Post by: ralphdspam on August 29, 2011, 02:17:18 pm
http://en.wikipedia.org/wiki/Video_game_graphics#3D
I know that wikipedia is unreliable, but it is a good place to get started.  It barely even scrapes the top, but you can get more of a feel of 3d games.
Title: Re: How do 3d games work?
Post by: AngelFish on August 29, 2011, 03:18:49 pm
http://en.wikipedia.org/wiki/Video_game_graphics#3D
I know that wikipedia is unreliable, but it is a good place to get started.

Wikipedia is unreliable *for certain topics*. As far as technical materials go, it's generally an excellent resource.
Title: Re: How do 3d games work?
Post by: ralphdspam on August 29, 2011, 06:58:30 pm
Wikipedia is unreliable *for certain topics*. As far as technical materials go, it's generally an excellent resource.
/me changes the x86 architecture page.  >:D
(Just kidding)
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 09:34:12 am
OK, what i was talking about is:

Language: LuaFX
Type: Wireframes, First person, Fixed 3d
Rendering: Dont know.


Thanks for that wikipedia article.
Title: Re: How do 3d games work?
Post by: Eiyeron on August 30, 2011, 09:45:11 am
Here Rendering are the types!
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 09:55:22 am
What do you mean?
Title: Re: How do 3d games work?
Post by: Juju on August 30, 2011, 10:23:19 am
I got a whole course at school on 3D, there's a lot of stuff. Also involves matrices.
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 10:25:27 am
Off-topic question: how do you get a spoiler title (Spoiler for...)
Title: Re: How do 3d games work?
Post by: Ashbad on August 30, 2011, 10:26:40 am
[spoiler=topic]stuff[/spoiler]
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 10:29:04 am
thanks
Title: Re: How do 3d games work?
Post by: fb39ca4 on August 30, 2011, 10:46:32 am
Wait, do you want a wireframe first person game? Because fixed 3d means the camera does not move at all.
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 11:03:05 am
Yes. Sorry didnt mean to put fixed 3d there.
Title: Re: How do 3d games work?
Post by: z80man on August 30, 2011, 11:37:13 am
It is very in depth math and covers many concepts of 3d that you will not be implementing in luaFX but one book that really helped me understand a lot of 3d games including optimization for specific architectures was Real Time Rendering. I highly reccomend it to anyone who wants to learn a lot about 3d
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 03:24:01 pm
So in other words, wait until someone gets openGL on a calc. cuz i'm not going to do something that complicated. I think i'll do 2d games instead. could someone help me with the concept of side-scrollers? (LuaFX again)
Title: Re: How do 3d games work?
Post by: annoyingcalc on August 30, 2011, 03:38:20 pm
So in other words, wait until someone gets openGL on a calc. cuz i'm not going to do something that complicated. I think i'll do 2d games instead. could someone help me with the concept of side-scrollers? (LuaFX again)
Ashbad is working on OpenGL84+ somewhere Ill post a link when I find it
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 03:43:13 pm
yeah but i need it on casio fx-98xx
Title: Re: How do 3d games work?
Post by: z80man on August 30, 2011, 08:52:03 pm
I did write a rotating cube example a few months ago in Casio Basic and it was fairly simple. If you want I can upload the source and/or the program and it will run on you fx-98xx because prizm basic programs can be down converted.
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 08:53:25 pm
yeah, but would it help me program in 3d with lua?
Title: Re: How do 3d games work?
Post by: z80man on August 30, 2011, 08:57:28 pm
The math is the same regardless of language and if you know casio basic moderately well then it will be easy to port that example to lua. One thing you will have to add though is be able to convert plot points into screen coordinates but if needed I can help you with that part
Title: Re: How do 3d games work?
Post by: flyingfisch on August 30, 2011, 08:59:46 pm
oh ok. is it commented?

P.S. I am pretty good at BASIC, if I do say so myself.
Title: Re: How do 3d games work?
Post by: Eiyeron on September 04, 2011, 05:09:35 pm
LFX is simply as BASIC? but more powerful.
You can use some functions like Pseudo OP...
Title: Re: How do 3d games work?
Post by: flyingfisch on September 04, 2011, 07:25:14 pm
OK. BTW: veb sent me a demo of LuaFX

Cool menu!

(...and graphics)
Title: Re: How do 3d games work?
Post by: DJ Omnimaga on September 04, 2011, 08:32:48 pm
The math is the same regardless of language and if you know casio basic moderately well then it will be easy to port that example to lua. One thing you will have to add though is be able to convert plot points into screen coordinates but if needed I can help you with that part
I assume in a language like Axe it might be harder, right, due to the lack of floating points? (Although this doesn't really apply here)
Title: Re: How do 3d games work?
Post by: Eiyeron on September 05, 2011, 06:00:28 am
Right, but A firend made a system of emulation fixed points, faster than floating.
Title: Re: How do 3d games work?
Post by: BlakPilar on September 05, 2011, 10:08:59 am
I know this particular thread is for Casio 3D, but does anyone have a good resource for 3D rendering on the computer, preferably in C#? My main problems with understanding 3D are how its data is stored (something like a really huge matrix seems impractical to me, unless only portions are accessed at any given time) and the rendering itself.

If I should start a separate topic, I'm sorry for interrupting this one. Just let me know and I will.
Title: Re: How do 3d games work?
Post by: Ashbad on September 05, 2011, 10:10:34 am
I know this particular thread is for Casio 3D, but does anyone have a good resource for 3D rendering on the computer, preferably in C#? My main problems with understanding 3D are how its data is stored (something like a really huge matrix seems impractical to me, unless only portions are accessed at any given time) and the rendering itself.

If I should start a separate topic, I'm sorry for interrupting this one. Just let me know and I will.

What API/Library are you leaning towards?  Once you choose which path to go with, finding a tutorial is rather simple.
Title: Re: How do 3d games work?
Post by: BlakPilar on September 05, 2011, 10:16:13 am
Well, I'm the kind of person who likes to make things from scratch so I was thinking maybe information about how it all works, but if using a library to start with is better, then I could go with that. If that's the case though, then which one would be the best?
Title: Re: How do 3d games work?
Post by: fb39ca4 on September 05, 2011, 02:08:24 pm
Well, it depends on what platform and hardware you want to use. Making a hardware accelerated API that runs on PCs with modern graphics cards would be *very* hard, but a software rendering library is quite doable.
Title: Re: How do 3d games work?
Post by: BlakPilar on September 05, 2011, 02:32:05 pm
Well, if I did anything 3D by myself, it'd be in C# for now, and therefore .NET based. I guess I could use XNA, but that would just help me learn 3D in XNA, not how a renderer works (or would it?).

So I guess I'm asking if there's any good documentation on 3D rendering in general or, if it'd be easier, for XNA.
Title: Re: How do 3d games work?
Post by: fb39ca4 on September 05, 2011, 02:45:05 pm
Well, you want to read some DirectX tutorials (or OpenGL if you want to use that, but I don't know if XNA supports it). Basically, you will be calling functions which send the individual polygons to the video card for rendering.
Title: Re: How do 3d games work?
Post by: BlakPilar on September 05, 2011, 02:49:58 pm
Could you point me in the right direction? I haven't had much luck by myself.