Author Topic: IDE for Danmakufu Scripts  (Read 5666 times)

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
IDE for Danmakufu Scripts
« on: December 18, 2009, 07:02:44 PM »
I'm working on an IDE for Danmakufu Scripts; it's written with C# and uses JSON to export/import external code snippets.

The main idea behind this IDE is to use Snippets to make script creation faster and more efficient.

A Snippet is composed by:
  • A name: a string that identifies the snippet
  • A list of Fields: a list that contains a various amount of fields

A Field is composed by:
  • A name: that identifies the field
  • A type: the field can be a number, a string, true or false, etc

For example, the CreateShot01 function can be written as a simple snippet:
  • Name: CreateShot01
  • Field 01: X coordinate - number
  • Field 02: Y coordinate - number
  • Field 03: Speed - number
  • Field 04: Angle - number
  • Field 05: Graphic - shot id
  • Field 06: Delay - number

The IDE helps the programmer by creating an intuitive windows with graphically represented fields (a checkbox for true/false, a textbox for strings, a numeric counter for numbers, etc) which helps him avoiding stupid errors and helps him being faster.

Before I will release a working version of the project, I would like to hear some suggestions. Syntax highlighting will probably be added in later versions. The first version will have a fully working snippet system and a primitive interface.

What features would you like to see?

« Last Edit: December 18, 2009, 07:06:40 PM by SupahVee1234 »

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: IDE for Danmakufu Scripts
« Reply #1 on: December 18, 2009, 07:56:31 PM »
Seems pretty interesting, but will this really work out?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: IDE for Danmakufu Scripts
« Reply #2 on: December 18, 2009, 08:10:38 PM »
Correct me if I am wrong but, what good does it has when you are using the X coordinate and Y coordinate a number. That is making the position static instead of dynamic where GetEnemyX and other alike functions continuesly update the x and y location of the enemy for spawning the bullet. Therefor when you move the enemy, you want the coordinates to generate according to it's position.

The only good this script would do of yours is eliminating possible writing errors such as lack of parameters and so on. But I think you are jumping the boat too early as bullets are the most complex functions being used. Also don't forget that scripting is not just typing numbers. Parameters are named parameters for a reason.

How are you going to handle for example:
- Function based bullets or data being parsed
- How will you handle object bullets as they are freely programmable
- How will you handle complex math or any other form of calculation inside the functins.
- Using functions like GetX / GetY or other functions then letting lose calculation on them.

I am somewhat doubting if it really makes your life easier, just more UI based overview when you keep it simple. I don't know about other people, I prefer to type my code instantly on screen as it is better for my personal overview and planning.

Here is the summary of my post: Don't ask for features (yet), just create a snippet with CreateShot01, demonstrate it then we can probably continue to debate it. I first want to see how you plan to fit it together.


ps edit: Always9, your post is not really helping the discussion of the thread.

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #3 on: December 18, 2009, 08:19:57 PM »
Nice points.

I suppose you could type anything you want into a "parameter".

The main purpose is helping people avoid making stupid mistakes or forget one of the parameters.

Also, my IDE will obviously not do everything, so the user will still have to write most of the code, but maybe instead of having to write the same loop to check through "bullets" array every time he could just press a button. To handle complex math and complex stuff he will obviously need to write; even in a snippet, you could write anything you want into parameters.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: IDE for Danmakufu Scripts
« Reply #4 on: December 18, 2009, 08:27:22 PM »
I don't know if this is possible: here is a certain idealistic view. I wonder if it is possible to have some sort of assistant or guard in Notepad ( or Notepad++ ) that watches over your typing.

Example: Such in, if it detects the user is typing CreateShot01, it will suddenly warn the user by possible a graphical picture or a highlight ( without disturbing the view ) that this function contains 6 parameters. Because parameters are ALWAYS seperated by a komma, you can check the user if he is completing the needed parameters. ( Maybe also checking if he correctly closes the ammount of parantheses.

I think such function would be much more of a use than a snippet. Then again I have 0 knowledge of modules and application but can tell alot how my scripting behaviour is. ( which is pretty general to any scripter ).

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #5 on: December 18, 2009, 08:35:11 PM »
Here's what I've done so far.

I've replaced JSON with XML because JSON was being a pain in the ass.

This is the XML file for an example CreateShot12 snippet:
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<snippet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreateShot12">
  <snippetField type="TEXT" name="X-coordinate" />
  <snippetField type="TEXT" name="Y-coordinate" />
  <snippetField type="TEXT" name="X-starting speed" />
  <snippetField type="TEXT" name="Y-starting speed" />
  <snippetField type="TEXT" name="X-acceleration" />
  <snippetField type="TEXT" name="Y-acceleration" />
  <snippetField type="TEXT" name="X-min/max speed" />
  <snippetField type="TEXT" name="Y-min/max speed" />
  <snippetField type="TEXT" name="Graphic" />
  <snippetField type="TEXT" name="Delay" />
</snippet>

This is the window that's displayed:


It's very WIP for now, but the main idea is there. I could improve it in the future by exchaing the "Graphic" textbox with something like this, where you can see all the bullets:


And why not - I could also have tooltips that explain what every parameter means to the user.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: IDE for Danmakufu Scripts
« Reply #6 on: December 19, 2009, 02:01:36 AM »
Sounds like an interesting idea, but it seems kind of ambitious after reading what Helepolis pointed out. If you can manage to pull it off for all of those points, I have no doubt that it will make programming for Danmakufu a lot easier. The biggest concern would probably be the handling of objects and tasks since the combination of both those makes things fairly flexible and hard to map out in a GUI. Nevertheless, keep at it. If worse comes to worst, it can still be used as a transitional program to help new users get used to the Danmakufu syntax and logic handling before switching to a pure text editor for the nitty gritty details and complex stuff.
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #7 on: December 19, 2009, 12:34:14 PM »
A little update.




And another update:


I've added customizable combo boxes. You can add there the expressions you use most frequently.
« Last Edit: December 19, 2009, 01:15:32 PM by SupahVee1234 »

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #8 on: December 19, 2009, 09:30:57 PM »
And here is the first version, a very primitive one.


What can you find in this version?
  • Simple notepad-like text editor to manually edit scripts or text files
  • Snippets that speed up coding; they can be created and managed from the program
  • Fast Expressions - a list of values or strings that can be edited anytime to speed up coding
  • Text and Check fields: the first one returns a string or a number, the second one true/false

How can I create a new snippet?
  • Open the Tools menu and then Snippets
  • Click on Create
  • Choose a Name and a Description - these are completely for user-friendlyness and won't affect your snippet
  • Add as many Fields as you like

Now... the tricky part. It's better to explain you how to write an Output with an example.

The Output "CreateShot01(|?0|, |?1|, |?2|, |?3|, |?4|, |?5|);" returns respectively the FIRST field in |?0|, the SECOND field in |?1|, the THIRD field in |?2|, and so on. Writing a correct output is important or else the snippet will be useless. Remember that anything that ISN'T between "||" isn't affected by any field or anything: you can write whatever you want.

ScriptFu download link: http://upload.namelezz.net/downloader.php?file=917624_ScriptFu01.rar

Infy♫

  • Demonic★Moe
  • *
Re: IDE for Danmakufu Scripts
« Reply #9 on: December 20, 2009, 12:00:42 PM »
You should really make something we can use to make bullet art with. like a yukkuri face xD

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #10 on: December 20, 2009, 01:37:59 PM »
You should really make something we can use to make bullet art with. like a yukkuri face xD

What do you mean - a snippet to make bullet code or a paint-like program?

Infy♫

  • Demonic★Moe
  • *
Re: IDE for Danmakufu Scripts
« Reply #11 on: December 20, 2009, 01:41:54 PM »
A snippet creator that has a grid on which you can place various bullets. so it mainly focuses on the point where they are created
you can edit the properties of each bullet, like bullet type( 01, 02, a)
If you dont understand what i mean, please look at drake's entry for dead simple

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #12 on: December 20, 2009, 02:05:57 PM »
A snippet creator that has a grid on which you can place various bullets. so it mainly focuses on the point where they are created
you can edit the properties of each bullet, like bullet type( 01, 02, a)
If you dont understand what i mean, please look at drake's entry for dead simple

Oh, I just downloaded the entry. Awesome.

Anyway, things like the big circle bullets composed of small bullets are possible with Snippets. The complex things like the drawings aren't possible with the current Snippets but I could try in the remote future to create a tool that transforms a png pixel image into a bullet creation function. That wouldn't even be a loop though, it will just be pure "CreateShot01" for each pixel. Actually it isn't that hard to do, I may do it later.

Actually I have a even better idea. I could make a new FIELD type called "IMAGE", in which the user can import a png image composed by white and black pixels. The snippet could do something for each pixel.
« Last Edit: December 20, 2009, 02:08:22 PM by SupahVee1234 »

Infy♫

  • Demonic★Moe
  • *
Re: IDE for Danmakufu Scripts
« Reply #13 on: December 20, 2009, 07:30:29 PM »
What you could also do is make a grid on which you can place dots. these will then be processed into a snippet

SupahVee1234

  • Koishi isn't cute
  • would you like some deathbomb
Re: IDE for Danmakufu Scripts
« Reply #14 on: December 21, 2009, 08:59:29 AM »
Yeah but just importing your images is better, everyone prefers working with their favourite image editor.