Synook Posted May 6, 2008 Share Posted May 6, 2008 Err... what is "the gfx" and "classic lines"? Link to comment Share on other sites More sharing options...
Html Posted May 9, 2008 Author Share Posted May 9, 2008 Not straight lines like that example of the shapes.Similar to old classic games. Link to comment Share on other sites More sharing options...
Synook Posted May 10, 2008 Share Posted May 10, 2008 Using what engine? With canvas you have to begin a path, then move the caret from the start of your line to the end context.beginPath();context.moveTo(0,0); //Move the caret to (0,0) as the beginning of the linecontext.lineTo(100,100); //Draw a line to (100,100) Link to comment Share on other sites More sharing options...
Html Posted May 10, 2008 Author Share Posted May 10, 2008 A triangle ? Link to comment Share on other sites More sharing options...
Synook Posted May 11, 2008 Share Posted May 11, 2008 You'll need to calculate the co-ordinates. I would draw the bottom line first, and remember it will be (length * the square root of 3) units tall. function drawTriangle(context, x, y, width, filled) { context.beginPath(); var height = Math.floor(width * Math.sqrt(3)) context.moveTo(x,y+height); context.lineTo(x+width, y+height); context.lineTo(x+Math.floor(width / 2), y); if (filled) context.fill(); else { context.closePath(); context.stroke(); }} Link to comment Share on other sites More sharing options...
errietta Posted May 11, 2008 Share Posted May 11, 2008 hehe.. ofcourse it can help in making a game... ofcourse it can.... i know it can.. i have a game plan too.... hehehehehehe... Yes it can help make a game! Hehe... Link to comment Share on other sites More sharing options...
Synook Posted May 11, 2008 Share Posted May 11, 2008 Err ok... Link to comment Share on other sites More sharing options...
programmer-in-training Posted May 12, 2008 Share Posted May 12, 2008 Here is a Mastermind game I made in JavaScript. Link to comment Share on other sites More sharing options...
Synook Posted May 12, 2008 Share Posted May 12, 2008 Apparently I need to log in to view that page Link to comment Share on other sites More sharing options...
programmer-in-training Posted May 16, 2008 Share Posted May 16, 2008 Sorry, I forgot. Here it is. Link to comment Share on other sites More sharing options...
Synook Posted May 16, 2008 Share Posted May 16, 2008 Are you sure? Not FoundThe requested URL was not found on this server.Apache Server at schoolsareforfish.net Link to comment Share on other sites More sharing options...
programmer-in-training Posted May 16, 2008 Share Posted May 16, 2008 Sorry, it works now. I forgot that file names are case sensitive on the internet. Link to comment Share on other sites More sharing options...
Synook Posted May 16, 2008 Share Posted May 16, 2008 That's a cool game :)Though I can't say my chances of winning were too attractive at 0.07716049382716049% lolI like the fact that you can get the info by clicking the buttons on the left Link to comment Share on other sites More sharing options...
programmer-in-training Posted May 16, 2008 Share Posted May 16, 2008 0.07716049382716049% is the chance of winning with one completely random guess. Do you think I should take that part out? Link to comment Share on other sites More sharing options...
Synook Posted May 16, 2008 Share Posted May 16, 2008 Well its sort of discouraging but with a bit more information I suppose it will be fine. Link to comment Share on other sites More sharing options...
Html Posted May 19, 2008 Author Share Posted May 19, 2008 How would you make a shape move towards another shape or line even and it destroys itself ? With some lines as an effect ? Link to comment Share on other sites More sharing options...
Ingolme Posted May 19, 2008 Share Posted May 19, 2008 Well, you'll have to give each of the objects a defined position (X and Y).Then you have to make an algorhithm that tells the program that while the object's X is greater than the other object's X, keep subtracting 1 pixel to the X value, while the object's X is less than the other object's X, keep adding 1 pixel to the X value. Do the same with the Y values. As for detecting collision, it's a little complicated. The simplest way, would be to say that when the X position of the object is equal to the X position of the other object AND the Y position of the object is equal to the Y position of the other object, then they have collided. Of course, this means that they'll only actually "collide" once they're inside eachother. A more complex collision test is hard to explain, but try to visualize it in your head and come up wtih the solution yourself. Link to comment Share on other sites More sharing options...
Html Posted May 19, 2008 Author Share Posted May 19, 2008 Well, it would be like a black hole or gravity field ?I hardly know any js. Link to comment Share on other sites More sharing options...
Ingolme Posted May 19, 2008 Share Posted May 19, 2008 Well, nobody's going to make all the code for you. You should learn Javascript if you're planning to make a game. Link to comment Share on other sites More sharing options...
Html Posted May 20, 2008 Author Share Posted May 20, 2008 I'm in the middle here. I have vb.net , js, python and possibly flash.I wanted to make a game for a pocket pc. Js was just a last look .. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 20, 2008 Share Posted May 20, 2008 If you're going for mobile browsers then Flash will give you more reliable performance than Javascript. Link to comment Share on other sites More sharing options...
Html Posted May 20, 2008 Author Share Posted May 20, 2008 Js doesn't work on pocket pcs yet.As for flash would that work how?on a web page for a mobile device no exe Link to comment Share on other sites More sharing options...
justsomeguy Posted May 20, 2008 Share Posted May 20, 2008 There is a Flash player browser plugin for pocket PC. Yes, you would embed the Flash movie on a web page like normal. Link to comment Share on other sites More sharing options...
Synook Posted May 21, 2008 Share Posted May 21, 2008 Flash is also much faster than JS. Link to comment Share on other sites More sharing options...
Html Posted May 21, 2008 Author Share Posted May 21, 2008 Why is that Synook? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.