***UPDATED AND FIXED***
My first love game, a simple mole hunter mad in 4 day and 500 code lines..
**All artwork [inspired by love web site] and code are under cc license
Try it and say me your oppinion..
UPDATED
RESOLVE THE TIME PROBLEM
DIFFICULT LEVEL ADDED
**DON'T TEST UNDER WINDOWS
**SORRY THE LAST VERSION DON'T RUN.. NOW IS READY TO ENJOY IT
PS: Some help for the music??
Now I think to develop some other game..
Mole Hunter <aka Game>
- Mandarancio
- Prole
- Posts: 11
- Joined: Mon Nov 03, 2008 5:08 pm
- Location: Parma - Italy
- Contact:
Mole Hunter <aka Game>
- Attachments
-
- first.love
- SECOND RUN VERSION
- (302.29 KiB) Downloaded 714 times
Last edited by Mandarancio on Sun Nov 09, 2008 11:18 am, edited 5 times in total.
Arch Linux user..
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
Re: Mole Hunter <aka Game>
---
Last edited by Dvondrake on Mon Jan 21, 2019 10:21 pm, edited 1 time in total.
Re: Mole Hunter <aka Game>
Graphics after my taste, but why two different versions?
And how did you time this game? The moles seem to be appearing very slowly ...
And how did you time this game? The moles seem to be appearing very slowly ...
- Mandarancio
- Prole
- Posts: 11
- Joined: Mon Nov 03, 2008 5:08 pm
- Location: Parma - Italy
- Contact:
Re: Mole Hunter <aka Game>
ThanksPost by Dvondrake on Thu Nov 06, 2008 7:59 pm
Very nice! Artwork is great.
I made two different version for the problem that you say (the slowly of the moles!)..Graphics after my taste, but why two different versions?
And how did you time this game? The moles seem to be appearing very slowly ...
On my pc with ati linux driver and love 0.5.0 the game run fast without problem but on my laptop with nvidia linux driver the game was extremely slow and for it I made a simply patch and and a second version of the game more fast.. (if in your system the normal version is slow try the nvidia vesion! Else for set the fast extract the love archive and open the main.lua and here change the k var is very commentated [only it])
Arch Linux user..
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
Re: Mole Hunter <aka Game>
Then you problably time things by frames. You can avoid this if you use per-second timing instead. That makes the game independent of the frame rate.
Code: Select all
time_buf = 0
function update(dt)
time_buf = time_buf + dt
-- Spawn every two seconds:
if time_buf > 2 then
-- spawnMole()
time_buf = 0
end
end
- Mandarancio
- Prole
- Posts: 11
- Joined: Mon Nov 03, 2008 5:08 pm
- Location: Parma - Italy
- Contact:
Re: Mole Hunter <aka Game>
I use a counter, exemple:rude wrote:Then you problably time things by frames. You can avoid this if you use per-second timing instead. That makes the game independent of the frame rate.
Code: Select all
time_buf = 0 function update(dt) time_buf = time_buf + dt -- Spawn every two seconds: if time_buf > 2 then -- spawnMole() time_buf = 0 end end
Code: Select all
time=0
function update(dt)
time=time+1
if time>= 100 then
makesomething()
end
end
Arch Linux user..
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
Re: Mole Hunter <aka Game>
Yes, that code calls makesomething() every 100 frames. If you have a fast computer with vsync disabled, you may get 1000 FPS, in which case stuff happens really fast. If you have a slow computer (or vsync enabled), then stuff will happen more slowly.
You need to include "dt" somehow. This code, for instance, calls makesomething() each 100 seconds.
EDIT: Yes, bartbes is right, you don't want to wait 100 seconds, but I wanted to modify the code as little as possible.
You need to include "dt" somehow. This code, for instance, calls makesomething() each 100 seconds.
Code: Select all
time=0
function update(dt)
time=time + 1*dt
if time >= 100 then
makesomething()
time = 0
end
end
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Mole Hunter <aka Game>
That is per frame, as rude said, you should use
That gives time the time in seconds (so you should lower 100 too as you don't want to wait 100 seconds)
EDIT: rude typed just a little bit faster
Code: Select all
time=time+dt
EDIT: rude typed just a little bit faster
- Mandarancio
- Prole
- Posts: 11
- Joined: Mon Nov 03, 2008 5:08 pm
- Location: Parma - Italy
- Contact:
Re: Mole Hunter <aka Game>
Ok thanks to all!! Now I go to fix the bug!!
Arch Linux user..
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
Re: Mole Hunter <aka Game>
it looks so cool and lovely!
unfortunately, both version have problem on my computer: the nvidia version is too fast for the coming of the moles, and the ati version is too slow. And after a while, both increase my cpu load to it's not playable at all (the mouse becomes slow and choppy)
I'm testing this under kde4 and with the nvidia driver, it's try it without (kde4)
Really nice design anyway.
unfortunately, both version have problem on my computer: the nvidia version is too fast for the coming of the moles, and the ati version is too slow. And after a while, both increase my cpu load to it's not playable at all (the mouse becomes slow and choppy)
I'm testing this under kde4 and with the nvidia driver, it's try it without (kde4)
Really nice design anyway.
Who is online
Users browsing this forum: Bing [Bot] and 3 guests