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.
Offline
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?
Offline
What program did you use to make the raycaster? I know a decent amount of javascript, and would love to know!
Offline
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
.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
(in .jpg)
Offline
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
And the guns should be big (if u are using a proper browser ) cuz it should scale itself in huge size (intresting)
Offline
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
, 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 )
Offline
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 ?
Offline
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)
Offline
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
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 !
Offline
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)
Offline
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
Offline
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.
Offline
Does this help? Just looked up 3D rendering wih javascript and this was the top result.
http://www.nihilogic.dk/labs/canvas3dtexture_0.2/
Offline
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
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
, scratch team is mature + experienced
sooooo NO to 3d Scratch in JavaScript for now
Offline
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
( cant get a good FPS with it lol ( a scratch based project would be better )
Offline
I hardly know any Javascript, but I'm really good at math and 3D, so I could help if you need anything.
Offline
[b] THE CODE FOR THE 3d Render (coded by me ofcourse)
<!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)
Offline
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?
Offline