Search found 27 matches

by Teraku
Tue Dec 31, 2013 7:31 pm
Forum: Games and Creations
Topic: A Game Thing For You :3
Replies: 6
Views: 3243

Re: A Game Thing For You :3

I'd download it, but I despise adf.ly. Never works for me. Besides, trying to make a profit out of showing us prototypes is kind of a dick move.
by Teraku
Sat Dec 28, 2013 8:12 pm
Forum: Games and Creations
Topic: Next shoot'em up game
Replies: 5
Views: 4000

Re: Next shoot'em up game

I'd test it, but the window is too small and not positioned correctly in 0.9.0.
by Teraku
Mon Dec 16, 2013 12:57 pm
Forum: Libraries and Tools
Topic: HUMP - yet another set of helpers
Replies: 146
Views: 130120

Re: HUMP - yet another set of helpers

I seem to have a problem when switching between gamestates multiple times. I have two gamestates at the moment, spacegame and gameover. I want the player to be able to restart after a game over. This is working at the moment. However, when the player goes game over a second time, I get this error: E...
by Teraku
Tue Nov 19, 2013 9:06 pm
Forum: Support and Development
Topic: Random Number Generator?
Replies: 10
Views: 6966

Re: Random Number Generator?

Put it anywhere you need. If you want more specific help, you need to tell us what you want. Here's some example code which prints a random number near the top left of the screen, and refreshes it every time you press "r": function love.load() number = math.random(1, 100) end function love...
by Teraku
Tue Nov 19, 2013 10:30 am
Forum: Support and Development
Topic: Random Number Generator?
Replies: 10
Views: 6966

Re: Random Number Generator?

Code: Select all

randomNumber = math.random(1, 100)
This assigns a random number between 1 and 100 to the randomNumber variable. No need to do any extra stuff to get a different number each time.
by Teraku
Sun Nov 17, 2013 9:22 pm
Forum: Support and Development
Topic: time limit
Replies: 10
Views: 5208

Re: time limit

Try this code (Untested):

Code: Select all

function love.load()
  timeLeft = 60
end

function love.draw()
love.graphics.print(round(timeLeft), 0, 0)
end

function love.update(dt)
timeLeft = timeLeft - dt
end

function round(num)
    return math.floor(num+0.5)
end
by Teraku
Sun Nov 17, 2013 3:45 pm
Forum: Games and Creations
Topic: Herbert the Space Badass
Replies: 3
Views: 3430

Re: Herbert the Space Badass

Version 0.3 is now out! Download link in OP now links to the new version. Haven't had a chance to fix stuff like music yet, we had a few other priorities. Next version will include more types of enemies and hopefully the first scripted level!
by Teraku
Fri Nov 15, 2013 1:05 pm
Forum: Support and Development
Topic: [SOLVED] Moving an object to another table
Replies: 2
Views: 901

Re: Moving an object to another table

Ah, right. That worked, thanks.

I just remembered why I came up with a separate table for reloading enemies: Due to some bug I couldn't solve, all enemies started moving backwards if one started reloading. But it's all solved now. Thanks. :awesome:
by Teraku
Fri Nov 15, 2013 11:26 am
Forum: Support and Development
Topic: [SOLVED] Moving an object to another table
Replies: 2
Views: 901

[SOLVED] Moving an object to another table

So I'm trying to change the behavior of my enemies to "reload" (Move backwards) for a while after shooting. However, I can't seem to get it to work. I've tried inserting the enemy in another table, but it gives the following error as soon as the enemies start reloading: Error: main.lua:288...
by Teraku
Thu Nov 07, 2013 9:04 pm
Forum: General
Topic: Programming Style
Replies: 24
Views: 9145

Re: Programming Style

My programming is usually pretty decent, but eventually it ends up a bit messy and resource-intensive, so then I take the time to optimize it and make it more logical and improve readability. When writing new code, I usually know beforehand what I'm trying to code, and I figure out the how as I go.