Mole Hunter <aka Game>

Show off your games, demos and other (playable) creations.

Wath I must develop?

The Graphics
0
No votes
The Sound
1
20%
The level
0
No votes
The Story
3
60%
The Number of mole
0
No votes
Other (write a post)
1
20%
 
Total votes: 5

User avatar
Mandarancio
Prole
Posts: 11
Joined: Mon Nov 03, 2008 5:08 pm
Location: Parma - Italy
Contact:

Mole Hunter <aka Game>

Post by Mandarancio »

***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..
Attachments
first.love
SECOND RUN VERSION
(302.29 KiB) Downloaded 588 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/
Dvondrake
Prole
Posts: 29
Joined: Sun Oct 26, 2008 5:53 pm

Re: Mole Hunter <aka Game>

Post by Dvondrake »

---
Last edited by Dvondrake on Mon Jan 21, 2019 10:21 pm, edited 1 time in total.
User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Mole Hunter <aka Game>

Post by rude »

Graphics after my taste, but why two different versions?

And how did you time this game? The moles seem to be appearing very slowly ...
User avatar
Mandarancio
Prole
Posts: 11
Joined: Mon Nov 03, 2008 5:08 pm
Location: Parma - Italy
Contact:

Re: Mole Hunter <aka Game>

Post by Mandarancio »

Post by Dvondrake on Thu Nov 06, 2008 7:59 pm
Very nice! Artwork is great.
Thanks
Graphics after my taste, but why two different versions?

And how did you time this game? The moles seem to be appearing very slowly ...
I made two different version for the problem that you say (the slowly of the moles!)..
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/
User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Mole Hunter <aka Game>

Post by rude »

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
User avatar
Mandarancio
Prole
Posts: 11
Joined: Mon Nov 03, 2008 5:08 pm
Location: Parma - Italy
Contact:

Re: Mole Hunter <aka Game>

Post by Mandarancio »

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
I use a counter, exemple:

Code: Select all

time=0
function update(dt) 
   time=time+1
   if time>= 100 then
      makesomething()
   end
end
Is wrong make this?? Is here the problem?
Arch Linux user..
..No Freedom without Sharing..
http://mandarancio.deviantart.com/
http://manda.netsons.org/
User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Mole Hunter <aka Game>

Post by rude »

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.

Code: Select all

time=0
function update(dt) 
   time=time + 1*dt
   if time >= 100 then
      makesomething()
      time = 0
   end
end
EDIT: Yes, bartbes is right, you don't want to wait 100 seconds, but I wanted to modify the code as little as possible.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Mole Hunter <aka Game>

Post by bartbes »

That is per frame, as rude said, you should use

Code: Select all

time=time+dt
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 :D
User avatar
Mandarancio
Prole
Posts: 11
Joined: Mon Nov 03, 2008 5:08 pm
Location: Parma - Italy
Contact:

Re: Mole Hunter <aka Game>

Post by Mandarancio »

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/
User avatar
farvardin
Party member
Posts: 164
Joined: Sat Jun 28, 2008 6:46 pm

Re: Mole Hunter <aka Game>

Post by farvardin »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests