Discuss Scratch

epicsandwich123
Scratcher
100+ posts

How To Make A 3D Game

Villager303 wrote:

Try this XD

when green flag clicked
go to x: (10) y: (10) z:(10)
get 3d model (http://static.fjcdn.com/pictures/Well+hello+there....+Cake+or+pie_48e3b4_3636572.jpg)
set camera pos x: (0) y: (0) z: (0)
set camera point of interest x: (10) y: (10) z: (10)
render 3d objects
change camrea pos x: (.5) y: (10) z: (-10)
end
end
end
guys im not sure he wants 3d wireframe but something like this http://scratch.mit.edu/projects/25217786/
nwolf2012
Scratcher
20 posts

How To Make A 3D Game

epicsandwich123 wrote:

Villager303 wrote:

Try this XD

when green flag clicked
go to x: (10) y: (10) z:(10)
get 3d model (http://static.fjcdn.com/pictures/Well+hello+there....+Cake+or+pie_48e3b4_3636572.jpg)
set camera pos x: (0) y: (0) z: (0)
set camera point of interest x: (10) y: (10) z: (10)
render 3d objects
change camrea pos x: (.5) y: (10) z: (-10)
end
end
end
guys im not sure he wants 3d wireframe but something like this http://scratch.mit.edu/projects/25217786/

I'm ok with any 3D as long it's not way too hard.
cv88
Scratcher
50 posts

How To Make A 3D Game

to make a 3d game, it seriously depends on what angle you look at it (literally and as a turn of phrase). What most people start of is from the angle of the object's perspective, as it is slightly easier. You will generally need to have a main sprite, maybe that can be turned on and off, and have multiple costumes, wich is like the “dashboard” for say, an aeroplane. Now you have to think about the actual 3d aspect. Think about it, if our coding in scratch, but 3d, NEVER use the “x” and “y” coordinates that scratch makes. Make your own x y and z variables, along with, speed, and then ANOTHER set of x, y, and z coordinates, but these are for direction. The most time-consuming aspect is getting the landscapes right. If you want self-generated randomly landscapes, have an in-built program that makes lot of different “clone” sprites that lkeep making costumes and photographing every different angle from every different position. If you think that too complicated, and just want to make your own landscape that will always be the same when you run the project, then I suggest using some 3d technology like “Sketchup”. Take screenshots of every different angle, from every different position, upload them into scratch, then have ONE sprite that is always at the back, and according to the variables listed earlier will show each different screenshot.For the controls, just use a simple e=mc squared, ,and turn the thrust into speed. Use the up, down, left and right arrow keys to change your angle variables. Hopefully this will make it easier for you to make a 3d game.
D-Ray_Pykies
New Scratcher
2 posts

How To Make A 3D Game

please help me!, i'm not using scratch download
Catsana
Scratcher
1 post

How To Make A 3D Game

How do you make a simple game and pls after tell me how to make a 3d game im new! Oh pls im called [removed - please don't give out personal information] in real life by the way!

Last edited by Harakou (Sept. 26, 2014 19:08:20)

dmar1223
Scratcher
4 posts

How To Make A 3D Game

Can someone post 3d code here? all the scripts? I cant use scratch on my pc but I can use a substitute: BYOB. I cant view projects or the editor, so I need help. Post the code here plz.
scratchergino
New Scratcher
1 post

How To Make A 3D Game

guys i need help too im still sor how to do 3d games on scratch
NintendofanEB
Scratcher
12 posts

How To Make A 3D Game

I want like Zelda 3d for my game!
()
I have no Idea!!!!!!!!!!!!!!!!!!!!!!!! how to do it!!!!!!!!!!!!!!!!!!!!!!!!!!! help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
MegaApuTurkUltra
Scratcher
1000+ posts

How To Make A 3D Game

cv88 wrote:

to make a 3d game, it seriously depends on what angle you look at it (literally and as a turn of phrase). What most people start of is from the angle of the object's perspective, as it is slightly easier. You will generally need to have a main sprite, maybe that can be turned on and off, and have multiple costumes, wich is like the “dashboard” for say, an aeroplane. Now you have to think about the actual 3d aspect. Think about it, if our coding in scratch, but 3d, NEVER use the “x” and “y” coordinates that scratch makes. Make your own x y and z variables, along with, speed, and then ANOTHER set of x, y, and z coordinates, but these are for direction. The most time-consuming aspect is getting the landscapes right. If you want self-generated randomly landscapes, have an in-built program that makes lot of different “clone” sprites that lkeep making costumes and photographing every different angle from every different position. If you think that too complicated, and just want to make your own landscape that will always be the same when you run the project, then I suggest using some 3d technology like “Sketchup”. Take screenshots of every different angle, from every different position, upload them into scratch, then have ONE sprite that is always at the back, and according to the variables listed earlier will show each different screenshot.For the controls, just use a simple e=mc squared, ,and turn the thrust into speed. Use the up, down, left and right arrow keys to change your angle variables. Hopefully this will make it easier for you to make a 3d game.
Unfortunately, it seems you are mistaken, especially about “e=mc”. Modeling relativity almost never shows up in games, especially on scratch. I mean, we don't even fully understand it yet!
It seems you have no idea what you are talking about (no offense)

Anyways, I think this is getting way way way off topic. Let me clarify some things

First of all, you have to understand that 3D is very very complicated and difficult. It's even more difficult on scratch as scratch does not have many advanced features or even the speed that you would find in real programming languages. In order to be able to even try to make 3D, I think you should have a solid understanding of the following:
  • Geometry, including coordinate geometry
  • Vectors, 3D space, transforms (including how to represent them with matrices)
  • Scratch advanced features, including math operations, lists, run without screen refresh. Also know about Scratch's quirks like graphics lag (in pen, switch costume, graphic effects, etc), it's single threaded nature (meaning you should use wait() in loops to prevent them from spamming each other out), major lag when switching costumes in a project with over 150 costumes, etc
  • Problem solving skills and not wanting to give up

Basically, the way most 3d projects render things is by raycasting. This means calculating some rays in a 3D world, seeing what they hit, and rendering that on screen. I posted some diagrams and basic explanation of raycasting here: http://scratch.mit.edu/discuss/topic/50892/?page=1#post-428485
Once you understand how it works, you'll need to implement it. Make a storage system for your world (such as in a list) and make variables for your player's 3d transform. Then use your knowledge of vectors and trigonometry to cast some rays from the player position in the direction being look in.
To find if rays hit anything, you can either do it discretely, by moving a point along the ray and seeing if it's inside anything at any point, or more accurately by using some line-shape collision algorithms to see if your ray hits any shapes in your map. Once you know what the ray hit, use it's distance and the height of the shape to draw a vertical line on screen. You can also color it based on your map data (although I think texturing is impossible in scratch).
I leave implementation up to you because I believe coding things yourself is the best way to learn how they work (and debug them), and because I'm kind of too lazy to make one myself and then debug and optimize it (but I will when I have enough time )

I hope this makes some sense and explains a few things

Last edited by MegaApuTurkUltra (Oct. 8, 2014 14:51:11)

X-15
Scratcher
51 posts

How To Make A 3D Game

Not possible. You need to know at least Gr. 11 trig, 3 yrs on scratch or something like that, though their is probably a good description or tutorial on scratch wiki.
MegaApuTurkUltra
Scratcher
1000+ posts

How To Make A 3D Game

X-15 wrote:

Not possible. You need to know at least Gr. 11 trig, 3 yrs on scratch or something like that, though their is probably a good description or tutorial on scratch wiki.
Thanks for summarizing my post (right above yours), but perhaps a summary isn't so necessary as I'm sure people can already understand my post.
TheHockeyist
Scratcher
1000+ posts

How To Make A 3D Game

Guys, this thread is originally from February. I think the topic owner has either successfully done it or has given up by now.

Last edited by TheHockeyist (Oct. 9, 2014 15:14:32)

Paddle2See
Scratch Team
1000+ posts

How To Make A 3D Game

Since this topic hasn't seen a new post from the topic owner in a long time, I'm going to assume that it is dead and close the topic. If it still is alive, the topic owner just needs to use the Report button to ask a mod to reopen it

Powered by DjangoBB