Search found 21 matches

by Shanulu
Wed Aug 07, 2013 3:53 am
Forum: Support and Development
Topic: Collison and Vector fun!
Replies: 0
Views: 1376

Collison and Vector fun!

Hello me again! I've started messing around with physics and am having trouble with the call backs associated with it. To be more precise I am having trouble getting my ball to bounce (again!). I am using vector from HUMP(?)... It seems (through a series of Print functions) my ball tries to bounce, ...
by Shanulu
Tue Jul 30, 2013 2:31 am
Forum: Support and Development
Topic: Menu buttons won't work ?
Replies: 6
Views: 3447

Re: Menu buttons won't work ?

My bad: I did it backwards, what you want is

Code: Select all

 x < v.x + medium:getWidth(v.text) and
 y > v.y and
 y< v.y + medium:getHeight(v.text) then.
by Shanulu
Tue Jul 30, 2013 1:35 am
Forum: Support and Development
Topic: Menu buttons won't work ?
Replies: 6
Views: 3447

Re: Menu buttons won't work ?

Something I can help with, yay! You error is on line 23 where you call v.medium. You dont have a medium. I think what you want to call is v.text (the text of your button).
by Shanulu
Fri Jul 26, 2013 1:14 am
Forum: Support and Development
Topic: State machine example
Replies: 6
Views: 2772

Re: State machine example

This is fantastic and lovely.

No questions thus far but I'll be sure to ask!
by Shanulu
Thu Jul 25, 2013 9:39 pm
Forum: Support and Development
Topic: [SOLVED] Generating platforms randomly?
Replies: 3
Views: 1973

Re: Generating platforms randomly?

I have a bit of code that randomly draws rectangles of random sizes in my pong game. You could replicate that with what Mickey has said above. Limit the generation of the platforms to anywhere between the bottom of the screen and exactly how high your player can jump. At least I think that'a what he...
by Shanulu
Wed Jul 24, 2013 7:44 pm
Forum: Support and Development
Topic: File Structure and 'require'
Replies: 3
Views: 2485

Re: File Structure and 'require'

I am adding my current game.lua and title.lua. I'd like to note, its barebones because I am just creating a system that works, then I'll take my working code and paste it in, Ive added some comments for you readers. Anyway, requiring all the files in main does work, although there is some bugs now. ...
by Shanulu
Wed Jul 24, 2013 4:45 pm
Forum: Support and Development
Topic: File Structure and 'require'
Replies: 3
Views: 2485

File Structure and 'require'

Hello, me again! Sorry to bug you. Background: In an effort to organize and clean up my Pong project I've searched and researched (see what I did there?) about handling game states and am attempting to write my own way of doing so. I've created a game.lua which is my base class as well, it containts...
by Shanulu
Mon Jul 22, 2013 5:36 pm
Forum: Support and Development
Topic: [Solved]Pong:velocity change based on dist. from center
Replies: 6
Views: 2227

[SOLVED]Re: Pong:velocity change based on dist. from cent

For the first one? Yeah, you do. The thing you just showed is right, because the smallest range goes first. On the other hand, I would implement it myself with a table: -- outside any function local thingy_colors = {{255, 0, 0}, {227, 31, 0}, ...} -- etc. -- instead of the grand if-statement: if se...
by Shanulu
Mon Jul 22, 2013 3:38 pm
Forum: Support and Development
Topic: [Solved]Pong:velocity change based on dist. from center
Replies: 6
Views: 2227

Re: Pong:horizontal velocity change based on dist. from cent

The was the idea... I was trying to implement it similar to my blocks color change if self.duration <= .1 * self.durationOrg then self.color = {255, 0, 0} elseif self.duration <= .2 * self.durationOrg then self.color = {227, 31, 0} elseif self.duration <= .3 * self.durationOrg then self.color = {199...
by Shanulu
Mon Jul 22, 2013 3:56 am
Forum: Support and Development
Topic: [Solved]Pong:velocity change based on dist. from center
Replies: 6
Views: 2227

[Solved]Pong:velocity change based on dist. from center

As my character limited title suggests I was working on a function to alter my balls' horizontal velocity based on how far it was from center. I decided to cut my paddle into 5ths, and apply a certain ratio to the horizontal velocity based on what section it hit. The outer sections would have the mo...