Hi there Chris!
I'm glad you liked middleclass. I'm doing my best to make it useful!
Regarding the sound problems, give TESound a try. I haven't tried it myself, but I've read its code and it should solve your problem.
Twh
I also think it should be windowed mode at the start. In my case, the volume was ultra-high when I started the game. The music was too loud! I had to turn the game off just to turn the main volume down.
Also, a minor thing: you will probably want to set the cursor to the center of the screen at the start. It took me some seconds to realize that I had to move the mouse, because I didn't see any cursor (was on the lower-right screen at the start for me)
But those are minor things. I liked your game - it's very solid. I enjoyed the hand-drawn art and the strange music fits in nicely (once I could turn the volume down to decent levels ).
Good job!
Break out clone.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Break out clone.
When I write def I mean function.
Re: Break out clone.
I'm currently working on the game I allready made escape go to the menu, in the menu I added a quit button and a fullscreen button. Standard mode is windowed now. Also implented TEsound although I allready came up with a solution myself. The playlist function will be handy when I have more soundtracks.
But before I'll upload the new version, can someone tell me what is wrong with this code:
It causes this error:
play.lua: 100: attempt to index field '?' (a nil value)
I'm currently replacing all ballball code with a ballball table. Because I want to add multiple balls. I allready made a brick, if I hit that brick there's a 'get another ball' item created, if hit that item, I get another ball, then I can play for some time with two balls (very cool btw.) but ... after some time that error from above pops up. cant really figure it out whats wrong.. :/
--edit
Solved allready. Simple logical problem (tried to detect collision with other ball after brick was allready destroyed..)
But before I'll upload the new version, can someone tell me what is wrong with this code:
Code: Select all
local x
for x in pairs(bricks) do
local y
for y in pairs(ballball) do
if ballball[y].box:collidesWith(bricks[x].box) then
ballball[y]:bounce(bricks[x].xx,bricks[x].yy)
bricks[x]:doStuff()
table.remove(bricks,x)
end
end
end
play.lua: 100: attempt to index field '?' (a nil value)
I'm currently replacing all ballball code with a ballball table. Because I want to add multiple balls. I allready made a brick, if I hit that brick there's a 'get another ball' item created, if hit that item, I get another ball, then I can play for some time with two balls (very cool btw.) but ... after some time that error from above pops up. cant really figure it out whats wrong.. :/
--edit
Solved allready. Simple logical problem (tried to detect collision with other ball after brick was allready destroyed..)
Re: Break out clone.
Just for future reference, when giving us an error with a line number but only giving us part of the code, TELL US WHAT LINE IT CORRESPONDS TO!
Request Programs
If Linux were a beer, it would be shipped in open barrels so that anybody could piss in it before delivery
If Linux were a beer, it would be shipped in open barrels so that anybody could piss in it before delivery
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Break out clone.
I'm a little in the dark as to what you're trying to do. Is this an equivalent statement?
Also, as EMB said, a line number would be helpful. Generally the more code you show us the better, actually.
Code: Select all
for x=1, #bricks do
for y=1, #ballball do
if ballball[y].box:collidesWith(bricks[x].box) then
ballball[y]:bounce(bricks[x].xx,bricks[x].yy)
bricks[x]:doStuff()
table.remove(bricks,x)
end
end
end
Kurosuke needs beta testers
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Break out clone.
The problem has been solved already. (S)he was removing bricks while in the loop, so if ball #1 and ball #2 both hit the same brick, it will crash in the second iteration of the inner loop.tentus wrote:I'm a little in the dark as to what you're trying to do. Is this an equivalent statement?Also, as EMB said, a line number would be helpful. Generally the more code you show us the better, actually.Code: Select all
for x=1, #bricks do for y=1, #ballball do if ballball[y].box:collidesWith(bricks[x].box) then ballball[y]:bounce(bricks[x].xx,bricks[x].yy) bricks[x]:doStuff() table.remove(bricks,x) end end end
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Break out clone.
Very nice demo. But I will suggest one thing, the ball needs to gain speed or lose speed or change angles depending on where it hits the paddle or how hard you hit it (How fast you are moving it when the ball hits it) like other Breakout games. Seems right now it always moves the same speed and only moves at 45º angles.
For changing the angle, make it so the closer to the middle of the paddle you hit, the smaller (More straight up) the ball will bounce. And closer to the edge would be a wider (More straight out) angle.
For changing the angle, make it so the closer to the middle of the paddle you hit, the smaller (More straight up) the ball will bounce. And closer to the edge would be a wider (More straight out) angle.
- StoneCrow
- Party member
- Posts: 199
- Joined: Sat Apr 17, 2010 9:31 am
- Location: Wales the land of leeks and leaks
- Contact:
Re: Break out clone.
solid demo, liked the quirky art and music style
all the comments above are solid advice though, goodluck
all the comments above are solid advice though, goodluck
Dull but sincere filler.
Re: Break out clone.
Ball is still going under the tab sometimes but still will bounce back up happend about 3 times also the level 2 text for me was hanging down in some default
looking font looks little out of place but thats just miner nice demo.
looking font looks little out of place but thats just miner nice demo.
Sir Kittenface
Möko IDE Codename (Erös) Returns Soon
I am dyslexic so if any of my replys confusing please just ask me to reword it as this will make things a lot easier for all parties lol.
Möko IDE Codename (Erös) Returns Soon
I am dyslexic so if any of my replys confusing please just ask me to reword it as this will make things a lot easier for all parties lol.
Re: Break out clone.
The problem about changing how the ball bounces is that the whole game design is made with this simple movement in mind. Changing the code will be a lot of work, dont know if I'm going to do that for this game. I allready had a lot of work making the code work in a way I could add another ball.
I've actually allready realised most tips, but I'll wait with uploading the new version untill I have some more changes.
I've actually allready realised most tips, but I'll wait with uploading the new version untill I have some more changes.
Who is online
Users browsing this forum: No registered users and 1 guest