inflЁxion - [snake/pacman with particles]
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: inflЁxion - [snake/pacman with particles]
No, that's not the seed, do you ever set the seed? (math.randomseed) If you don't, a good place to start is using math.randomseed(os.time()), which should not be the same, unless you've got a really short game.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: inflЁxion - [snake/pacman with particles]
You mean if the game is started twice in the same second?bartbes wrote:unless you've got a really short game.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: inflЁxion - [snake/pacman with particles]
Somewhere floating around the forums is a post stating that the difference between a certain number of seconds is negligible, we're talking about 2<x<10 seconds.
EDIT: Made a nice math expression from it, looks a lot better.
EDIT: Made a nice math expression from it, looks a lot better.
Re: inflЁxion - [snake/pacman with particles]
ive created waves of enemies with arrays (kill the original enemy to cycle waves) but ive found that the mousejoints don't follow the same coordinates as the original one
as a test ive set the first wave of enemies to set the target of the original (with particles) and they dont follow it at all
whats up with that? :S cant really get any further with it if they dont follow the coordinates of the actual game
line 659 for the movement of the first wave
//edit
they seem to think 0,0 is where ever they spawn not the top left
as a test ive set the first wave of enemies to set the target of the original (with particles) and they dont follow it at all
whats up with that? :S cant really get any further with it if they dont follow the coordinates of the actual game
line 659 for the movement of the first wave
//edit
they seem to think 0,0 is where ever they spawn not the top left
- Attachments
-
- snake beta - (array movement).love
- [i]line 659 for the movement of the first wave[/i]
- (214.44 KiB) Downloaded 150 times
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: inflЁxion - [snake/pacman with particles]
Have a vid! http://www.youtube.com/watch?v=aHmdXeUgQXQ
Read video description if you have questions!
Sorry to ask, but did you pick some license for this flashy snake game?
Read video description if you have questions!
Sorry to ask, but did you pick some license for this flashy snake game?
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: inflЁxion - [snake/pacman with particles]
Yes, that sounds correct when you're moving the joints, as they are relative to the body, you should be moving the body.CR4SH3D wrote://edit
they seem to think 0,0 is where ever they spawn not the top left
Re: inflЁxion - [snake/pacman with particles]
im moving them using setTarget though? and it works for the other onebartbes wrote:Yes, that sounds correct when you're moving the joints, as they are relative to the body, you should be moving the body.CR4SH3D wrote://edit
they seem to think 0,0 is where ever they spawn not the top left
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: inflЁxion - [snake/pacman with particles]
I can't do anything about it, it's the body you have to move.
Re: inflЁxion - [snake/pacman with particles]
found a solution
so store the original random coordinates in another array and minus them from teh coordinates when setting a new target, just have to sort out the indexing a nil value error though
Code: Select all
for i,v in ipairs(wavesaj) do --Loop through each wave
wv = 1
for i2 = 1,wavesizes[i] do
wavesaj[i][i2]:setTarget(math.random(0,gamewidth)-wavesax[i][i2],math.random(0,gameheight)-wavesay[i][i2])
wv = wv + 1
end
end
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
Who is online
Users browsing this forum: Google [Bot] and 4 guests