Feel free to showcase your own projects!
-
Lawnboy
- Posts: 836
- Joined: 03 Feb 2012, 02:24
Post
» 22 Feb 2012, 00:20
So today I was bored out of my mind. I'm working on coding a little "command prompt" style game thingy (you know where it's like "you wake up in a dark hole. do you (a) throw a bear at a wall (2) I dont give a fuck about what choices you have"), and inspired by "the magical line game" I decided to make this piece of dung demo/early version. This code is MESSYYY!!!, I must say. looking at it will kill your firstborn son. I have since conceived a better version, but I just wanted to share my progress with you guys. Enjoy.
That code sucks
Noooo
Last edited by
Lawnboy on 25 Jul 2012, 03:44, edited 3 times in total.
-
Camewel
- Posts: 2996
- Joined: 02 Feb 2012, 21:32
Post
» 22 Feb 2012, 00:24
I, it, but, I, what?
I really don't see the point. Your code is ridiculously messy and hard to extend, your content is weird, you only have a main.lua, not even a conf.lua, you, you, I don't even know what to say to this thing.
-
Lawnboy
- Posts: 836
- Joined: 03 Feb 2012, 02:24
Post
» 22 Feb 2012, 01:00
Camewel wrote:I, it, but, I, what?
I really don't see the point. Your code is ridiculously messy and hard to extend, your content is weird, you only have a main.lua, not even a conf.lua, you, you, I don't even know what to say to this thing.
Haha I considered not posting, but I felt like just getting the idea und stuff out there. I'm workin on a cleaner version as we speak, and it will be a lot better. By the way, could you help me with loading data from .txt files??
Edit: Nevermind
-
killer64
- Posts: 5
- Joined: 12 Mar 2012, 19:00
Post
» 12 Mar 2012, 21:23
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Mar 2012, 23:48
This is made for 0.7.2 not 0.8.0
-
Lawnboy
- Posts: 836
- Joined: 03 Feb 2012, 02:24
Post
» 14 Mar 2012, 01:46
The whole project was fucking fucking fuck I do not even know why I started it in the first place Shield your eyes from this mutant I created The new thing I'm doing is much superior BEHOLD
Code: Select all
rbd={}
function rbd:load()
self.img={}
self.img[1]=love.graphics.newImage('rbd.png')
self.img[2]=love.graphics.newImage('rbdflap.png')
self.img[3]=love.graphics.newImage('rbdturn.png')
self.img[4]=love.graphics.newImage('rbdfall.png')
self.img[5]=love.graphics.newImage('rbdfly.png')
self.x=500
self.y=500
self.n=1
self.speed=20
self.turn=false
self.speeding=false
end
function rbd:update(dt)
if self.y<500 then
self.y=self.y+.01
end
if self.speed>=1000 then
self.speed=1000
end
if love.keyboard.isDown('a') then
self.turn=true
self.x=self.x-(self.speed*dt)
if self.speeding then
self.speed=self.speed+1
self.n=3
end
elseif love.keyboard.isDown('d') then
self.turn=false
self.x=self.x+(self.speed*dt)
if self.speeding then
self.speed=self.speed+1
self.n=3
end
end
if love.keyboard.isDown('s') and self.y<500 then
self.y=self.y+(self.speed*dt)
if self.speeding then
self.n=4
self.speed=self.speed+1
end
elseif love.keyboard.isDown('w') and self.speeding then
self.n=5
self.y=self.y-(self.speed*dt)
self.speed=self.speed+1
end
end
function rbd:keypressed(k)
if k=='w' and not self.speeding then
self.n=2
self.y=self.y-3
end
if k=='r' then
self.speed=20
end
if k=='q' then
self.speeding=true
end
if k=='e' then
self.speeding=false
end
end
function rbd:keyreleased(k)
if k==' ' or 'w' or 's' or 'a' or 'd' then
self.n=1
end
end
function rbd:draw()
if self.turn then
love.graphics.draw(self.img[self.n], self.x +100, self.y, 0,-1,1,0,0)
else
love.graphics.draw(self.img[self.n],self.x,self.y)
end
end
Seriously do not look at the command prompt SHIT
-
trosh
- Posts: 1594
- Joined: 03 Feb 2012, 08:36
Post
» 14 Mar 2012, 02:34
maybe post a .love ? just a main.lua (even/especially if called mane.lua) isn't really useful when pictures are also involved.