[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
shmup-dev | forum - View topic - Pattern/Enemy Script, How To?

Pattern/Enemy Script, How To?

This forum is for discussing shmup development, tools, engines and techniques.
User avatar
Posts: 12
Joined: Tue Jul 31, 2012 7:46 pm

Pattern/Enemy Script, How To?

Postby XYX » Wed Oct 17, 2012 6:17 pm

I was wondering how all you guys create your patterns and shooting scripts for enemies?
Im thinking something along the lines of Danmakufu that uses scripts, so a script might contain something like:

ring(20,10,0,false,0) fire ring of 20 shots, 10 times, no angle mod, dont change num, no num mod
arc(10,10,p,0,true,1) fire arc of 10 shots, target player, 0 ang mod, do reduce num each round, reduce num by one

my main question is how do you go about having these in a text file and parsing them to your game? i need lots and lots, each to be chosen randomly(ish) do i store them all as some kind of object?

Thanks guys :)

User avatar
Posts: 34
Joined: Sun Jul 29, 2012 4:44 pm

Re: Pattern/Enemy Script, How To?

Postby kdmiller3 » Thu Oct 18, 2012 10:19 pm

To answer your initial question, I store everything in XML documents and parse them with .

You might want to start by doing everything in code instead of trying to parse external data files. You'll need to create game logic and data structures (or classes) anyway so you might as well start there. :)

User avatar
Posts: 12
Joined: Tue Jul 31, 2012 7:46 pm

Re: Pattern/Enemy Script, How To?

Postby XYX » Sat Oct 20, 2012 2:00 pm


User avatar
Posts: 34
Joined: Sun Jul 29, 2012 4:44 pm

Re: Pattern/Enemy Script, How To?

Postby kdmiller3 » Sun Oct 21, 2012 7:00 am


User avatar
Posts: 34
Joined: Sun Jul 29, 2012 4:44 pm

Re: Pattern/Enemy Script, How To?

Postby kdmiller3 » Mon Oct 22, 2012 12:25 am


User avatar
Posts: 12
Joined: Tue Jul 31, 2012 7:46 pm

Re: Pattern/Enemy Script, How To?

Postby XYX » Thu Oct 25, 2012 9:46 pm

thanks for this VERY useful info, i tried looking at converting a string to hex values, i cant seem to get it formatted like yours so i decided to maybe use the string hashcodes instead? (java seems to have a DataType.getHashcode() method that returns an int)

unfortunately im still getting my renderer to work when generating ships, ive just finished the bullet managers classes. This xml stuff is going to link in with that and the 'behaviors' which are up next :)

User avatar
Posts: 34
Joined: Sun Jul 29, 2012 4:44 pm

Re: Pattern/Enemy Script, How To?

Postby kdmiller3 » Fri Oct 26, 2012 3:58 pm


User avatar
Posts: 12
Joined: Tue Jul 31, 2012 7:46 pm

Re: Pattern/Enemy Script, How To?

Postby XYX » Sat Oct 27, 2012 1:42 pm


User avatar
Posts: 6
Joined: Fri Jul 27, 2012 12:30 am
Location: Blasting off and striking the evil Bydo empire!

Re: Pattern/Enemy Script, How To?

Postby berilium » Sat Oct 27, 2012 5:03 pm


User avatar
Posts: 34
Joined: Sun Jul 29, 2012 4:44 pm

Re: Pattern/Enemy Script, How To?

Postby kdmiller3 » Sun Oct 28, 2012 3:51 am


Return to Development

Who is online

Users browsing this forum: No registered users and 0 guests