love2kick

Show off your games, demos and other (playable) creations.
Post Reply
wiero
Prole
Posts: 2
Joined: Sat Dec 18, 2010 11:36 pm

love2kick

Post by wiero »

hello!!

i'm sending my first game written in love just to say hi :)
game is pretty simple based on something i saw on the internet.
try to kick ( click ) the ball as many times as you can before it hits the ground. it gets difficult to get each next kick
i hope i'll find some time and energy to write more and more playable games,


http://hotfile.com/dl/90379730/66755a5/ ... .love.html

while writing i found one possible bug: when i put code like "g.setFont(g.getFont(40))" in draw callback the game crashes after couple of kicks ( win7 )
(g = love.graphics)

hope you like it :)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: love2kick

Post by bartbes »

wiero wrote:while writing i found one possible bug: when i put code like "g.setFont(g.getFont(40))" in draw callback the game crashes after couple of kicks
That's no bug, that's you creating an entire font every single frame!

EDIT:
Ugh, external download site, wrongly packaged, and dofile instead of require breaking it.. here's a version that works.
Attachments
love2kick.love
Repackaged, I do not claim any ownership at all.
(3.51 MiB) Downloaded 307 times
wiero
Prole
Posts: 2
Joined: Sat Dec 18, 2010 11:36 pm

Re: love2kick

Post by wiero »

bartbes wrote:
wiero wrote:while writing i found one possible bug: when i put code like "g.setFont(g.getFont(40))" in draw callback the game crashes after couple of kicks
That's no bug, that's you creating an entire font every single frame!
sorry, my fault
bartbes wrote: EDIT:
Ugh, external download site, wrongly packaged, and dofile instead of require breaking it.. here's a version that works.
hm, i zipped it with instructions on wiki, i'll try do better next time
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: love2kick

Post by thelinx »

Also note that you can upload your games to the forums if they are smaller than 10 MB. Feel free to hotlink it as well.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: love2kick

Post by kikito »

bartbes wrote:That's no bug, that's you creating an entire font every single frame!
Well if it's not a bug, it's a faulty interface. setFont(number) should either be removed or modified so it does internal caching.
When I write def I mean function.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: love2kick

Post by Robin »

kikito wrote:Well if it's not a bug, it's a faulty interface. setFont(number) should either be removed or modified so it does internal caching.
That's debatable. It works fine if you only set a font once, which is great for quick and simple prototyped games.

For more advanced games you would be juggling with font objects anyway.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 2 guests