Author Topic: A replacement for Danmakufu?  (Read 230145 times)

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: A replacement for Danmakufu?
« Reply #330 on: October 30, 2009, 03:11:29 AM »
It's always better to have extra useless functions than to be missing one that could potentially be useful later on. I say to add it just for the one oddball case way down the road that might require it. (Also, a built-in function to take the highest or lowest of a set of two numbers would be great. It's extremely simple to code your own, but if it's that easy to make you might as well have it built-in.)

Re: A replacement for Danmakufu?
« Reply #331 on: October 30, 2009, 03:13:23 AM »
It's always better to have extra useless functions than to be missing one that could potentially be useful later on. I say to add it just for the one oddball case way down the road that might require it.

This. Everything that you can set you should be able to get, as a rule. You never know.

Re: A replacement for Danmakufu?
« Reply #332 on: October 30, 2009, 04:56:29 AM »
This. Everything that you can set you should be able to get, as a rule. You never know.
Seconded. And in this case it's just a boolean.

(Furthermore, if we want to be compatible with Everything Else, it should be easy for a script to get at everything someone else's script did ...)

Re: A replacement for Danmakufu?
« Reply #333 on: October 30, 2009, 09:05:41 AM »
I do think it would be good to have the option for using either for the trig functions/angle/etc.
As far as a default, it seems most people want degrees as the default, it seems that most people want degrees.  The plan is to have a command to switch it, which will be remembered for each object (so set it once in initialize and you're good to go).
Having switches like that can become a bit confusing (think about Object.GetAngle!).

Maybe you can promote angle to a type:
Code: [Select]
angle_t a = degrees(270);
a += radians(PI);
print(a.degrees()); //prints 90 (not 450)

Re: A replacement for Danmakufu?
« Reply #334 on: October 30, 2009, 04:44:15 PM »
Hmm, good idea.

How would the values be stored, though? I have this vision of "dodgeThis.getDegrees()" where the "dodgeThis" angle was set as radians, and getting a result like 44.99999999875 or whatever instead of 45.

Re: A replacement for Danmakufu?
« Reply #335 on: October 30, 2009, 06:05:04 PM »
How would the values be stored, though? I have this vision of "dodgeThis.getDegrees()" where the "dodgeThis" angle was set as radians, and getting a result like 44.99999999875 or whatever instead of 45.
A difference of 0.00000000125 shouldn't be noticeable.

It might not be exactly 45.00000000000, but you shouldn't compare floating point numbers for equality anyway.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #336 on: October 30, 2009, 08:04:42 PM »
(Furthermore, if we want to be compatible with Everything Else, it should be easy for a script to get at everything someone else's script did ...)

This will be a non-issue.  The degrees/radians selection will be stored for each individual object independantly, so there's no chance for one object's script to mess up the angle type selection of another object's script.



Maybe you can promote angle to a type:
Code: [Select]
angle_t a = degrees(270);
a += radians(PI);
print(a.degrees()); //prints 90 (not 450)

An interesting idea, but ultimately I think it's unnecessary, since angles are just numbers anyways (and I can easily enough add code to automatically clip it in the range of [0,2pi)/[0,360) anyways ...).  Does anyone see use in this that I'm missing?



As far as internal storage, I think it would be best to store angles internally as radians, and convert them to/from degrees when necessary.  This is because, like I mentioned in my last post, all of the internal trig functions and such use radians, and considering that there are some operations that rely on these functions every frame for every object, it would probably be significantly less efficient to convert from degrees every time.

And, before anyone asks, I don't think it would be a good idea to store the angle as both, since that's pretty much just asking for a code oversight somewhere that would lead to the two values becoming inconsistent.




EDIT: A quick update tonight.  Didn't anticipate my jaw hurting quite this much after some minor dental surgery (I'm an idiot.  What else is new?), so I'm, as they say, "taking it easy." :yukkuri:

  • mdScript
    • Fixed a quick oversight in the grammar that prevented negative number literals from being read in.
  • The main program
    • Removed underscrores from default function and object type names (per majority request)
    • Added function UseRadians - takes one boolean argument, which sets whether to use radians or degrees when running scripts for this object.  Defaults to degrees (since that's what it seems most people want).
    • Added some essential trig functions: sin, cos, and arctan2



For reference, here's the current list of functions available to mdScript scripts:

  • GetMyID() - returns the ID number for the current object.
  • CreateObject(name, x, y) - creates a new object, at (x, y), of type name (name is a string); returns the object's ID.
  • DestroyObject(id) - destroys the indicated object.
  • FireShot01(x, y, angle, speed, image) - fires a basic enemy bullet with the given parameters.  NOTE: this function is very likely to be changed around before a real release.
  • SetSize(size1, size2) - sets the sizes of the current object.
  • SetImage(image, rotate, layer) - sets the current object's image and image-related info.  If rotate is set true, the image will rotate with the object's angle.  layer is the graphics layer to render the object on (higher = more "visual priority", so to speak).
  • SetPlayerMovement(unfocused, focused) - sets the player-controlled movement speeds for the current object.
  • UseRadians(boolean) - sets whether angles are degrees or radians for this object.
  • sin(angle) - gets the sine
  • cos(angle) - gets the cosine
  • arctan2(y, x) - gets the arctangent

I'm noticing a bunch of functions defined here (pretty much all of them currently :V) are basically just wrappers for underlying mdBase commands, so I'm wondering if I should save some stack and redefine them to translate directly into said commands rather than using a function call ...
It's a minor implementation detail, but it could certainly shave a few cycles off of execution.



Anyways, I'm off to go teach some zombies that a hurting jaw is no reason for me to be incapable of blasting their heads off with a shotgun - that is, some Left 4 Dead. >:D

EDIT2: No, it's okay guys.  Just stay on the ladder while I get mauled.
Fucking bots. >__<
« Last Edit: October 31, 2009, 04:27:12 AM by Nuclear Cheese »
to quote Naut:
"I can see the background, there are too many safespots."
:V

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #337 on: October 31, 2009, 10:27:42 PM »
Hey guys, hope you're all having fun.

Did some work today.  Mainly adding in new functions:
  • GetX, GetY, SetX, SetY
  • GetAngle, GetSpeed, SetAngle, SetSpeed
  • ObjGetX, ObjGetY - pass it the ID of an object to get the X/Y.
  • GetPlayerID - gets the player object's ID (returns -1 if no player is spawned)

Just some simple stuff, but this allows some cool things like shots aimed at the player.

I also updated the enemy in the main testing script:

Code: (TheEnemy.txt) [Select]
Musuu
Script[mdScript]

// TheEnemy
// Enemy boss that makes some fucking danmaku.
Boss "TheEnemy"
{
   define count;
   define move;

   initialize
   {
      SetImage("reimu1.png", false, 30);
      SetSize(24, 30);
      count = 60;
      move = 0.5;
      UseRadians(true);
   }

   tick
   {
      SetX(GetX() + move);

      if (GetX() > 350)
      {
         move = -0.5;
      }
      if (GetX() < 76)
      {
         move = 0.5;
      }

      count = count - 1;

      // When count reaches zero, we fire a spread of bullets, and spawn a point item.
      if (count <= 0)
      {
         // Adjust the "30" here to change the frequency of firing spreads.
         count = count + 30;

         bullets = 11;
         increment = 1.5707963267948966192313216916398 / (bullets - 1);

         angle = 3.1415926535897932384626;

         player_id = GetPlayerID();
         if (player_id > -1)
         {
            ydiff = ObjGetY(player_id) - GetY();
            xdiff = ObjGetX(player_id) - GetX();
            if (xdiff == 0 && ydiff == 0)
            {
               // Just in case ...
               ydiff = 1;
            }
            angle = arctan2(ydiff, xdiff);
         }

         angle = angle - (increment * ((bullets - 1) / 2));
         while (bullets > 0)
         {
            FireShot01(GetX(), GetY(), angle, 2.5, "shot1.png");
            angle = angle + increment;
            bullets = bullets - 1;
         };
         CreateObject("EvilShot", GetX(), GetY());
         CreateObject("PointItem", GetX(), GetY());
      };
   }
}

Enemy_Shot "EvilShot"
{
   define count;
   define next_count;

   initialize
   {
      SetSize(5.5, 7.5);
      SetAngle(180);
      SetSpeed(1.5);
      count = 60;
      next_count = 90;

      // Call the internal bullet init function to ensure standard stuff is setup
      enemy_shot_init();
      SetImage("shot2.png", true, 55);
   }

   tick
   {
      count = count - 1;
      if (count <= 0)
      {
         count = next_count;
         next_count = next_count + 30;

         player_id = GetPlayerID();
         if (player_id > -1)
         {
            ydiff = ObjGetY(player_id) - GetY();
            xdiff = ObjGetX(player_id) - GetX();
            if (ydiff == 0 && xdiff == 0)
            {
               ydiff = 1;
            }
            SetAngle(arctan2(ydiff, xdiff));
         }
      }
   }
}

Important to note (aside from some minor changes and fixes) is the addition of the custom shot type "EvilShot".  This shot will re-aim itself to face the player after 60 frames, then do so again after 90 frames, then 120 frames, etc ...

I also made the main spread of blue bullets aimed at the player.  This is now a lot harder to dodge than the earlier variants. :D



Now, one more thing to address ... *clears throat*

TESTING RELEASE 1

It is still missing a bunch of stuff, but it's complete-enough to have people start throwing down some custom scripts and seeing how easily they can break it.


Important:

If you're running on a non-Windows platform, you'll need to use Mono to run the program.  Please let me know how that works out, by the way - I don't have any non-Windows machines to try it out on.

You need to install the SDL.NET runtime libraries.  Go here, select the downloads link, and grab the most recent version for your platform.  There are necessary, since they include the SDL.NET function mapping that the program uses.

I included the Tao framework .dlls, but if that doesn't work find an installer here, and then let me know (so I can update the info).



Included in the testing archive:
  • The program itself
  • Tao framework DLLs
  • ANTLR runtime DLL
  • A sample script, along with images (yes, I know the "point item" image looks too much like another shot.  I'm not an artist. :V)
  • A readme that outlines important info



As this is a testing release, please keep in mind that there is no gaurentee that the program won't randomly shit itself.  In fact, part of what this release is for is to find such situations, so that they can be remedied.
The program is currently written such that, if anything errors, it will simply close itself immediately.  This is the safest thing to do at the moment, in my opinion, so that things don't start getting ugly.


In the event of an error:

If the program is erroring, please do the following:

  • Check any custom scripts you made.  Right now, I can't catch syntax errors in mdScript because ANTLR catches them internally, so if there's an error in there it may be ignoring part of your script.
  • Run the program using the "-l" command line parameter (you can create a shortcut to the program, and add a space then "-l" to the end of the target.) - this will create a log file which will catch some more information on the error.
  • Post the log file, the scripts being run, and any other relevant information here, so I can evaluate.



To run scripts other than the default one, and getting some extra info:

You can specify a set of script files to load instead of the default ("script2.txt") by adding the file names to the command line.

Also, you can add the "-dt" option to the command line to have the program write debugging information in the window's title bar - FPS, # of objects, graze counter, and score.


So, for instance, if you want to run "omgscript.txt" and show debugging info:
"Musuu no Danmaku.exe" omgscript.txt -dt

Note that the program will attempt to spawn one "Boss" and one "Player" object - if none of the specified scripts contain one, than one won't be spawned.  See the provided sample scriptfiles for an example.



This is a temporary way of loading scripts, until a menu is implemented (which requires me to implement fonts).



Controls:

Currently, the controls are fixed.  Control configuration will come later, once there's a menu setup.

Arrow keys - move
Shift - focused movement
Z - shot (currently unusable, since there's nothing triggered off of it)
X - bomb (currently unusable, since there's nothing triggered off of it)

Escape - quits the program immediately - once we get menu stuff going, this will instead bring up the pause menu.



PLEASE KEEP IN MIND - this is an incomplete version, that does not yet have many features to be implemented.  A bit of patience is appreciated, and any bugs that you find will help make this program a better one!  Have fun, people. ;)



(bump, motherfuckers.)
to quote Naut:
"I can see the background, there are too many safespots."
:V

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: A replacement for Danmakufu?
« Reply #338 on: October 31, 2009, 11:41:04 PM »
  • A sample script, along with images (yes, I know the "point item" image looks too much like another shot.  I'm not an artist. :V)

Anyways, it's pretty great already.
I don't really seem to fit with not being able to have the triangle respawn. You know what I'm saying?
« Last Edit: October 31, 2009, 11:46:23 PM by AlwaysThe⑨ »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #339 on: November 01, 2009, 01:47:51 AM »
Anyways, it's pretty great already.

Good to hear.

The point item looks good.  Certainly better than my "I swear I'm not a shot guys!  Why don't you believe me?!" version. :V



I don't really seem to fit with not being able to have the triangle respawn. You know what I'm saying?

The disappearing thing is temporary, until we get proper "omg I dead" implemented for the player.



In the meantime, perhaps here's a trick you could try:

Spawn another object (probably an Effect object, so that everything leaves it alone) which checks if there is still a player object around and, if not, spawns a new one.
Quick think-though gives me the impression it's entirely possible with the current setup, although you'll have to spawn the extra object from either the player or enemy initialize scripts (and make sure it doesn't keep respawning).

Bonus points for making it look good ... somehow.  Need to get more of the graphics functions in place before we can expect to easily create awesome visual stuff.


... or, you could just modify the player script to remove the hitbox (set size1 to zero), but where's the fun in that?
to quote Naut:
"I can see the background, there are too many safespots."
:V

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: A replacement for Danmakufu?
« Reply #340 on: November 01, 2009, 03:04:43 AM »
For me it just says it has encountered a problem and needs to close :/
Edit: Nevermind I saw I didn't unpack a file.

Works awesome.
Is there a function similair to SetShotDataA?
« Last Edit: November 01, 2009, 03:13:37 AM by Seven Orange Clouds »
I had a teacher who used to play radiohead during class once.

ONCE.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: A replacement for Danmakufu?
« Reply #341 on: November 01, 2009, 03:21:20 AM »
For me it just says it has encountered a problem and needs to close :/
Edit: Nevermind I saw I didn't unpack a file.

Works awesome.
Is there a function similair to SetShotDataA?
Not yet, remember that Nuclear Cheese needs more time to put that in.

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: A replacement for Danmakufu?
« Reply #342 on: November 01, 2009, 03:40:05 AM »
Okay, so main things I see big need of in next update in order of importance:
Respawning (VERY high priority)
Shots (High Priority)
Bombs (low priority)
Live Stock (low priority)
Bomb Stock (low priority)
Point system (low priority)
Graze System (low priority)

Then some things that I would like to see in the long run:
Icon :V
Built-In Graphics
An ability to switch on/off the menu that danmakufu has (It's good for playing others' script, but it would be annoying to go through that process just to get to your script and having to quit and reenter just to see your player edits and this is one of the most annoying things about danmakufu for me :V)
I had a teacher who used to play radiohead during class once.

ONCE.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #343 on: November 01, 2009, 04:47:06 AM »
Works awesome.
Is there a function similair to SetShotDataA?

Not yet, remember that Nuclear Cheese needs more time to put that in.

True that there is no function like it implemented yet, but you can do something similar by creating a custom bullet type.



Okay, so main things I see big need of in next update in order of importance:
Respawning (VERY high priority)
Shots (High Priority)
Bombs (low priority)
Live Stock (low priority)
Bomb Stock (low priority)
Point system (low priority)
Graze System (low priority)

Then some things that I would like to see in the long run:
Icon :V
Built-In Graphics
An ability to switch on/off the menu that danmakufu has (It's good for playing others' script, but it would be annoying to go through that process just to get to your script and having to quit and reenter just to see your player edits and this is one of the most annoying things about danmakufu for me :V)

FYI - graze & score are there.  Add " -dt" to your shortcut or command line when running the program and you can see the graze & score counters (in the title bar).

Also, lives (and bombs if I remember correctly at the moment) do have counters in the code, but they don't have anything tied to them yet.



For the record - typing while holding an icepack to your face is a bitch. :-\
... just in case you were wondering.
to quote Naut:
"I can see the background, there are too many safespots."
:V

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #344 on: November 01, 2009, 08:38:51 AM »
It's apparently erroring for me, even though I ran both the SDL.NET runtime and the Tao framework runtime installers. Platform is Windows Vista Home Premium. The scripts being run are the default ones. Here's the log file (my computer is in Finnish, but I have translated the Finnish parts in English. Whenever there's a <.....> surrounding some text, that indicates a translated part):

Code: [Select]
Musuu no Danmaku version 0.1.3591.29235
Starting logging file ...
2009 <march> 01 10:18:02.704 - Initializing engine ...
2009 <march> 01 10:18:02.782 - Error during initialization: <The type initializer of> SdlDotNet.Graphics.Video <caused an exception>.
Stack trace:
   <at> SdlDotNet.Graphics.Video.SetVideoMode(Int32 width, Int32 height, Boolean resizable, Boolean openGL, Boolean fullScreen, Boolean hardwareSurface)
   <at> Musuu_no_Danmaku.Graphics.Initialize()
   <at> Musuu_no_Danmaku.Program.Main(String[] args)

The program will close now.

If there's a known fix for this, or if it's a result of some idiotic mistake I made, please let me know. And if not, then have some merry bugfixing...

EDIT:

I'm now on my second computer (I have to alternate between two computers on a weekly basis for various reasons) and tried running it. This computer has Windows XP Home Edition, and I've installed the SDL.NET runtime (version 6.1.0, same as on the other computer) on it (haven't installed the Tao Framework, but since it didn't help on the other comp and it seemingly hasn't been necessary for others, I don't think it'd help). The program gets further this time, but still manages to error and stop working. (It actually initializes the window this time! Oh well, like we needed any more proof that XP > Vista.)

Default scripts, log (full english this time, no need to translate):

Code: [Select]
Musuu no Danmaku version 0.1.3591.29235
Starting logging file ...
2009 marras 01 17:46:08.703 - Initializing engine ...
2009 marras 01 17:46:09.546 - Loading script objects ...
2009 marras 01 17:46:09.562 - Creating new Game object ...
2009 marras 01 17:46:09.593 - Error during initialization: Input string was not in a correct format.
Stack trace:
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)
   at Musuu_no_Danmaku.mdBaseReader.Parse_Instruction_Line(String line)
   at Musuu_no_Danmaku.Game..ctor()
   at Musuu_no_Danmaku.Program.Main(String[] args)

The program will close now.

Either I'm doing something horribly wrong or the program is really in need of some bugfixing.
« Last Edit: November 01, 2009, 03:54:39 PM by PT8Sceptile »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #345 on: November 01, 2009, 08:14:19 PM »
It's apparently erroring for me, even though I ran both the SDL.NET runtime and the Tao framework runtime installers. Platform is Windows Vista Home Premium. The scripts being run are the default ones. Here's the log file (my computer is in Finnish, but I have translated the Finnish parts in English. Whenever there's a <.....> surrounding some text, that indicates a translated part):

Code: [Select]
Musuu no Danmaku version 0.1.3591.29235
Starting logging file ...
2009 <march> 01 10:18:02.704 - Initializing engine ...
2009 <march> 01 10:18:02.782 - Error during initialization: <The type initializer of> SdlDotNet.Graphics.Video <caused an exception>.
Stack trace:
   <at> SdlDotNet.Graphics.Video.SetVideoMode(Int32 width, Int32 height, Boolean resizable, Boolean openGL, Boolean fullScreen, Boolean hardwareSurface)
   <at> Musuu_no_Danmaku.Graphics.Initialize()
   <at> Musuu_no_Danmaku.Program.Main(String[] args)

The program will close now.

If there's a known fix for this, or if it's a result of some idiotic mistake I made, please let me know. And if not, then have some merry bugfixing...

hmm ... I only saw this error when testing on my laptop before I installed SDL.NET runtimes.  I was originally going to just include the SDL.NET .dll's, but that didn't seem to work, so I instead point to the installer.

Just to make sure, you did unpack all of the files from the .zip into a folder on your hard drive, right?

I don't know too much about Vista, but you may want to try fiddling with the compatibility mode settings (at least XP compatibility mode).  I also remember hearing about some games needing admin privileges to run; this game shouldn't need them, but it may be worth a shot if you want to try it.

Finally, it may be something with the OpenGL drivers installed on your machine.  Unfortunately, I can't provide any real advice here at the moment; I don't think I've used anything but the stock OpenGL on my system.


This is something that's going wrong in SDL.NET's initialization of the window and OpenGL; unfortunately not code I wrote myself, so I can't offer any immediate code fixes if that is where the problem is.


Also - march?  Is your computer date set eight months back? o_O



EDIT:

I'm now on my second computer (I have to alternate between two computers on a weekly basis for various reasons) and tried running it. This computer has Windows XP Home Edition, and I've installed the SDL.NET runtime (version 6.1.0, same as on the other computer) on it (haven't installed the Tao Framework, but since it didn't help on the other comp and it seemingly hasn't been necessary for others, I don't think it'd help). The program gets further this time, but still manages to error and stop working. (It actually initializes the window this time! Oh well, like we needed any more proof that XP > Vista.)

Default scripts, log (full english this time, no need to translate):

Code: [Select]
Musuu no Danmaku version 0.1.3591.29235
Starting logging file ...
2009 marras 01 17:46:08.703 - Initializing engine ...
2009 marras 01 17:46:09.546 - Loading script objects ...
2009 marras 01 17:46:09.562 - Creating new Game object ...
2009 marras 01 17:46:09.593 - Error during initialization: Input string was not in a correct format.
Stack trace:
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)
   at Musuu_no_Danmaku.mdBaseReader.Parse_Instruction_Line(String line)
   at Musuu_no_Danmaku.Game..ctor()
   at Musuu_no_Danmaku.Program.Main(String[] args)

The program will close now.

Either I'm doing something horribly wrong or the program is really in need of some bugfixing.

This one bothers me more.  This looks to be where it's initializing the built-in function code - I wrote them as mdBase lines and feed them through the parser to generate the internal structures.


I notice "marras" for the month - what language/region is this system set for?  After a quick bit of research, depending on the region, the function "StringToNumber" will be expecting either a "." or a "," as a decimal point (pi = 3.14159 vs pi = 3,14159).  Is your region one that uses the comma?  That would explain the error if it is.



An oversight on my part; apologies.  I'll have to look at how to fix this, even if it's not what's causing the error.  Unfortunately, I think it'd be rather difficult to support the "," as a decimal point in the script files; it would throw the parser for a loop when it came across something like SetSize(5,7); - it wouldn't be able to determine if it was one parameter (5.7) or two (5 and 7).




Unfortunately, I don't think I'll get any more code done this weekend.  I have a couple things to take care of, and my jaw still hurts like a bitch.
I'll still look at any issues that come up during the week. :yukkuri:
to quote Naut:
"I can see the background, there are too many safespots."
:V

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #346 on: November 02, 2009, 06:02:19 AM »
hmm ... I only saw this error when testing on my laptop before I installed SDL.NET runtimes.  I was originally going to just include the SDL.NET .dll's, but that didn't seem to work, so I instead point to the installer.

Just to make sure, you did unpack all of the files from the .zip into a folder on your hard drive, right?

I don't know too much about Vista, but you may want to try fiddling with the compatibility mode settings (at least XP compatibility mode).  I also remember hearing about some games needing admin privileges to run; this game shouldn't need them, but it may be worth a shot if you want to try it.

Finally, it may be something with the OpenGL drivers installed on your machine.  Unfortunately, I can't provide any real advice here at the moment; I don't think I've used anything but the stock OpenGL on my system.

This is something that's going wrong in SDL.NET's initialization of the window and OpenGL; unfortunately not code I wrote myself, so I can't offer any immediate code fixes if that is where the problem is.

I already tried XP compatibility. However, admin priviledges should be worth a shot, or taking a look at the OpenGL installation on the computer. I can't test it until after a week, though, so this is somewhat irrelevant at the moment.

Also - march?  Is your computer date set eight months back? o_O

*FACEPALM*

Apparently I suck at translating and translated "Marraskuu" into "March" subconsciously while it's actually "November", and "Maaliskuu" is "March". Oh well, mistakes do happen...

This one bothers me more.  This looks to be where it's initializing the built-in function code - I wrote them as mdBase lines and feed them through the parser to generate the internal structures.


I notice "marras" for the month - what language/region is this system set for?  After a quick bit of research, depending on the region, the function "StringToNumber" will be expecting either a "." or a "," as a decimal point (pi = 3.14159 vs pi = 3,14159).  Is your region one that uses the comma?  That would explain the error if it is.


My region (Finland) uses the comma, so that might be the problem. Unfortunately, though, I have absolutely no idea how that setting should be changed, so can't really verify it is the problem.

EDIT:

Additional research reveals that according to the documentation source I found (http://msdn.microsoft.com/en-us/library/system.double.parse%28VS.71%29.aspx , I unfortunately have no previous knowledge on C# so I have to go by documentation) the parameter NumberFormatInfo in System.Double.Parse contains the data for the decimal annotation. Thus, you should probably try creating a CultureInfo for the culture the program is coded in, retrieving the NumberFormatInfo and using that as the parameter for the function instead of the current computer's culture. I have no idea will it work, though, since as stated, I have no prior experience about C# and am just referencing whatever documentation I'm finding. Good luck in fixing the problem, though.
« Last Edit: November 02, 2009, 06:46:15 AM by PT8Sceptile »

Re: A replacement for Danmakufu?
« Reply #347 on: November 02, 2009, 07:12:08 AM »
Quote from: readme
Before running, you must have the SDL.NET runtime installed.  Go to the
website - http://cs-sdl.sourceforge.net/index.php/Main_Page - and select
"Download SDL.NET", and select the newest version for your system.

Right, so I used the sdldotnet-6.1.0-runtime-setup.exe, and now your program doesn't give the "encountered a problem" message... it just doesn't do anything, at all. I'm pretty sure the program just closes down as soon as it opens. I'm running 64-bit windows XP here, is there anything you can tell me about what I could be doing to get this working?
The SoEW patch has had its second release, come and get it!

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #348 on: November 02, 2009, 03:12:28 PM »
Right, so I used the sdldotnet-6.1.0-runtime-setup.exe, and now your program doesn't give the "encountered a problem" message... it just doesn't do anything, at all. I'm pretty sure the program just closes down as soon as it opens. I'm running 64-bit windows XP here, is there anything you can tell me about what I could be doing to get this working?

This is most probably result of the program closing itself whenever it encounters an error. In order to locate the error, do the following:

Run the program from the command prompt with the additional parameter -l (for example:
"C:\\Path\To\The\Folder\Musuu no Danmaku.exe" -l). Or, if you somehow can't use the command prompt well enough: create a shortcut to the exe, open up the properties of the shortcut, add -l to the end of the path field (outside the quotation marks) and run the shortcut. Now, while it probably won't make the program work, the program should create a "log" file in the folder it's placed in. The contents of the log text file tell exactly where the error occured, so post them here. The log will often tell whether the problem is a bug in the software or whether it's caused by something else, so it's valuable information. And if it's a bug, then locating it is an important step towards fixing it.

Re: A replacement for Danmakufu?
« Reply #349 on: November 02, 2009, 08:15:36 PM »
Quote
Musuu no Danmaku version 0.1.3591.29235
Starting logging file ...
2009 Nov 02 14:13:19.312 - Initializing engine ...
2009 Nov 02 14:13:20.250 - Error during initialization: The type initializer for 'SdlDotNet.Graphics.Video' threw an exception.
Stack trace:
   at SdlDotNet.Graphics.Video.SetVideoMode(Int32 width, Int32 height, Boolean resizable, Boolean openGL, Boolean fullScreen, Boolean hardwareSurface)
   at Musuu_no_Danmaku.Graphics.Initialize()
   at Musuu_no_Danmaku.Program.Main(String[] args)

The program will close now.

So there's something wrong the the SDL.net installation? Bleh.
The SoEW patch has had its second release, come and get it!

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #350 on: November 03, 2009, 02:29:53 AM »
Apparently I suck at translating and translated "Marraskuu" into "March" subconsciously while it's actually "November", and "Maaliskuu" is "March". Oh well, mistakes do happen...

Oops. ;)



My region (Finland) uses the comma, so that might be the problem. Unfortunately, though, I have absolutely no idea how that setting should be changed, so can't really verify it is the problem.

EDIT:

Additional research reveals that according to the documentation source I found (http://msdn.microsoft.com/en-us/library/system.double.parse%28VS.71%29.aspx , I unfortunately have no previous knowledge on C# so I have to go by documentation) the parameter NumberFormatInfo in System.Double.Parse contains the data for the decimal annotation. Thus, you should probably try creating a CultureInfo for the culture the program is coded in, retrieving the NumberFormatInfo and using that as the parameter for the function instead of the current computer's culture. I have no idea will it work, though, since as stated, I have no prior experience about C# and am just referencing whatever documentation I'm finding. Good luck in fixing the problem, though.

Yeah, it sounds like the region thing is screwing it up.  I have the built-in functions hardwired into the program as mdBase statements; these statements (and the statements from converted mdScript scripts) have numbers with the '.' decimal point, so when the program expects the comma it goes kablooey.

I'll have to take a look at that link you posted, and figure out what I can do.  Unfortunately, I can't get any actual codework done now (family stuff pulls me miles away from my desktop; I'm stuck with my shitty laptop here), so I won't be able to get an updated version out for you to try until at least this coming Friday.



So there's something wrong the the SDL.net installation? Bleh.

That error was the one I saw before installing the SDL.NET runtime on my laptop - the same one you mentioned.
Only major difference is that I'm on a 32-bit XP system, not a 64-bit one.  I hope that's not the issue, though, cause that would suck.



*some research later* http://support.microsoft.com/kb/896456 aha!

Quote from: Microsoft
OpenGL
The x64-based versions of Windows Server 2003 and of Windows XP Professional x64 Edition do not include an OpenGL graphics driver. Contact the manufacturer of the device for a driver that is compatible with the x64-based versions of Windows Server 2003 and of Windows XP Professional x64 Edition.

This could be causing your trouble.  I would recommend looking for updated drivers for your graphics cards - of course, make sure you get 64bit drivers.
As for where to get those - that, of course, depends on your graphics card.

PT8 - this might be similar to the issue you're having on your Vista machine ... is it by any chance also a 64-bit machine?


Good luck!
to quote Naut:
"I can see the background, there are too many safespots."
:V

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #351 on: November 03, 2009, 01:52:38 PM »
PT8 - this might be similar to the issue you're having on your Vista machine ... is it by any chance also a 64-bit machine?

Good luck!

Unfortunately I have no way of checking that as of now. I'll be able to check that next sunday, since I'm on this XP machine this whole week.

And good luck for you too in fixing the number parsing problem once you're able to get coding again.
« Last Edit: November 03, 2009, 01:54:41 PM by PT8Sceptile »

Re: A replacement for Danmakufu?
« Reply #352 on: November 03, 2009, 09:11:42 PM »
Yes! After a lot of tinkering I finally got Musuu to run in my 64-bit Linux machine. If somebody want to try it in Linux too, here is how I did it:

* Installed Mono runtime.
* Downloaded SDL 6.1.0 tar.gz and extracted everything in bin into Musuu's folder.
* Downloaded Tao framework 2.1.0 tar.gz and extracted Tao.Sdl.dll, Tao.Sdl.dll.config, Tao.OpenGL.dll and Tao.OpenGL.dll.config from the bin folder into Musuu's folder.

I got a few error in the command-line but they seem to have no effect on the application.

Code: [Select]
line 26:6 missing SEMICOLON at 'if'
line 31:6 missing SEMICOLON at 'count'
line 54:12 missing SEMICOLON at 'angle'
line 57:9 missing SEMICOLON at 'angle'
line 105:12 missing SEMICOLON at 'SetAngle'
line 107:6 missing SEMICOLON at '}'
line 108:3 missing SEMICOLON at '}'
(I used the default scripts.)

Also I tried to run Musuu in my Virtual machine with Windows XP (this is where I run Danmakufu) but got the same error as PT8's second computer but that might be because my region also uses the comma as decimal point. (My Linux install is set to English)

(I have been following your project from start, just been to shy to join the forum.)

EDIT: I notified that the FPS sometimes goes over 60 (usually 62-63).
« Last Edit: November 03, 2009, 09:18:51 PM by Furu »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #353 on: November 04, 2009, 02:43:08 AM »
Yes! After a lot of tinkering I finally got Musuu to run in my 64-bit Linux machine. If somebody want to try it in Linux too, here is how I did it:

* Installed Mono runtime.
* Downloaded SDL 6.1.0 tar.gz and extracted everything in bin into Musuu's folder.
* Downloaded Tao framework 2.1.0 tar.gz and extracted Tao.Sdl.dll, Tao.Sdl.dll.config, Tao.OpenGL.dll and Tao.OpenGL.dll.config from the bin folder into Musuu's folder.

Good to know that the idea of cross-platform compatibility wasn't just a pipe-dream.

These instructions should be helpful for others in your situation, too.  Thanks!



I got a few error in the command-line but they seem to have no effect on the application.

Code: [Select]
line 26:6 missing SEMICOLON at 'if'
line 31:6 missing SEMICOLON at 'count'
line 54:12 missing SEMICOLON at 'angle'
line 57:9 missing SEMICOLON at 'angle'
line 105:12 missing SEMICOLON at 'SetAngle'
line 107:6 missing SEMICOLON at '}'
line 108:3 missing SEMICOLON at '}'
(I used the default scripts.)

Hmm ... those are messages from ANTLR.  Is the default danmaku working correctly?  It should fire spreads of round blue bullets aimed at you, and fire individual red arrow bullets which re-aim at you every once in a while.

I wonder if this is something that's happening on my end, even, and I'm not seeing it since it doesn't run from a console on Windows (even if you start it in a console, the console immediately returns and you don't get stdout or anything, from what I've seen).  I know that ANTLR tries to compensate for 'trivial' syntax errors, like "hey dumbass you need a semicolon here", so that's probably what it's doing with these messages.


... actually, I wonder if I accidentally duplicated the semicolon marker on some lines in the grammar ... I should look at that when I can.



Also I tried to run Musuu in my Virtual machine with Windows XP (this is where I run Danmakufu) but got the same error as PT8's second computer but that might be because my region also uses the comma as decimal point. (My Linux install is set to English)

Yeah, I'm pretty certain the whole comma as a decimal point thing is causing problems.  Again, I'll be looking to fix that quickly.

(This is why early test builds are good - we find things like this, which I would've had no friggin' clue about 'cause all my computers are either set as US or Japan.)



EDIT: I notified that the FPS sometimes goes over 60 (usually 62-63).

That's just a hiccup in the framerate.  Computers, especially in a large multiprocess environment like a typical PC, can have trouble keeping an exact framerate for an application such as this.  Minor variations will generally go unnoticed, but they're easier to see with the FPS counter.
As far as it going above 60, it's probably just falling a frame or two behind over time and catching up.

... either that or there's some inaccuracy in SDL.NET's framerate calculations ...
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #354 on: November 04, 2009, 06:16:32 PM »
Nuclear Cheese, do you need someone to draw some sample sprites for you, much like the ExRumia of danmakufu? I could probably sprite some enemies and bosses for you, if you want.

Re: A replacement for Danmakufu?
« Reply #355 on: November 04, 2009, 07:57:06 PM »
Yeah, it would be good to have a set of default (i.e. "not ripped from ZUN") graphics and sounds ...

I could provide some sounds, if you don't mind them sounding, um, a bit less like the original games ... See also http://www.freesound.org/ for that kind of thing ...

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #356 on: November 05, 2009, 02:28:44 AM »
Nuclear Cheese, do you need someone to draw some sample sprites for you, much like the ExRumia of danmakufu? I could probably sprite some enemies and bosses for you, if you want.

Yeah, it would be good to have a set of default (i.e. "not ripped from ZUN") graphics and sounds ...

I could provide some sounds, if you don't mind them sounding, um, a bit less like the original games ... See also http://www.freesound.org/ for that kind of thing ...

Yeah, some default, original stuff would be cool.  I just pulled the PyroReimu graphic 'cause it was convenient (straight out of Hax Sign 「Burn Everything」; in turn, straight from the Walfas character creator :V).

You could even swap out the graphics in the sample script to try it out (or, if you're feeling ambitious, try creating a new script even).



Sounds are a good idea as well, although there's no code in place for them, so you can't see how they work in-game yet.

That Freesound site looks useful, too.  Just need to make sure we keep up with the attribution on each sound if we go with that path.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #357 on: November 05, 2009, 03:16:40 PM »
Hmm ... those are messages from ANTLR.  Is the default danmaku working correctly?  It should fire spreads of round blue bullets aimed at you, and fire individual red arrow bullets which re-aim at you every once in a while.

I wonder if this is something that's happening on my end, even, and I'm not seeing it since it doesn't run from a console on Windows (even if you start it in a console, the console immediately returns and you don't get stdout or anything, from what I've seen).  I know that ANTLR tries to compensate for 'trivial' syntax errors, like "hey dumbass you need a semicolon here", so that's probably what it's doing with these messages.


... actually, I wonder if I accidentally duplicated the semicolon marker on some lines in the grammar ... I should look at that when I can.

The script runs perfectly fine, it's doing exactly what the code says. After some inspection, I found out that ANTLR wants you to put a semicolon after every end curly bracket except those for objects, initialize and tick.



Also, I found a bug that crashes the game if you write count = count-1; instead of count = count - 1;

Code: [Select]
Musuu no Danmaku version 0.1.3591.29235
Starting logging file ...
2009 Nov 05 15:48:16.825 - Initializing engine ...
2009 Nov 05 15:48:17.040 - Loading script objects ...
2009 Nov 05 15:48:17.043 - Creating new Game object ...
2009 Nov 05 15:48:17.083 - Loading script file: baka.txt
2009 Nov 05 15:48:17.092 - Loading script file: ThePlayer.txt
2009 Nov 05 15:48:17.101 - Loaded Object_Type - ThePlayer of type Player
2009 Nov 05 15:48:17.101 - Loading script file: TheCirno.txt
2009 Nov 05 15:48:17.112 - Loaded Object_Type - TheEnemy of type Boss
2009 Nov 05 15:48:17.115 - Loaded Object_Type - EvilShot of type Enemy_Shot
2009 Nov 05 15:48:17.115 - Spawning an object of type ThePlayer as the player.
2009 Nov 05 15:48:17.123 - Spawning an object of type TheEnemy as the enemy.
2009 Nov 05 15:48:17.123 - Starting main loop ...
2009 Nov 05 15:48:17.132 - An error occurred: Incorrect # of args for command set
Stack Trace:
  at Musuu_no_Danmaku.Script.Run (Musuu_no_Danmaku.Object o, Musuu_no_Danmaku.Game current_game, System.Collections.Generic.Dictionary`2 locals) [0x00000]
  at Musuu_no_Danmaku.Script.Run (Musuu_no_Danmaku.Object o, Musuu_no_Danmaku.Game current_game) [0x00000]
  at Musuu_no_Danmaku.Object.Tick (Musuu_no_Danmaku.Game current_game) [0x00000]
  at Musuu_no_Danmaku.Game.Tick () [0x00000]
  at Musuu_no_Danmaku.Program.Events_Tick (System.Object sender, SdlDotNet.Core.TickEventArgs e) [0x00000]
2009 Nov 05 15:48:17.132 - Closing the program ...

A similar bug is that if you write CreateObject("PointItem", GetX()-30, GetY()); instead of CreateObject("PointItem", GetX() - 30, GetY()); the object will not be created. However, doing a similar thing with addition will work like it should.

Re: A replacement for Danmakufu?
« Reply #358 on: November 05, 2009, 03:40:39 PM »
What characters are sprites needed of?  ???

Re: A replacement for Danmakufu?
« Reply #359 on: November 05, 2009, 05:57:33 PM »
What characters are sprites needed of?  ???
Presumably, generic Reimu and Marisa ...