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:

inflЁxion - [snake/pacman with particles]

Post by CR4SH3D »

Image
inflЁxion - [snake/pacman with particles]:
This is a project for college im working on, the aim is to have a snake / pacman esque game with particle entities and effects and generated mazes

I really need help with creating another timer, i dont think it works because i need to have another to control a color cycle when the points reach 10 but ive noticed it only changes once the game is restarted after the time runs out

Also what would be the easiest way to create a game splash screen, can i copy all the current code into another .lua and just call it?

And finally can you switch a particle system to another without it simply replacing the current ones on the screen but drawing them again from the initial source? Or would i need another particle system entirely to start and stop when a condition is met (ie death)

Any help is really appreciated thanks

controls:
arrows - move
z - boost
x - suicide (not complete)

====================--------------------------------
current version: (download)
beta v0.5 - http://love2d.org/forum/download/file.php?id=729

currently implemented:
  • 2 Enemy types
    Player particle effects (color change)
    Random AI Movement
    Splash/Intro screen
====================--------------------------------
Attachments
snake beta - 02.love
Beta 02:
(9.24 KiB) Downloaded 401 times
Last edited by CR4SH3D on Thu May 21, 2009 10:26 pm, edited 3 times in total.
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 really need help with creating another timer, i dont think it works because i need to have another to control a color cycle when the points reach 10 but ive noticed it only changes once the game is restarted after the time runs out
What's wrong with the timer = timer + dt method?
CR4SH3D wrote: Also what would be the easiest way to create a game splash screen, can i copy all the current code into another .lua and just call it?
You can, but be warned, every callback you are going to use in the game HAS to be defined in the main.lua. So if you are going to use keypressed (don't know, haven't even played it), add the following to your code:

Code: Select all

function keypressed() end
CR4SH3D wrote: And finally can you switch a particle system to another without it simply replacing the current ones on the screen but drawing them again from the initial source? Or would i need another particle system entirely to start and stop when a condition is met (ie death)
If I'm correct, you want to move the particles to the old position, not just the system.., unless you're going to change the x and y passed to draw, I don't see it happening, so maybe you want to play around with that.
CR4SH3D wrote: x - suicide (not complete)
What?! I can't finish my attempt to kill myself?! :P (again, haven't played it, so I don't know what you mean by incomplete)
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 »

What's wrong with the timer = timer + dt method?
that works fine for the game timer, i copied it and created a new on that would change the particle color by +10 everytime (in the timer action bit) but it doesnt do anything, i think its still in there in the source
If I'm correct, you want to move the particles to the old position, not just the system.., unless you're going to change the x and y passed to draw, I don't see it happening, so maybe you want to play around with that.
that just it, im not sure how to move the particles themselves around instead of the system
What?! I can't finish my attempt to kill myself?! :P (again, haven't played it, so I don't know what you mean by incomplete)
haha well you can but it switches the particle system so the explosion doesnt spread, its already spread out when you press it :(
eventually im going to use this instead of a bomb, you can kill yourself and kill stuff on screen but you loose a life
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 »

Woah.. did you use an entire timer lib?

Let me ask you this first, why use FPS to decrease values? And as far as I can see the color values are properly updated (unless they are <1 or >255).

To get back to the particles: I don't know if it's possible, I don't think so...
User avatar
Evil Telephone
Prole
Posts: 36
Joined: Fri Jan 30, 2009 9:31 pm

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

Post by Evil Telephone »

Cool looking game, but incredibly buggy.

- If you use the boost, and then die right after, you can't press Z to start a new game.
- When you start a new game after dying, you travel REALLY fast for a few seconds.
- You seem to die at random. What exactly kills you?
- When you start a new game, you still have your old score.

On the bright side, the controls are very responsive and the particle snake is really awesome looking. You may want to increase particle output when the snake moves faster so it doesn't thin out and become translucent. It's kind of hard to see when that happens.
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 »

Evil Telephone wrote:- You seem to die at random. What exactly kills you?
There is a timer counting down in the upper left corner. I didn't notice it at first as well. CR4SH3D, you might want to make the time display a bit larger, so it's noticable.
Evil Telephone wrote:On the bright side, the controls are very responsive and the particle snake is really awesome looking.
Agree on the awesome.
Help us help you: attach a .love.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

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

Post by appleide »

* likes the particular snake. :megagrin:
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:

Woah.. did you use an entire timer lib?

Let me ask you this first, why use FPS to decrease values? And as far as I can see the color values are properly updated (unless they are <1 or >255).

To get back to the particles: I don't know if it's possible, I don't think so...
I used what i thought i needed. To be honest i havent really looked at the timer library other than to get a rough idea of how it works.
I was using FPS to decrease the values because on my laptop atleast it looked good and i hadnt worked out the timer code yet, plus the second timer still isnt working as and when it should.

Wouldnt using FPS ensure that certain effects are drawn depending on the number of frames rather than time?
Evil Telephone:
Cool looking game, but incredibly buggy.

- If you use the boost, and then die right after, you can't press Z to start a new game. - fixed(?)
- When you start a new game after dying, you travel REALLY fast for a few seconds. - will be fixed, might sort of be
- You seem to die at random. What exactly kills you? - ;) fixed
- When you start a new game, you still have your old score. - fixed

On the bright side, the controls are very responsive and the particle snake is really awesome looking. You may want to increase particle output when the snake moves faster so it doesn't thin out and become translucent. It's kind of hard to see when that happens.
Thanks for the awesome feedback. I think ive sorted the particles, it looks alot nicer now i think anyway


Thank you all for the feedback, ill have the other mentioned bugs fixed for the next demo, plus the suicide attack will work then too

Please post any bugs and errors/suggestions here again

Im still wondering why the color change timer doesnt work when your score > 10 (or whatever number it currently says), the timer is created on load, the colorchng function creates a replacement timer, and its within an if statement for the score...

Update:
  • Added drone AI (random movement)
    Fixed alot of bugs
    Improved snake entity particles
Next Demo:
  • Suicide
    Title screen and pausing
    Richochet of enemys when killing them unless boosting
Download:
Attachments
snake beta - 03.love
Fixed last minute bugs
(9.51 KiB) Downloaded 324 times
User avatar
Evil Telephone
Prole
Posts: 36
Joined: Fri Jan 30, 2009 9:31 pm

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

Post by Evil Telephone »

Much better! Nicely done. I only found two bugs:

1. You can still move around after you die.
2. If you die while boosting, when you restart your snake is permanently in "thick particle" mode.
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 »

CR4SH3D wrote:Im still wondering why the color change timer doesnt work when your score > 10 (or whatever number it currently says), the timer is created on load, the colorchng function creates a replacement timer, and its within an if statement for the score...
I found the problem. It was solved when I changed the function to:

Code: Select all

function changeColor( colorchange )
		if score > 1 then
			if color1 < 255 then
					color1 = color1 + 1
					color2 = color2 - 1
					--not here!
			end
		end
		timer.newSimple( 0.003, changeColor, colorchange )
end
The old changeColor() would only set the new timer if the score > 1 and color1 < 255. At load time, this is not the case, so no new timer is started.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests