You are not logged in.
Announcement
#26 05/03/07 7:39pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: New Space Invaders (w.t.)
Don't realy get what do you mean.
I'm usin the same object for moving and standing ones.
I think i will replace the shading effect with a gradient, so it'l look smoother if щнг mean that.
I bite!
Offline
#27 05/03/07 7:59pm
#28 07/03/07 1:44pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: New Space Invaders (w.t.)
Still can't get the shooting work proberly
I think that's because ot the fact that the name of the bullet instance is changing.
What should i do?
I bite!
Offline
#29 07/03/07 2:23pm
- Jake
- Administrator
- Registered: 29/04/06
- Posts: 307
Re: New Space Invaders (w.t.)
I can help a little here. RemoveMNovieClip() will only work if the movie clip was created by actionscript. To attach a movie to the stage you have to make sure that the movie clip is set to "export for actionscript" in the linkage section of properties for that movie clip in the library. You will get a linkage and then the following code can be used to attach that movie to the stage.
Code:
this.attachMovie("MC","MOVIE",this.getNextHighestDepth()); this.stop();
Where "MC" is the linkage of the movie clip and must have the quotation marks and "MOVIE" is the new instance name for the movie clip so in the above case if you wanted to adjust the position of the newly attached movie clip the following code should work.
Code:
MOVIE._x += 5; MOVIE._y += 5;
Note you can also create movie clips by duplicating a movie clip that is already on the stage but the above is a better method for creating movie clips on the stage using actionscript.
For your other problem, you have more than one bullet on the stage so a little for loop should fix the problem.
Your code:
Code:
if (this.hitTest(_root["bullet"+bulletNum])){ this.nextFrame(); _root["bullet"+bulletNum].removeMovieClip(); }
This is only checking one movie clip as bulletNum is not changing. I am assuming the first bullet is "bullet1" and if you had a total of 5 bullets then the following script would check for all 5:
Code:
for (i=1;i<=5;i++){ if (this.hitTest(_root["bullet"+i])){ this.nextFrame(); _root["bullet"+i].removeMovieClip(); } }
I am not going to go in to how a for loop works but i will warn that large for loops will slow things down as in the above code all that is within the for loop will run 5 times.
And finally if you are referring to a red underline when typing in Firefox then this is the inbuilt spell checker. To change settings go to tools>options>advanced and here you can change the language and or turn off the spell checker.
Offline
#30 07/03/07 9:50pm
#31 08/03/07 2:27pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: New Space Invaders (w.t.)
So it qorks but not quite as planned - the first bullet is not active (misses),
(maybe because it's "bullet0"?), and every bullet after "bullet5" is not working.
I think there must be an "i" reseting code, and somethig that will make "bulletNum" start from 1 instead of 0?
I bite!
Offline
#32 08/03/07 3:00pm
Re: New Space Invaders (w.t.)
Jake wrote:
I am assuming the first bullet is "bullet1" and if you had a total of 5 bullets
The for loop starts
Code:
for (i=1;i<=5;i++)
- the contents of the brackets are the conditions of the loop:
i=1; - when the loop starts, it sets var i = 1;
i<=5; - the loop will run whilst i is less than or equal to 5
i++ - each time the loop runs, i will increase by one
so changing the code to
Code:
for (i=0;i<=10;i++)
will make the first bullet work, and will work for up to 10 bullets. As jake mentioned though, be careful with the number of loops being executed - having lots of loops is an excellent way to knock the framerate down
PSP Flash Gaming creator
Offline
#33 10/03/07 10:21am
- kyle
- Member
- Registered: 10/03/07
- Posts: 3
Re: New Space Invaders (w.t.)
hey i dont know if u have played laser age good game for pc (sry dont have a link) but u check it out for ideas
Offline
#34 11/03/07 12:44pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: New Space Invaders (w.t.)
Man, it's slo on a psp...
I removed some details from the ship, made targets flat, but still, stux.
Here's a gameplay "video"
I bite!
Offline
#35 14/03/07 1:03am
Re: New Space Invaders (w.t.)
i dont know how to fix it but are you working on it? because i really want this game. its by war my favorite on here so let me know when its done or any beta versions you have email them to me thx
Offline
#36 14/03/07 11:42am
Re: New Space Invaders (w.t.)
Think your best bet will be by optimising the code - Heli took Jake ages to make, and most of that time was spent re-writing the code to run faster.
Is there any way to reduce the number of loops or functions running on each frame etc?
PSP Flash Gaming creator
Offline
#37 20/03/07 3:15am
- pig1000
- Member
- Registered: 15/03/07
- Posts: 6
Re: New Space Invaders (w.t.)
This is my first post but i just wanted to encourage you, because i think this game could be great for psp so keep it up.
Offline
#38 20/03/07 3:32pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: New Space Invaders (w.t.)
Thanks
For some reason i missed this posts...
I think there is a way to make the reducement - now, every target has it's own script, with 10 loops. Is there a way to give an instance a certain code, from the main frame?
I bite!
Offline
#39 20/03/07 4:00pm
#40 20/03/07 4:04pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: New Space Invaders (w.t.)
I want ot take the code that i use on a invader, put it on a main frame and give it to every invader
I bite!
Offline
#41 20/03/07 7:44pm
Re: New Space Invaders (w.t.)
I doubt that'll make much difference to be honest - the same number of loops will still be running each frame, even if there are coming from a keyframe instead of a mc. If you could re-write the code so that it runs the loops once but checks all invaders, instead of running it for each invader that could work? Depends what control structure the code is in though as to whether you can put it on a keyframe or not.
PSP Flash Gaming creator
Offline
#42 28/03/07 7:17pm
Re: New Space Invaders (w.t.)
ok, just thinking, so if this is a flash game(?), how the heck r u gonna manage to get multible bosses n all to 1mb..? but hey good and very interesting idea...
[url=http://profile.mygamercard.net/JaX3RiR][img]http://card.mygamercard.net/nxe/JaX3RiR.png[/img][/url]
Offline
#43 29/03/07 12:17am
#44 17/04/07 9:59pm
- pig1000
- Member
- Registered: 15/03/07
- Posts: 6
Re: New Space Invaders (w.t.)
Hey soulofdarkness i was just wondering if you are going to finish this project cuz i think it will be a great game for the psp and one that i will play alot
Offline
#45 18/04/07 5:23am
- rollinroll
- Moderator
- Registered: 23/10/06
- Posts: 1890
Re: New Space Invaders (w.t.)
SoulOfDarkness hasn`t posted for a while... I doubt he`ll finish this project.
Offline
#46 18/04/07 8:25pm
Re: New Space Invaders (w.t.)
hey dude that game is great... nice graphics... I just cant get all the targets
I got a NEW PC !!!!!!
( cause my other one broke) Now back to the comics.. I have to make everything all over again )
Offline
#47 05/07/07 5:30pm
Re: New Space Invaders (w.t.)
i havnt been on ina LONG time but im back and not doing much with flash games but im doin homebrew firmwares now seeing as dark_alex is gone but this is the only flash game im really looking forward to i like it alot but dont have time to mess with it myself im just wondering how progress is
Offline
#48 13/12/07 3:44am
#49 16/02/08 8:16am
- Alpha009
- Edge
- From: new york
- Registered: 03/02/08
- Posts: 1117
Re: New Space Invaders (w.t.)
man that sucks. the game looked so good but it was stopped. it's like every good game stops
Offline