Need project idea

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
bartoleo
Party member
Posts: 118
Joined: Wed Jul 14, 2010 10:57 am
Location: Savigliano

Re: **NEED PROJECT IDEA**

Post by bartoleo »

Bartoleo
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: **NEED PROJECT IDEA**

Post by kikito »

bartoleo wrote:You can look here...
http://www.squidi.net/three/index.php
Eumm... I had already included that link on my previous post...
When I write def I mean function.
User avatar
theZohnn
Prole
Posts: 20
Joined: Tue Jul 20, 2010 7:50 pm

Re: **NEED PROJECT IDEA**

Post by theZohnn »

0.o

...

umm wow guys thanks so much for all the ideas! this will help so much! *man hugs all users* I'll find one or two i can work on, and then go from there.

and sorry for the loud title... im used to giant forums where topics dont stay on the front page for more that a few minutes.
+1 internet to anyone that helps me! i am a lost little puppy!
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: **NEED PROJECT IDEA**

Post by pekka »

A roguelike is also a fun project, and one that can range from a quick program written in a couple of days to a long project; as long as you want to make it. Some roguelikes never really get finished, but they are just improved and improved by the devteam over time.

It's also quite acceptable to use unsophisticated programmer graphics for your roguelike. Classical ones still use ASCII graphics in a console window, so you could even emulate that with Löve :)

You can read up on them here: http://roguebasin.roguelikedevelopment. ... =Main_Page
User avatar
theZohnn
Prole
Posts: 20
Joined: Tue Jul 20, 2010 7:50 pm

Re: Need project idea

Post by theZohnn »

Right now I'm going to make a Pong... Extremely lightweight. No powerups or nothing. Technically, it will be my first finished product. :ehem:
+1 internet to anyone that helps me! i am a lost little puppy!
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: Need project idea

Post by TechnoCat »

User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Need project idea

Post by Jasoco »

Everyone makes Pong at some point.

Here, I made one in JavaScript and HTML5 before I even discovered Löve...

Code: Select all

<html>
	<head>
		<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
		<title>Canvas Pong Experiment 2009 by Jason Anderson</title>
		<style type="text/css">
			body { background-color: #333; overflow: hidden; margin: 0; }
			#body {
				display: block;
				position: absolute;
				width: 640px;
				height: 480px;
				margin: 0 auto;
				background-color: #000;
			}
			canvas {
				display: block;
				position: absolute;
				width: 640px;
				height: 480px;
				left: 0;
				top: 0;
				z-index: 500;
			}
			#score1, #score2 {
				display: block;
				position: absolute;
				font-size: 5em;
				color: white;
				z-index: 1000;
				width: 315px;
				text-align: center;
			}
			#score1 {
				left: 0;
				top: 10px;
			}
			#score2 {
				right: 0;
				top: 10px;
			}
			#divider {
				display: block;
				position: absolute;
				left: 0;
				top: 0;
				bottom: 0;
				right: 315;
				border-right: 10px dotted white;
			}
			#debug {
				display: block;
				position: absolute;
				left: 10px;
				bottom: 10px;
				color: white;
			}
		</style>
		<script type="text/javascript">
			var key=[0,0,0,0];
			var tmr, pi = Math.PI;
			var paddle1y, paddle2y, paddle1s, paddle2s;
			var score1, score2;
			var ballX, ballY, XD, YD, speed;
			var game, pause, numPlayers;
			
			function $(el) { return document.getElementById(el); }
			function loadIt() {
				$("debug").innerHTML = "";
				game = document.getElementById("game").getContext("2d");

				speedX = 4;
				speedY = 4;
				paddle1y = 200;
				paddle2y = 200;
				paddle1s = 0;
				paddle2s = 0;
				XD = speedX;
				YD = speedY;
				ballX = 320;
				ballY = 240;
				score1 = 0;
				score2 = 0;
				pause = 0;
				//Set to 0 and it's CPU vs CPU... but they're in sync.. which sucks.. need to put some randomness in.
				numPlayers = 1;
				
				updateScore();
				resetBall();
				tmr = window.setInterval("drawStuff3();",10);
			}
			
			function drawStuff3() {
				//HANDLE PLAYER ONE INPUT
				if (numPlayers > 0) {
					if ((key[0] && !key[1]) && paddle1y > 0) {
						paddle1y -= 4;
					} else if ((key[1] && !key[0]) && paddle1y < 400) {
						paddle1y += 4;
					}
				} else {
					if (ballY < paddle1y + 30 && paddle1y > 0) {
						paddle1y -= 4;
					} else if (ballY > paddle1y + 49 && paddle1y < 400) {
						paddle1y += 4;
					}
				}

				//HANDLE PLAYER TWO MOVEMENT
				if (numPlayers == 2) {
					if ((key[2] && !key[3]) && paddle2y > 0) {
						paddle2y -= 4;
					} else if ((key[3] && !key[2]) && paddle2y < 400) {
						paddle2y += 4;
					}
				} else {
					if (ballY < paddle2y + 30 && paddle2y > 0) {
						paddle2y -= 4;
					} else if (ballY > paddle2y + 49 && paddle2y < 400) {
						paddle2y += 4;
					}
				}

				//DO THE GAME BALL MOVEMENT AND STUFF
				if (!pause) {	
					ballX += XD;
					ballY += YD;
					
					if (ballX > 630) {
						XD = -speedX;
						score1++;
						updateScore();
						resetBall();
					} else if (ballX < 0) {
						score2++;
						updateScore();
						resetBall();
					}
					if (ballY > 470) {
						YD = -speedY;
					} else if (ballY < 0) {
						YD = speedY;
					}
					
					//HANDLE HITTING PLAYER ONE PADDLE
					if (ballX <= 30 && ballX > 25 && ballY >= (paddle1y-10) && ballY < paddle1y + 80) {
						var w = ballY - paddle1y;
						if (w < 22) {
							speedY = 6;
							YD = -speedY;
						} else if (w < 38) {
							speedY = 3;
							YD = -speedY;
						} else if (w > 58) {
							speedY = 6;
							YD = speedY;
						} else if (w > 42) {
							speedY = 3;
							YD = speedY;
						} else {
							speedY = 0;
							YD = speedY;
						}
						XD = speedX;
					}

					//HANDLE HITTING PLAYER TWO PADDLE					
					if (ballX >= 610 && ballX < 615 && ballY >= (paddle2y-10) && ballY < paddle2y + 80) {
						var w = ballY - paddle1y;
						if (w < 22) {
							speedY = 5;
							YD = -speedY;
						} else if (w < 38) {
							speedY = 3;
							YD = -speedY;
						} else if (w > 58) {
							speedY = 5;
							YD = speedY;
						} else if (w > 42) {
							speedY = 3;
							YD = speedY;
						} else {
							speedY = 0;
							YD = speedY;
						}
						XD = -speedX;
					}
					
					
				}
					
				game.clearRect(0,0,640, 480);

				game.fillStyle = "#fff";
				game.fillRect (20, paddle1y, 10, 80);
				game.fillRect (610, paddle2y, 10, 80);
				game.fillRect (ballX,ballY, 10, 10);	
			}
			
			function resetBall() {
				ballX = 315;
				ballY = 235;
				speedY = Math.floor(Math.random()*4) +1;
				YD = speedY;
				var r = Math.floor(Math.random()*2)+1;
				if (r == 1) YD = -speedY;
				//$("debug").innerHTML = r;
				pause = 1;
				setTimeout("pause = 0;", 1000);
			}
			
			function updateScore() {
				$("score1").innerHTML = score1;
				$("score2").innerHTML = score2;
			}
			
			function pauseGame() {
				if (pause == 1) {
					pause = 0;
					$("debug").innerHTML = "";
				} else {
					pause = 1;
					$("debug").innerHTML = "PAUSED";
				}
			}
	
			function changeKey(which, to){
				switch (which){
					case 38: key[0]=to; break; // Up 1
					case 40: key[1]=to; break; // Down 1
			
					case 81: key[2]=to; break; // Up 2
					case 65: key[3]=to; break; // Down 2
				}
			}
			document.onkeydown=function(e){ changeKey((e||window.event).keyCode, 1); }
			document.onkeyup=function(e){ changeKey((e||window.event).keyCode, 0); }
			
			window.onload = function() { window.setTimeout("loadIt()", 1); }
		</script>
	</head>
	<body>
		<div id="body" onClick="pauseGame();">
			<div id="divider"></div>
			<canvas id="game" width="640" height="480">If you see this, you are unsupported</canvas>
			<div id="score1"></div><div id="score2"></div>			
			<div id="debug"></div>
		</div>
	</body>
</html>
Impressed my friends it did.
User avatar
theZohnn
Prole
Posts: 20
Joined: Tue Jul 20, 2010 7:50 pm

Re: Need project idea

Post by theZohnn »

Lol me and my neighbor played that for hours... Mine will be sort of like that but with simple graphics... Veeery simple.

@jasoco
That's pretty cool, I tried java before and I spent a few hours on "hello world" and then I gave up. I never got it to work.
+1 internet to anyone that helps me! i am a lost little puppy!
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Need project idea

Post by Jasoco »

That's JavaScript. Completely different. I still don't understand Java. Which is why I'm grateful Löve came along.

JS is so much easier. And on the right browsers, really fast. But it'll never beat Löve for speed. Though JS does work on more platforms including phone's like iPhone and Android and anything else with a real browser. Especially if it's WebKit.
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: Need project idea

Post by pekka »

It is possible to reach an equilibrium in Jasoco's Pong game (as posted upthread). If you manage to bounce the ball directly to the right and the opponent keeps bouncing it directly to the left, you can just park your paddle in the one position and the ball keeps bouncing back and forth indefinitely. It has been going at it for one minute at least when I write this, so I assume it will go longer.

Now, this isn't a criticism by any means. I just thought it was amusing. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests