Has anyone ever used BulletML with blitz?

Blitz3D Forums/Blitz3D Programming/Has anyone ever used BulletML with blitz?

Hey all,

I'm thinking about prototyping some shooter ideas i have and was wondering if anyone has ever used bulletML with blitz... Seems like it might be really useful -- not sure what it would take to wrap it tho.

here's a link to bulletML if you've not seen it before:
http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html

thanks!
roland

There used to be a module (probably still is!) done by indiepath, that allowed blitz .exe's to run inside an internet explorer/firefox window.

http://www.indiepath.com/

igLoader it's called :o)

http://igloader.com/

Hmm... I wasn't hoping to use the BulletML Java applet, but rather to access the bulletml as a DLL from inside a regular blitz application. It seems like it would be great if we could control our particle systems with it instead of having to recode what it does so well. So i'm not sure that igloader would help. Maybe I'm missing something?

thanks for the quick reply, though!

Why did you mention that Ross?

'BulletML can describe the barrage of bullets in shooting games.'

Doesn't seem to be anything to do with loading in a browser?

Ah sorry, i must have skimmed over that paragraph. I though it was something to allow apps, like shooters to run inside a browser.

I'm not sure i get the point of it?

No prob. If you tinker with the demo applet on the page that I linked out it will probably make more sense to you.

It's basically a simple XML based mark up language for describing complex bullet behaviors (ala side-scrolling shooter games, like gradius, ikaruga, darius, or even 360 degree shooters like geometry wars).

Once you've defined a bullet behavior in the XML, you pipe it into the DLL / Java code and it would be used to control your particle's behavior. Almost like a physics system for bullets.

If you look at some of the examples you can see that all sorts of sweet complex behaviors can be modeled in a really simple way. It lets you focus on the creative design of the bullet behavior instead of the nitty-gritty math and coding for making them work.

Oh, i get you now :o) Looks like it could be handy yeah!

I could really use this, but wouldn't know where to even begin writing a wrapper. I would gladly put up a $$$ reward if someone would get this working in b3d along with nice easy to follow example(s)/tutorial...

I haven't downloaded it but I doubt it does anything which you can't do yourself in blitz fairly easily?! What exectly do you need to do with the bullets? I'm sure I and many other here can help with the code.

I want to have bullets that can change speed and direction or spawn new bullets from those bullets at any given time. It just seemed relatively easy to make complex patterns with bulletml.

To be honest, I don't know enough about programming yet to make an informed decision on how I should be going about making bullet patterns(using bulletml, hard-coding them, making pre-defined "basic pattern"-functions or whatever).

I'm trying to make a vertical scrolling shooter in the vein of Raizing, Cave, Psykio, etc...

Check out the bulletml java demo here: http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/bulletml_applet_e.html
if you pick a pattern from the drop-down list other than "template.xml" and hit start, you can see the kind of bullet patterns I'd like to make(the first time I hit start, it took a few minutes...).

My apologies for hijacking this thread,maybe I should create a new one in the beginners area?

When I first bought blitz, I wrote a small test program to see if I would be able to learn to program enough to make a shmup. My test program has a scrolling background, enemies that move down the screen and shoot, player ship movement, etc... I tried to break everything down into seperate functions, and tried to keep the drawing and logic operations seperate. Here is what I have for (lame)bullet patterns:
 Sorry for the excessive commenting, It's just so I don't forget what the heck I was trying to do.  I'm not too good at reading code yet(even my own!)

Function createenemybullet() ; generate new enemy bullets
 For weak1.enemyship = Each enemyship
 If weak1\id = 1                                                                  ; select the first enemy ship 
  newenemybulletfast = Rand(1,100)                                                ; temp variable to hold random number for intermittent bullet generation
  If newenemybulletfast > 92                                                      ; check temp variable to seldomly shoot bullets
   basicbullet.enemybullet = New enemybullet                                      ; create new enemy bullet
   basicbullet\x = weak1\x                                                        ; set start x axis location @ enemy ship
   basicbullet\y = weak1\y                                                        ; set start y axis location @ enemy ship
   basicbullet\v = basicfastenemybulletspeed                                      ; set speed
   basicbullet\kind = "fastbullet"                                                ; label as fast bullet
   basicbullet\angle# = ATan2(player\x - basicbullet\x, player\y - basicbullet\y) ; aim bullet at players current location
  End If                                                                          ; end check for creating new bullet at random
 End If                                                                           ; end check for first enemy ship
 If weak1\id = 2                             ; select second enemy ship
  newenemybulletslow = Rand(1,100)           ; temp variable to hold random number for intermittent bullet generation
  If newenemybulletslow > 75                 ; check temp variable to seldomly shoot bullets
   basicbullet.enemybullet = New enemybullet ; create new enemy bullet
   basicbullet\x = weak1\x                   ; set start x axis location @ enemy ship
   basicbullet\y = weak1\y                   ; set start y axis location @ enemy ship
   basicbullet\v = basicslowenemybulletspeed ; set speed
   basicbullet\kind = "slowbullet"           ; label as slow bullet
   basicbullet\angle# = Rand(0,359)          ; aim bullet in random direction
  End If                                     ; end check for creating new bullet at random
 End If                                      ; end check for second enemy ship
 Next                                                                             ; loop back to next enemy ship
End Function

Function updateenemybullet() ; move or delete enemy bullets
 For basicbullet.enemybullet = Each enemybullet                                                                   ; loop through all enemy bullets
   basicbullet\x = basicbullet\x + (Sin(basicbullet\angle#) * basicbullet\v)                                      ; move enemy bullet on x axis for specific angle and modify by speed variable
   basicbullet\y = basicbullet\y + (Cos(basicbullet\angle#) * basicbullet\v)                                      ; move enemy bullet on y axis for specific angle and modify by speed variable
  If basicbullet\y > plyfldht Or basicbullet\y < scrntop Or basicbullet\x > plyfldrt Or basicbullet\x < plyfldlft ; check for bullet offscreen 
   Delete basicbullet.enemybullet                                                                                 ; delete offscreen bullet
  End If                                                                                                          ; end check for offscreen bullet
 Next                                                                                                             ; jump back for next bullet
End Function

Function showenemybullet() ; draw the enemies bullets
For basicbullet.enemybullet = Each enemybullet                 ; loop through all enemy bullets
If basicbullet\kind = "slowbullet"                             ; check for slow enemy bullets
 DrawImage(basicenemybullet2image,basicbullet\x,basicbullet\y) ; draw the slow enemy bullet
Else If basicbullet\kind = "fastbullet"                        ; check for fast enemy bullets
 DrawImage(basicenemybullet1image,basicbullet\x,basicbullet\y) ; draw the fast enemy bullet
End If                                                         ; end check for kind of enemy bullets
Next                                                           ; loop back through for the next enemy bullet
End Function


Random spam fire, and aimed shots. Not too exciting...
Also, using random to set the timing of bullet generation is cheesy. What's a better way?

To do real patterns, I'm not sure what to do. Bulletml seems to make the process fairly easy, but maybe it's more trouble than it's worth to get it up and running with blitz?

Should I be trying to make my own editor(probably way beyond my ability)? I have particle candy(which I haven't even started to learn yet), should I setup my bullets as particles and use an existing editor(is that possible/practical)?

What would be the best way to hard code patterns? create a turret type assignable to an enemy that contains x number of barrels each facing x direction, that spawn bullets? What sort of fields should these types have? ID,speed,x,y,direction,time alive,anim stuff, anything else... Fancy algorithms?

Or should I setup different styles of patterns each in their own function? i.e. aimed shots vs. circle shots vs. star bursts vs. spiral vs. grouped shots vs. etc, etc, etc...