This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#51 2011-04-27 08:45:50

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

I agree with Skittles, you do need to do something about the mouse. And the school libaries computers are so old they can't view the raycaster.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#52 2011-04-27 16:21:35

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

so what's the resolutions for floor and wall textures?


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#53 2011-04-27 16:41:53

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

It think the gun is a bit too small compared to everything else. And whats the point in the jump if you can jump on anything?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#54 2011-04-27 22:35:53

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

What program did you use to make the raycaster?  I know a decent amount of javascript, and would love to know!


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#55 2011-04-27 22:56:19

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

Runs as fast in Midori as it does in Opera. Is there anyway to stop the mouse pointer from leaving the game unless you press escape or something?

Offline

 

#56 2011-04-28 01:04:06

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

ouch lol too many questions (XD)

bbbeb wrote:

o rly
XD

|Internet Explorer|
|    Didn't run      |

Made me laugh a bit.
* unescape characters. 
.

LOl i know thats a very cheap way to encode (i was thinking of writing the whole script via PHP and using HTML jst to show case but that will be closing development for u lol.

16Skittles wrote:

looks very cool! although, you need to work on:
Speed. In firefox, this went way too fast.
mouse binding. If you move your mouse too far, it loses the sensing.

other than that, it's far surpassed my expectations of javascript. Any way to get the source? :3
.

I am confused about this Mouse trouble (x , for me mouse works good but well i will see whats up with you guys  smile  .what if i add a senstivity control for mouse ?

dingdong wrote:

so what's the resolutions for floor and wall textures?
.

400 x 400 for now  smile  (in .jpg)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#57 2011-04-28 01:05:25

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

markyparky56 wrote:

It think the gun is a bit too small compared to everything else. And whats the point in the jump if you can jump on anything?

Arr lol let me add a decent map in which u can jump on  tongue


And the guns should be big (if u are using a proper browser ) cuz it should scale itself in huge size (intresting)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#58 2011-04-28 01:08:16

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

MoreGamesNow wrote:

What program did you use to make the raycaster?  I know a decent amount of javascript, and would love to know!

Well i loved your question ,

well the raycaster runs on sore JAVASCRIPT and nothing else

it uses the <canvas>  </canvas> element which is like a dynamic Image which can be manipulated according to your needs via the JAVAscript API  big_smile  , feel free to google it , the web is filled with examples 8-)


urhungry wrote:

Runs as fast in Midori as it does in Opera. Is there anyway to stop the mouse pointer from leaving the game unless you press escape or something?

I didnt got your question but if u are meaning me to add a pause function (hmM) i will code it (but an MMO cant be paused -atleast i think )


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#59 2011-04-28 01:33:56

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

No, a pause isn't necessary. It doesnt work in multiplayer. I was talking about how you can move the mouse out of the game when you move your view.

Offline

 

#60 2011-04-28 02:18:55

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

urhungry wrote:

No, a pause isn't necessary. It doesnt work in multiplayer. I was talking about how you can move the mouse out of the game when you move your view.

Drag it very much away from screen ?


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#61 2011-04-28 02:35:39

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

Never mind. The issue will probably be solved later.

Offline

 

#62 2011-04-28 02:38:06

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

*hope so*


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#63 2011-04-28 06:13:40

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

That demo unexpectedly quit my browser.

EDIT: oh, and I'm using safari.

I guess I could help with the art, depends on what the graphics'll be like. Also, might wanna move this to a different forum, scratch won't exactly allow a fun FPS with blood n stuff.

EDIT2: also very slow on firefox. it might be my computer. also, I suggest somehow keeping the mouse in the center of the screen, otherwise we can't turn enough. And with people and the AKs?

Last edited by juststickman (2011-04-28 06:18:24)


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#64 2011-04-28 10:00:22

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

juststickman wrote:

That demo unexpectedly quit my browser.

EDIT: oh, and I'm using safari.

I guess I could help with the art, depends on what the graphics'll be like. Also, might wanna move this to a different forum, scratch won't exactly allow a fun FPS with blood n stuff.

EDIT2: also very slow on firefox. it might be my computer. also, I suggest somehow keeping the mouse in the center of the screen, otherwise we can't turn enough. And with people and the AKs?

Once it has blood init i will write a whole forum for it dw  wink 

and firefox is slightly slower then chrome but on my celeron it gave me 8FPS either u are using an AGE old PC or something else !


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#65 2011-04-28 10:16:14

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

http://dark887.110mb.com/Raycastv3.html  << This is link for the new "SHARED" host


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#66 2011-04-28 11:08:23

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

65 536 and now it supports THAT Many textures lol cuz i used a real trick for texturing lol ,

Last edited by fanofcena (2011-04-28 11:08:39)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#67 2011-04-28 11:10:07

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

Anybody good with 3d Rendering ( i mean 3d model rendering ) dont worry of speed , code it on scratch i will have no issues converting it to JAVAScript , the 3d renderer is required for displaying player models (A) and hence vitally needed 8-) hope u guys understand  smile


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#68 2011-04-28 11:55:27

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

BUMP som1 make me a 3d renderer lol


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#69 2011-04-28 13:44:56

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

I'd love to "join you" or at least look into this whole "canvas" thing.  I'll definitely look into it after the AP Tests.  Though I'm not sure what exactly you are trying to do.  Make a 3d scratch in javascript? Javascript game-engine? Or just making 3D javascript games in general.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#70 2011-04-28 13:56:57

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

Does this help? Just looked up 3D rendering wih javascript and this was the top result.
http://www.nihilogic.dk/labs/canvas3dtexture_0.2/


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#71 2011-04-29 00:43:26

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

MoreGamesNow wrote:

I'd love to "join you" or at least look into this whole "canvas" thing.  I'll definitely look into it after the AP Tests.  Though I'm not sure what exactly you are trying to do.  Make a 3d scratch in javascript? Javascript game-engine? Or just making 3D javascript games in general.

Well i want to make a game engine in javaScript  wink  so far , 3d scratch in SCRIPT is a really amazing idea but i am not mature enough in programming to take a challenge like that  smile  , scratch team is mature + experienced  wink  sooooo NO to 3d Scratch in JavaScript for now  smile


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#72 2011-04-29 00:44:32

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

markyparky56 wrote:

Does this help? Just looked up 3D rendering wih javascript and this was the top result.
http://www.nihilogic.dk/labs/canvas3dtexture_0.2/

O wow u recommanding me joe's code lol his code is epic but very very slow  sad ( cant get a good FPS with it lol ( a scratch based project would be better )


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#73 2011-04-29 00:59:51

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: Going 3d !! anyone wanna join in ????

I hardly know any Javascript, but I'm really good at math and 3D, so I could help if you need anything.


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#74 2011-04-29 01:55:24

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

[b] THE CODE FOR THE 3d Render (coded by me ofcourse)

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Untitled Document</title>
    <script language="JavaScript">
        var ctx;
        var FocalLength = 300;
        function init()
        {
            ctx = document.getElementById("canvas").getContext('2d');
            ctx.clearRect(0,0,800,600);
        }
        function dubplet(x,y)
        {
            
        }
        function triplet(x,y,z)
        {
            this.X = x;
            this.Y = y;
            this.Z = z;
            
        }
            var Rotation = new triplet(0,0,0);
        var Origin = new triplet(0,0,-30);
        
        function vertex(x,y,z)
        {
            this.x = x;
            this.y = y;
            this.z = z;
            this.rotate = function (){
                //Rotation On Y Axis
                sin = Math.sin(Rotation.Y);
                cos = Math.cos(Rotation.Y);
                Ax = this.x*cos + this.z*sin;
                Ay = this.y;
                Az = this.z*cos -this.x*sin;
                //Rotation On X Axis
                sin = Math.sin(Rotation.X);
                cos = Math.cos(Rotation.X);

                Bx = Ax;
                By = Ay*cos + Az*sin;
                Bz = Az*cos - Ay*sin;
                  
                // Rotation on Z axis
                sin = Math.sin(Rotation.Z);
                cos = Math.cos(Rotation.Z);
                Sx = Bx*cos + By*sin;
                Sy = By*cos -Bx*sin;
                Sz = Bz;
                
                var Rp = new triplet(Sx,Sy,Sz);
                return Rp;
            }
        }
        
        a = new vertex(50,50,0);
        b = new vertex(-50,50,0);
        d = new vertex(50,-50,0);
        c = new vertex(-50,-50,0);
    
        
        function Face(a,b,c,d)
        {
            this.A = a;
            this.B = b;
            this.C = c;
            this.D = d;
            
            this.Render= function()
                {
                
                    ctx.beginPath();    
                    var verts =  [];
                     verts[0]=  this.A.rotate();
                    verts[1] = this.B.rotate();
                    verts[2] = this.C.rotate();
                    verts[3] = this.D.rotate();
                    sfr = FocalLength / (FocalLength + verts[0].Z);
                    x= verts[0].X*sfr;
                    y= verts[0].Y*sfr;
                    ctx.moveTo(x+400,300-y);
                    
                    for (var i = 1; i <4; i++) 
                    {
                        sfr = FocalLength / (FocalLength + verts[i].Z);
                        x= verts[i].X*sfr;
                        y= verts[i].Y*sfr;
                        ctx.lineTo(x+400,300-y);
                    
                    
                    }
                    
                    ctx.closePath();
                    ctx.fill();
                }
            
        }
        
var NewFace =new Face(a,b,c,d);
function Cycle()
        {    ctx.clearRect(0,0,800,600);
            Rotation.X += 0.12;
            Rotation.Y += 0.12;
            Rotation.Z += 0.12;    
            NewFace.Render();
            
            setTimeout(Cycle,10);
        }
    </script>
    </head>
    <body onload="init();Cycle();">
        <canvas id = "canvas" height="600" width="800">
            Oink
        </canvas>
    </body>
</html>

Last edited by fanofcena (2011-04-29 01:55:41)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#75 2011-04-29 05:09:03

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Going 3d !! anyone wanna join in ????

fanofcena wrote:

[b] THE CODE FOR THE 3d Render (coded by me ofcourse)

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Untitled Document</title>
    <script language="JavaScript">
        var ctx;
        var FocalLength = 300;
        function init()
        {
            ctx = document.getElementById("canvas").getContext('2d');
            ctx.clearRect(0,0,800,600);
        }
        function dubplet(x,y)
        {
            
        }
        function triplet(x,y,z)
        {
            this.X = x;
            this.Y = y;
            this.Z = z;
            
        }
            var Rotation = new triplet(0,0,0);
        var Origin = new triplet(0,0,-30);
        
        function vertex(x,y,z)
        {
            this.x = x;
            this.y = y;
            this.z = z;
            this.rotate = function (){
                //Rotation On Y Axis
                sin = Math.sin(Rotation.Y);
                cos = Math.cos(Rotation.Y);
                Ax = this.x*cos + this.z*sin;
                Ay = this.y;
                Az = this.z*cos -this.x*sin;
                //Rotation On X Axis
                sin = Math.sin(Rotation.X);
                cos = Math.cos(Rotation.X);

                Bx = Ax;
                By = Ay*cos + Az*sin;
                Bz = Az*cos - Ay*sin;
                  
                // Rotation on Z axis
                sin = Math.sin(Rotation.Z);
                cos = Math.cos(Rotation.Z);
                Sx = Bx*cos + By*sin;
                Sy = By*cos -Bx*sin;
                Sz = Bz;
                
                var Rp = new triplet(Sx,Sy,Sz);
                return Rp;
            }
        }
        
        a = new vertex(50,50,0);
        b = new vertex(-50,50,0);
        d = new vertex(50,-50,0);
        c = new vertex(-50,-50,0);
    
        
        function Face(a,b,c,d)
        {
            this.A = a;
            this.B = b;
            this.C = c;
            this.D = d;
            
            this.Render= function()
                {
                
                    ctx.beginPath();    
                    var verts =  [];
                     verts[0]=  this.A.rotate();
                    verts[1] = this.B.rotate();
                    verts[2] = this.C.rotate();
                    verts[3] = this.D.rotate();
                    sfr = FocalLength / (FocalLength + verts[0].Z);
                    x= verts[0].X*sfr;
                    y= verts[0].Y*sfr;
                    ctx.moveTo(x+400,300-y);
                    
                    for (var i = 1; i <4; i++) 
                    {
                        sfr = FocalLength / (FocalLength + verts[i].Z);
                        x= verts[i].X*sfr;
                        y= verts[i].Y*sfr;
                        ctx.lineTo(x+400,300-y);
                    
                    
                    }
                    
                    ctx.closePath();
                    ctx.fill();
                }
            
        }
        
var NewFace =new Face(a,b,c,d);
function Cycle()
        {    ctx.clearRect(0,0,800,600);
            Rotation.X += 0.12;
            Rotation.Y += 0.12;
            Rotation.Z += 0.12;    
            NewFace.Render();
            
            setTimeout(Cycle,10);
        }
    </script>
    </head>
    <body onload="init();Cycle();">
        <canvas id = "canvas" height="600" width="800">
            Oink
        </canvas>
    </body>
</html>

So you don't need someone to code it for you then?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer