inflЁxion - [snake/pacman with particles]

Show off your games, demos and other (playable) creations.
User avatar
CR4SH3D
Citizen
Posts: 67
Joined: Mon Mar 02, 2009 6:00 pm
Location: England
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by CR4SH3D »

bartbes wrote:
CR4SH3D wrote:and how to make you collide with your tail i really need to work out a way to do that
I'm not sure that's possible.. unless you store a table with positions, but I guess that's not a nice way to go.

EDIT: About old particles (X), maybe you should just stop creating new particles, but still draw them, so the suicide particles fade away. (and you won't have them the next time you commit suicide)
so use stop() and continue drawing them?
also is it a good idea to use arrays to store enemy 'waves' and could i still move each about idividually using that method?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by bartbes »

CR4SH3D wrote:so use stop() and continue drawing them?
Exactly
CR4SH3D wrote:also is it a good idea to use arrays to store enemy 'waves' and could i still move each about idividually using that method?
Could you explain this some more? You mean multiple enemies, or something like that?
User avatar
CR4SH3D
Citizen
Posts: 67
Joined: Mon Mar 02, 2009 6:00 pm
Location: England
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by CR4SH3D »

bartbes wrote:
CR4SH3D wrote:so use stop() and continue drawing them?
Exactly
CR4SH3D wrote:also is it a good idea to use arrays to store enemy 'waves' and could i still move each about idividually using that method?
Could you explain this some more? You mean multiple enemies, or something like that?
i didnt think you could draw particles after the system had been stopped?

and yes i mean multiple enemies, for instance in an array have wave number, enemy type, points and maybe individual x,y values to move them about seperately
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by bartbes »

CR4SH3D wrote:i didnt think you could draw particles after the system had been stopped?
Why not? I'm pretty sure you can, but I guess pause is better. (I don't know if they go away, you might want to test that) But stop()/pause() doesn't destroy the entity, so why shouldn't you be able to draw it?
CR4SH3D wrote: and yes i mean multiple enemies, for instance in an array have wave number, enemy type, points and maybe individual x,y values to move them about seperately
Sure, store those in an array (numerical indexed table, whatever you call them), just loop over them and set the new data. I'd suggest ipairs() with arrays and pairs() with any other type (or when you're not using table.remove(), which is useful, but hard to use). You might want to check out SECS, as classes might simplify this.
User avatar
CR4SH3D
Citizen
Posts: 67
Joined: Mon Mar 02, 2009 6:00 pm
Location: England
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by CR4SH3D »

cool thanks for that

just a small update on what im working on at the moment:
  • background color cycling - (can i do this without it having such a weird effect on the particle colors due to the draw mode)
    enemy waves
    fixing the boost to use a timer
    adding weapons for use against bosses
    score system based on how many milliseconds pass before a wave is defeated
User avatar
CR4SH3D
Citizen
Posts: 67
Joined: Mon Mar 02, 2009 6:00 pm
Location: England
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by CR4SH3D »

added a few things now
  • background color cycling
    another enemy type
    fixed boost to use timer
    added non collision enemy array
as you can see the 3 circles are part of a wave1 array but i cant work out how to cycle through and move each independently, i think they all move according to the bottom right one (at startup) but each should have a random target set within the game size :( any help would be awesome guys

and how come math.random doesnt seems to produce the same vaules if its generated on load?

anyways enjoy and let me know what you think

feel free to play around with the game size too, everything works fine if you try it appart from the splash screen logo

Download:
Attachments
snake beta - 05.love
inflЁxion beta v0.5
(214.05 KiB) Downloaded 204 times
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by bartbes »

CR4SH3D wrote:as you can see the 3 circles are part of a wave1 array but i cant work out how to cycle through and move each independently, i think they all move according to the bottom right one (at startup) but each should have a random target set within the game size :( any help would be awesome guys
Check your other post
CR4SH3D wrote:and how come math.random doesnt seems to produce the same vaules if its generated on load?
What? It shouldn't produce the same values, right?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by Robin »

bartbes wrote:
CR4SH3D wrote:and how come math.random doesnt seems to produce the same vaules if its generated on load?
What? It shouldn't produce the same values, right?
It should produce the same values with the same seed. If the seed is different each time, the values are different.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by bartbes »

I know that, but is the seed always the same? And even if it is, what is the problem with the random number generator generating random numbers?
User avatar
CR4SH3D
Citizen
Posts: 67
Joined: Mon Mar 02, 2009 6:00 pm
Location: England
Contact:

Re: inflЁxion - [snake/pacman with particles]

Post by CR4SH3D »

thanks, ill look into the arrays in a little

i meant that the 'random' numbers generated on load DO seem to be the same every time (ie the position of those circles), i guess the seeed is (0,gamewidth) and (0,gameheight) right?

was a little too tired last night and didnt read it back :P
Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests