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

Re: A replacement for Danmakufu?
« Reply #390 on: November 09, 2009, 04:32:05 AM »
Fixed archive uploaded ... same link as above.

You sure about that? While the "encountered a problem" message is gone, it's not creating an error log, even with that shortcut I made to enable the logging.

I'd like to take this opportunity to note that I am able to run other applications that use OpenGL on this computer, and was able to do so before the driver update as well.
The SoEW patch has had its second release, come and get it!

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: A replacement for Danmakufu?
« Reply #391 on: November 09, 2009, 06:46:22 AM »
Oh, yeah. You can use my 点 graphic, I don't mind.

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #392 on: November 09, 2009, 06:47:51 AM »
Includes all of the changes I said I've implemented since the last week's release, including (most importantly) the issue between "," and "." regional differences, and the ability to read inputs.

That's good and all, but I'm unfortunately now stuck on my other computer (Vista Home Premium), so I'm stuck with my other problem, which obviously hasn't gotten fixed.

Further information:
-Yes, the computer is 64-bit.
-Running as administrator had no effect at all.

Logging does work correctly for me, though. Same output as previously.

Haven't had the time to test whether it can run OpenGL programs yet, though, but I think I can test it later today (now I have to leave my computer, though).

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #393 on: November 10, 2009, 02:38:29 AM »
Okay, so here's the summary list of doesn't-boot issues I'm seeing thus far ...


PT8Sceptile
  • Vista home premium 64-bit
  • Set for Finnish
  • XP compatibility mode does not help
  • Running as administrator does not help
  • Error in SetVideoMode in Graphics.Initialize

Prime 2.0
  • XP 64-bit
  • Error in SetVideoMode in Graphics.Initialize
  • Test release 2 does not create log files (just to be sure - did you properly unpack the new archive and make sure your shortcut points to the right place?)

arcanesign
  • Ubuntu 64-bit
  • Error in SetVideoMode in SetVideoMode in Graphics.Initialize
  • Furu is running the same OS - it may be worthwhile to compare,[/tt]

Let me know if I missed anything.


Another thing I just thought of - we may need to install libsdl (the main SDL library) as well.  See here.

Hate to be a pain and keep asking people to try these things, but I've only got two computers to try things on myself, and they're both WinXP 32-bit (and already have some dev crap installed).



Also, Furu - does testing release 2 work in your XP VM?



I know people want me to get the actual code posted up so people can criticize my sucky organization skillshelp out ... the first question is, of course, where do we keep it?  I'm not too familiar with these things, so suggestions are welcome.

Second question is when does it get posted?  I could post it this coming weekend if you guys really want, but be warned that the code is a freaking mess (by my standards, anyways).

Third, call me a jerk or whatnot, but I do want to retain some "control" over the codebase until it gets more complete.  Feel free to argue with me on this one; I might change my mind.

Fourth, Blargel and Blargel's brother - no stealing code! (j/k)
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #394 on: November 10, 2009, 08:45:59 AM »
Prime 2.0
  • XP 64-bit
  • Error in SetVideoMode in Graphics.Initialize
  • Test release 2 does not create log files (just to be sure - did you properly unpack the new archive and make sure your shortcut points to the right place?)

How exactly would one go about unpacking it incorrectly? I just made a new folder, and put the contents of the zip in it. And yes, I made sure the shortcut pointed to the right place.

EDIT:

Another thing I just thought of - we may need to install libsdl (the main SDL library) as well.  See here.

the windows runtine was just a dll and a readme. Put them in the Musuu no Danmaku folder, still doesn't work.
« Last Edit: November 10, 2009, 07:56:34 PM by Prime 2.0 »
The SoEW patch has had its second release, come and get it!

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #395 on: November 10, 2009, 04:39:40 PM »
Another thing I just thought of - we may need to install libsdl (the main SDL library) as well.  See here.

Hate to be a pain and keep asking people to try these things, but I've only got two computers to try things on myself, and they're both WinXP 32-bit (and already have some dev crap installed).

This actually provides a question on what counts as "installing" the library. Since there's no clear "installer", I downloaded the win32 runtime library (a bit sceptic about the number in the end, but according to release information it should be 64-bit compatible) but afterwards I don't know exactly what should I try. I tried the following:

1 - Copy the SDL.dll file into Musuu's folder.
2 - Replace the SDL.dll file in SDL.NET's installation with the new one.

Neither of which did any good.

Also, on a side note, my computer is able to run Google Earth, which, according to Wikipedia uses an OpenGL renderer.

Re: A replacement for Danmakufu?
« Reply #396 on: November 10, 2009, 09:53:10 PM »
Also, Furu - does testing release 2 work in your XP VM?
Yes, it works now. After some more testing with SDL and Tao framework I found out what might be needed to run Musuu. Please test the following for your OS if it's not working.


Ubuntu 9.10 & 9.04
  • Install mono-runtime and libmono2.0-cil through Synaptic (9.04 users may need to install mono-jit)
  • Copy SdlDotNet.dll, [Tao.OpenGl.dll and Tao.Sdl.dll (already included with Musuu)] plus their config files SdlDotNet.dll.config, Tao.OpenGl.dll.config and Tao.Sdl.dll.config to your Musuu folder (Get SDL here and Tao framework here. Download the latest .tar.gz files. They are in the bin folder of the archives.)

Windows XP
  • I needed to install .NET framework 2.0 to be able to run it (I got a message about it)
  • Copy SdlDotNet.dll, [Tao.OpenGl.dll and Tao.Sdl.dll (already included with Musuu)] to your Musuu folder (Get SDL here and Tao framework here. Download the latest .zip files (or the installers if you want to try that instead but I haven't tested it). They are in the bin folder of the archives.)

(Note that Windows and Ubuntu need the same dll files but Ubuntu also need the config files.)


Above is confirmed for two Ubuntu computers (both 64-bit) and one XP (32-bit). However, on another XP computer (32-bit) Musuu crashed without a log with the -l command. I will investigate this further when I have the time.
« Last Edit: November 11, 2009, 09:53:19 PM by Furu »

Re: A replacement for Danmakufu?
« Reply #397 on: November 10, 2009, 10:48:10 PM »
Windows XP
  • I needed to install .NET framework 2.0 to be able to run it (I got a message about it)
  • Copy SdlDotNet.dll, Tao.OpenGl.dll and Tao.Sdl.dll to your Musuu folder (Get SDL here and Tao framework here. Download the latest .zip files (or the installers if you want to try that instead but I haven't tested it). They are in the bin folder of the archives.)
Well, I already have .NET framework 3.0, and those DLL files are already in the folder. I tried running the installer for the Tao framework, didn't fix anything.
The SoEW patch has had its second release, come and get it!

Re: A replacement for Danmakufu?
« Reply #398 on: November 11, 2009, 08:22:33 PM »
Yes, it works now. After some more testing with SDL and Tao framework I found out what might be needed to run Musuu. Please test the following for your OS if it's not working.


Ubuntu 9.10 & 9.04
  • Install mono-runtime and libmono2.0-cil through Synaptic (9.04 users may need to install mono-jit)
  • Copy SdlDotNet.dll, Tao.OpenGl.dll and Tao.Sdl.dll plus their config files SdlDotNet.dll.config, Tao.OpenGl.dll.config and Tao.Sdl.dll.config to your Musuu folder (Get SDL here and Tao framework here. Download the latest .tar.gz files. They are in the bin folder of the archives.)

Tried this again with the newer Musuu release, but no dice. I'm using an older version of ubuntu (9.04, not 9.10), so that may be the problem. Here's my version of mono:

Code: [Select]
$ mono -V
Mono JIT compiler version 2.0.1 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS:           __thread
GC:            Included Boehm (with typed GC)
SIGSEGV:       altstack
Notifications: epoll
Architecture:  amd64
Disabled:      none

Re: A replacement for Danmakufu?
« Reply #399 on: November 11, 2009, 10:50:20 PM »
Tried this again with the newer Musuu release, but no dice. I'm using an older version of ubuntu (9.04, not 9.10), so that may be the problem. Here's my version of mono:

Code: [Select]
$ mono -V
Mono JIT compiler version 2.0.1 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS:           __thread
GC:            Included Boehm (with typed GC)
SIGSEGV:       altstack
Notifications: epoll
Architecture:  amd64
Disabled:      none

Actually one of the machines I tested it on run 9.04 64-bit so that's not the case. I have also tested running it with Compiz running and that worked without a problem. I was also running the same version of Mono.



After studying the config files I found out that you probably need to have these packages installed:
  • libsdl-image1.2
  • libsdl-gfx1.2-4
  • libglu1-mesa

These will probably be needed later on when fonts and sound are enabled:
  • libsdl1.2debian-all
  • libsdl-mixer1.2
  • libsdl-ttf2.0-0
  • libsmpeg0



In Windows' case, installing libSDL should provide you with the needed dlls which probably are:
  • SDL.dll
  • SDL_image.dll
  • SDL_gfx.dll

...And these graphic dlls will be needed, probably:
  • opengl32.dll
  • glu32.dll

Re: A replacement for Danmakufu?
« Reply #400 on: November 11, 2009, 11:41:27 PM »
Well, I ran the SDL installer linked by Nuclear Cheese, so I should already have that stuff... Anyways, I grabbed opengl32.dll and glu32.dll and put it in the program folder, still doesn't work.
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 #401 on: November 13, 2009, 06:03:19 AM »
I just added config file support.  Right now all it has is graphics options, but I figured those would be the priority since that's where it seems people are getting errors.

The configuration is stored in a file "config.txt" in the same directory as the main program.  It looks like this:

Code: (config.txt) [Select]
/ Comment
/ Comment

/ Set screen dimensions
screen_width 800
screen_height  600

/ Determine fullscreen/window
full_screen false

/ Enable/Disable hardware surfaces
hardware_surfaces true

/ Bits per pixel (16 or 32)
bits_per_pixel 32

This covers just about everything that is passed to SdlDotNet.Video.SetVideoMode (where we seem to be getting our errors), so perhaps some tweaking of these parameters may yield results?

To note, though:
  • I might just not be seeing it, but it seems that bits-per-pixel might only affect fullscreen mode.
  • I'm not sure if the hardware surfaces flag actually effects OpenGL.  This requires some investigation.
  • Right now, if you set a width and height that differ from the 4/3 ratio, it will stretch the display.  Later on I can add code to pad the borders and maybe flip to TATE mode to keep it looking right.



Also, my questions from before about putting up the code ...
I know people want me to get the actual code posted up so people can criticize my sucky organization skillshelp out ... the first question is, of course, where do we keep it?  I'm not too familiar with these things, so suggestions are welcome.

Second question is when does it get posted?  I could post it this coming weekend if you guys really want, but be warned that the code is a freaking mess (by my standards, anyways).

Third, call me a jerk or whatnot, but I do want to retain some "control" over the codebase until it gets more complete.  Feel free to argue with me on this one; I might change my mind.

Fourth, Blargel and Blargel's brother - no stealing code! (j/k)
... still up for discussion.

Random statistic: all code files combined, excluding code generated by ANTLR, the program has about 3600 lines of source so far.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #402 on: November 13, 2009, 04:08:24 PM »
Remember that one of my XP machines didn't run Musuu? Guess I missed the log the first time but anyway here it is:

Code: [Select]
Musuu no Danmaku version 0.1.3599.41460
Starting logging file ...
2009 nov 13 15:29:15.906 - Initializing engine ...
2009 nov 13 15:29:16.421 - Error during initialization: The type initializer for 'SdlDotNet.Graphics.Surface' threw an exception.
Stack trace:
   at SdlDotNet.Graphics.Surface..ctor(IntPtr handle, Boolean isVideoMode)
   at SdlDotNet.Graphics.Video.SetVideoMode(Int32 width, Int32 height, Int32 bitsPerPixel, Boolean resizable, Boolean openGL, Boolean fullScreen, Boolean hardwareSurface, Boolean frame)
   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.

After a little searching I found out that sdl_image might be missing. I downloaded it and moved all dll files to my Musuu folder. After that, Musuu was up and running  ;D

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #403 on: November 14, 2009, 02:54:01 AM »
Remember that one of my XP machines didn't run Musuu? Guess I missed the log the first time but anyway here it is:

After a little searching I found out that sdl_image might be missing. I downloaded it and moved all dll files to my Musuu folder. After that, Musuu was up and running  ;D

Good to know.





Just a bit of progress for now ...
  • Code to automatically load standard images when starting a script (right now just the point item image)
  • Function to unload all loaded images for a script (currently not used, but will be used to unload everything between scripts)
  • Fixed a slight error in the mdBase parsing that ate extra args when you forgot a comma (instead of failing)
  • Infinite protection should now work through function calls



I got a bunch of thinking done about a couple things, though:

For the player miss animation, I think it should be part of the player's scripts.  Specifically, as its own script, which will most likely start a task or set a variable to animate the player's death.  Something like this:

Code: (sample) [Select]
.
.
.

miss
{
   // run death animation task
   death_anim();
}

task death_anim()
{
   while (!death_animation_complete)
   {
      // disable player motion/shooting
      ...
      // check for deathbomb, revert miss if it comes
      ...
      // anime the player character going boom
      ...
      if (death_animation_complete)
      {
         // reset player's location & stock
      }
      // resume processing on the next frame
      wait(1);
   }
}
.
.
.

(remember - sample of what it could look like.  some syntactic liberties.  might be different.  etc etc etc)

Here, the death_anim task would do whatever miss effect we decide to throw down.  The miss event script would be called, obviously, when the player gets hit.
Furthermore, specific character scripts could override this default if, for instance, you want your character to just blow up with no deathbomb chance.

Only real downside here is that you can't really enforce a specific death animation style for your game script (unless you enforce only specific player scripts).




Another idea I just had while doing stuff:
Instead of (or in addition to) having functions to access object information (like ObjGetX), allow a special syntax in mdScript to access object properties directly.  I had a couple ideas:
(id in all examples is an ID number for the object to reference)


id->x

Simple and straightforward; I kinda like this one a lot.


object[id].x

Makes it much like an array.  Might confuse people if they don't know that object is special, but that's a minor issue IMO.


With this in place, you could make some code a bit neater, such as (using the first syntax):
pid = GetPlayerID();
angle = arctan2(pid->y - y, pid->x - x);





Yet another idea I've been tossing about mentally is the idea of "messages" that can be sent to another object.  Effectively, this would be functions on one object that can be called from another object.

Basically, it would work in two parts.

1) In an object's scripts, a "message" is defined.  This would be a simlpe function definition, basically.

Code: (sample) [Select]
.
.
.
message ChangeAngle(new_angle)
{
   SetAngle(new_angle);
}
.
.
.


2) In another object's script, the message can be referenced.  Syntax tbd at the moment, but it would probably be best to give a syntax similar to the above property access syntax.  For example (using the first syntax):

Code: (sample) [Select]
.
.
.
shotid->ChangeAngle(angle_to_player);
.
.
.


There are many advantages this could bring, such as ...
  • Adding ChangeSpeed and ChangeAngle messages to the default bullet definition could simplify (or at least provide an alternative method for) creating complex bullet behaviors without even defining a custom Enemy_Shot object type, allowing them to instead be controlled by the boss itself.
  • You could use a message to pass starting parameters to an object that was just spawned.




Also looking at some font stuff, and I noticed that the Tao framework includes bindings for FreeType.  I'm considering giving this a try, since it's probably a lot better than my previous idea (get SDL to render the font, then copy it to a texture).  Any opinions?

Also, we'll need to decide on a font to use.  Preferably one that includes both Japanese and English symbols, at least.  We might want to use a public domain one, too, so it can be included with the program itself (meaning it'll be in the same directory so we always know where it is, and we can be reasonable sure it'll always be there).
I saw the Mona font, but I'm no expert in this area so I'll let you guys talk over this item.



I might get some more code later, but for now it's zombie killing time. >:D
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #404 on: November 14, 2009, 10:00:25 PM »
btw, found this today, maybe you'd find this useful: http://arstechnica.com/microsoft/news/2009/11/test-and-package-net-apps-for-linux-with-visual-studio-add-in.ars?utm_source=rss&utm_medium=rss&utm_campaign=rss

Actually one of the machines I tested it on run 9.04 64-bit so that's not the case. I have also tested running it with Compiz running and that worked without a problem. I was also running the same version of Mono.

After studying the config files I found out that you probably need to have these packages installed:
  • libsdl-image1.2
  • libsdl-gfx1.2-4
  • libglu1-mesa

These will probably be needed later on when fonts and sound are enabled:
  • libsdl1.2debian-all
  • libsdl-mixer1.2
  • libsdl-ttf2.0-0
  • libsmpeg0

After doing this, everything worked.
« Last Edit: November 14, 2009, 10:27:53 PM by arcanesign »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #405 on: November 15, 2009, 02:31:09 AM »
btw, found this today, maybe you'd find this useful: http://arstechnica.com/microsoft/news/2009/11/test-and-package-net-apps-for-linux-with-visual-studio-add-in.ars?utm_source=rss&utm_medium=rss&utm_campaign=rss

Looks cool, but it sounds like something I'd need a 'nix box to take advantage of (the remote debugging and such, at least).  Plus, the downloadable version is only a trial, and I don't particularly feel like forking out a hundred bucks for it.  No offense, guys. ;)



After doing this, everything worked.

Good to hear it's working for you!





Some new progress tonight (as opposed to old, recycled progress?  I dunno :V):

  • Now loads a border image stored in border.png to serve as the background.  File can be any size and will be scaled and stretched to fit the window.  Only downside is that the current code takes a couple seconds to load an 800x600 image; using the Bitmap class and reading each pixel out individually probably isn't the most efficient thing in the world. >__>
  • Started the implementation of arrays
    • Currently you can define arrays and reference values in them.  See the code below.
    • Arrays can be heterogeneous - that is, they don't need to contain all items of the same type (unlike Danmakufu).
    • Use the function length to get the length of an array (also works for strings).
    • No support yet for assigning values in an array (my_array[5] = 7;).  May not seem like it, but it's actually a bit tricky implement this, especially if we want to be able to assign items at an arbitrary depth (my_array[5][3][2][7][1] = "lol";).



Here's the updated TheEnemy.txt in it's current form:

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

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

   initialize
   {
      // image, fire_delay, movement_speed, life, evil shot life threshold
      parameters = ["reimu1.png", 30, 0.5, 150, 90];
      num_bullets = [7, 11, 5, 9, 4, 11, 8];
      num_bullets_index = 0;

      SetImage(parameters[0], false, 30);
      SetSize(18, 24);
      count = 60;
      move = parameters[2];
      UseRadians(true);

      SetLife(parameters[3]);
   }

   tick
   {
     if (GetLife() <= 0)
     {
        // Onoes I dead x__x
        DestroyObject(GetMyID());
     }

      SetX(GetX() + move);

      if (GetX() > 350)
      {
         move = 0 - parameters[2];
      };
      if (GetX() < 76)
      {
         move = parameters[2];
      };

      count = count - 1;

      // When count reaches zero, we fire a spread of bullets, and spawn a point item.
      if (count <= 0)
      {
         count = count + parameters[1];

         bullets = num_bullets[num_bullets_index];

         num_bullets_index = num_bullets_index + 1;
         if (num_bullets_index >= length(num_bullets))
         {
            num_bullets_index = 0;
         }

         increment = (pi / 2) / (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;
         };

         if (GetLife() < parameters[4])
         {
            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));
         };
      };
   }
}

The array parameters simply contains some adjustable information for the script.  It's pretty much an unnecessary array, used here just to demonstrate the syntax.

The other array, num_bullets, is used to vary the number of shots fired in each spread in a repeating pattern.



With this array stuff in place, I can get to work on object enumeration - that is, getting a list of objects in the game.

The way I see this working is having a function, say EnumerateObjects, which you give the name of an object type or base type, and it returns an array of all object IDs currently active of the specified type.  For instance:

Code: (sample) [Select]
...
bullet_array = EnumerateObjects("Enemy_Shot");
i = 0;
while (i < length(bullet_array))
{
   DestroyObject(bullet_array[i]);
}
...

This sample would destroy all enemy bullets that currently exist in the game.  Note that, since a base type (Enemy_Shot) is specified, it will find all types of enemy shots, including custom ones defined as a new object type.
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 #406 on: November 15, 2009, 09:09:37 AM »
Some more news from my Vista Home premium which still has been unable to run the program:

-I've added the .dlls for SDL, SdlDotNet, SDL_gfx and SDL_image to Musuu's folder, but it still doesn't work. Also I've had both the SDLDotNet runtime and Tao Framework installed for some time.

However, more importantly:

-I downloaded a C# IDE (namely SharpDevelop) and used it to compile the OpenGL tutorial code in SDLDotNet's site (the lower one with C# code, most definitely not the upper one that's in Visual Basic .NET). I changed all SetVideoMode methods to have the same parameters as in Cheese's initial config file (save for window size, since I doubt that's going to cause the error): HardwareSurfaces is true, bpp is 32 and pressing the key defined in the code (originally F1, but I changed it to left ctrl for no reason at all  ::) ) toggles between fullscreen and windowed. I can now say with near absolute certainty that the example code works and creates the resizable window it's supposed to. This concludes the proof that the computer can run both SdlDotNet and OpenGl with no major problems.

If I'm interpreting this correctly, this isolates the error to the following problems:

- Something differing in the references, although this is improbable, since I only added references for the SdlDotNet project and Tao.OpenGl, and I have both of them installed and important .dlls copied to the Musuu directory.
- Something differing in the compilation, which I cannot comment on due to my lack of experience with C# compilers (and lack of experience with C# coding in general, as this was the first C# app I've ever compiled).
- Some absolutely weird situational bug with SDL or OpenGL.

I will be moving to my XP machine that failed running Musuu due to the '.' vs ',' -problems last time soon, and thus cannot access this computer for yet another week, so I can't provide much more input on this during the next week. I'm really hoping this problem gets found and fixed soon, though.

EDIT:

Version 2 works fine on XP.



I managed to code player respawning to my player script, but it has a tiny problem: over 50% of the time I respawn into a bullet and, since I have no starting invincibility, I die. Great, just great.

Some other stuff I really miss from DMF and hope to be implemented as defaults in the future:
- The % operator (I tried it but it errored for me, so I assume it's not implemented).
- Defining images by drawing rects (making every bullet a seperate file is frustrating).
- CreateShotA, obviously.
- Visible hitbox. Dodging without one is frustrating.
- Some syntax stuff like ++.
- Effect objects and drawing functions.

However, overall, this is already excellent work. Major props for you, Cheese, and keep up the good work!

Also, another tiny suggestion: Add an additional parameter to the CreateShot functions that allows the player to specify, whether the bullet rotates according to it's angle or not (like you can do with object icons now). ZUN apparently uses this for round bullets to preserve the full graphical quality when rotation is not required, as evidently proven by Drake's BlackSquare mods. It would for example make the round bullets with thin outlines look a lot better without having to make them all objects.
« Last Edit: November 15, 2009, 07:57:23 PM by PT8Sceptile »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #407 on: November 15, 2009, 09:31:10 PM »
Some more news from my Vista Home premium which still has been unable to run the program:

-I've added the .dlls for SDL, SdlDotNet, SDL_gfx and SDL_image to Musuu's folder, but it still doesn't work. Also I've had both the SDLDotNet runtime and Tao Framework installed for some time.

However, more importantly:

-I downloaded a C# IDE (namely SharpDevelop) and used it to compile the OpenGL tutorial code in SDLDotNet's site (the lower one with C# code, most definitely not the upper one that's in Visual Basic .NET). I changed all SetVideoMode methods to have the same parameters as in Cheese's initial config file (save for window size, since I doubt that's going to cause the error): HardwareSurfaces is true, bpp is 32 and pressing the key defined in the code (originally F1, but I changed it to left ctrl for no reason at all  ::) ) toggles between fullscreen and windowed. I can now say with near absolute certainty that the example code works and creates the resizable window it's supposed to. This concludes the proof that the computer can run both SdlDotNet and OpenGl with no major problems.

If I'm interpreting this correctly, this isolates the error to the following problems:

- Something differing in the references, although this is improbable, since I only added references for the SdlDotNet project and Tao.OpenGl, and I have both of them installed and important .dlls copied to the Musuu directory.
- Something differing in the compilation, which I cannot comment on due to my lack of experience with C# compilers (and lack of experience with C# coding in general, as this was the first C# app I've ever compiled).
- Some absolutely weird situational bug with SDL or OpenGL.

I will be moving to my XP machine that failed running Musuu due to the '.' vs ',' -problems last time soon, and thus cannot access this computer for yet another week, so I can't provide much more input on this during the next week. I'm really hoping this problem gets found and fixed soon, though.

Good to know.  I'll have to take a look back at that code, and see what I'm doing differently.



EDIT:

Version 2 works fine on XP.

:awesome:

I managed to code player respawning to my player script, but it has a tiny problem: over 50% of the time I respawn into a bullet and, since I have no starting invincibility, I die. Great, just great.

There's no invulnerability function yet, but you could simulate it by setting the player object's size1 (first argument to SetSize) to zero, which will preclude it from collision with enemy bullets, for the duration of invulnerability.

Just like the current "player gets hit = instant dissapear", it's really just a temporary thing until the program matures more, but just letting you know ...



Some other stuff I really miss from DMF and hope to be implemented as defaults in the future:
- The % operator (I tried it but it errored for me, so I assume it's not implemented).

Really?  What was the script you used?  I thought I had it working; I'll have to look back at it.



- Defining images by drawing rects (making every bullet a seperate file is frustrating).

Right.  I'll have to get to that.



- CreateShotA, obviously.

Something similar can be done down the line.  In the meantime, you can get a similar effect by scripting a new enemy_shot object type.



- Visible hitbox. Dodging without one is frustrating.

Will be added.  In the meantime, you can get a similar effect by creating an effect object type which sticks to the player and shows the hitbox (optionally, only have it appear when focus is held - set image to "" to have it not show an image).



- Some syntax stuff like ++.

Of course.  A few things I know need to be added to the syntax:
  • else
  • ++ and --
  • assign subelements of arrays
  • fix negation so it works correctly (right now it only works on number literals)



- Effect objects and drawing functions.

Drawing functions are not in yet, but will be added in.  As far as effect objects - are you referring to actual "effect objects", as in objects used for effects?  You can create an effect object type.  On the other hand, if you're referring to the "give vertices and texture coordinates" method of drawing effects, that will come down the line.



Also, another tiny suggestion: Add an additional parameter to the CreateShot functions that allows the player to specify, whether the bullet rotates according to it's angle or not (like you can do with object icons now). ZUN apparently uses this for round bullets to preserve the full graphical quality when rotation is not required, as evidently proven by Drake's BlackSquare mods. It would for example make the round bullets with thin outlines look a lot better without having to make them all objects.

Huh.  I didn't know ZUN did that.



However, overall, this is already excellent work. Major props for you, Cheese, and keep up the good work!

Thanks for the feedback!
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 #408 on: November 16, 2009, 06:37:09 AM »
There's no invulnerability function yet, but you could simulate it by setting the player object's size1 (first argument to SetSize) to zero, which will preclude it from collision with enemy bullets, for the duration of invulnerability.

Works! Now at least I don't have to worry about dying on the first second!

Really?  What was the script you used?  I thought I had it working; I'll have to look back at it.

Wait, it's supposed to work? Let me try again...

...D'OH. if(count%5 == 0) errors, BUT if(count % 5 == 0) works! Therefore this goes along with those a-b failing and a - b working problems...



Something similar can be done down the line.  In the meantime, you can get a similar effect by scripting a new enemy_shot object type.

This would be so much more convenient if shot objects accepted parameters other than X and Y (hint hint...)

Huh.  I didn't know ZUN did that.



Notice that the circular bullet squares aren't rotated at all, even though they all obviously can't be going into the same direction. Nevermind the fact that I'm just getting owned by an invisible bullet in the picture.

And just to prove my point, the difference between rotating (right) and not rotating (left) is the following:


Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: A replacement for Danmakufu?
« Reply #409 on: November 16, 2009, 07:47:24 AM »
Round bullets ( with ring, without ring and the smaller ones ) quality make me rage in Danmakufu when inserting ZUN original shotsheets. Serious rage.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #410 on: November 17, 2009, 01:03:13 AM »
Wait, it's supposed to work? Let me try again...

...D'OH. if(count%5 == 0) errors, BUT if(count % 5 == 0) works! Therefore this goes along with those a-b failing and a - b working problems...

... dammit.

I'll look into this.

EDIT:
I did a quick test, and it looks like the two give identical results:

Code: (test script) [Select]
// TheEnemy
// Enemy boss that makes some fucking danmaku.
Boss "TheEnemy"
{
   define count;
   define move;

   initialize
   {
      if(count%5 == 0)
      {
         count = stuff%50;
      };
   }

   tick
   {
      if(count%5 == 0)
      {
         count = stuff%50;
      };
   }

Code: (generated mdBase) [Select]
Object_Type Boss TheEnemy
Script initialize
mod !0, @count, 5
equ !1, !0, 0
not !2, !1
jmp !2, "Label0"
mod !0, !stuff, 50
set @count, !0
Label0:
Script tick
mod !0, @count, 5
equ !1, !0, 0
not !2, !1
jmp !2, "Label1"
mod !0, !stuff, 50
set @count, !0
Label1:

As seen above, both with and without spaces by the %, the same mdBase is generated.  Could you please provide some more details on the error you saw and, if possible, the full script you were using?



This would be so much more convenient if shot objects accepted parameters other than X and Y (hint hint...)

You're saying you want to pass in additional arguments to an object you're creating, right (in this case, a shot)?  The messages idea I had a few posts back could cover this, and/or I could add a simple functionality to pass an additional arg when creating an object (give it an array if you need multiple parameters).

Finally, there's the idea I had above of accessing object parameters directly.



Notice that the circular bullet squares aren't rotated at all, even though they all obviously can't be going into the same direction.

I see.  Easy addition.



Round bullets ( with ring, without ring and the smaller ones ) quality make me rage in Danmakufu when inserting ZUN original shotsheets. Serious rage.

Hopefully your rage will be unnecessary when working in Musuu no Danmaku. ;)




EDIT:

By the way, did I mention the next few weeks are totally screwball for me?  In a good way, though ... less family crap than usual.  No guarentees for everyday updates, but for today some progress:

Object listing.

Use the new command GetObjectList to get a list of objects of a specified object type or base type.  For instance,
objects = GetObjectList("Enemy_Shot");
will set the variable objects to a list of the ID of every enemy shot that currently exists.

This can be put to use quite easily, such as the following snippet I just added to TheEnemy.txt:

Code: [Select]
      if (GetLife() <= 0)
      {
         // Onoes I dead x__x
         DestroyObject(GetMyID());

         objects = GetObjectList("Enemy_Shot");
         i = 0;
         while (i < length(objects))
         {
            DestroyObject(objects[i]);
            i = i + 1;
         };
      };

What this does is, when the boss runs out of life, no longer does it just destroy itself, it also removes all of the on-screen enemy shots.
Of course, in the long run, this will be included in the built-in default stuff for boss scripts, and it'll spawn those stupid little score items.

This listing can also be used for many other things.  For instance, if you wanted to imitate Cirno's Perfect Freeze, you could, when the time came to freeze everything, just get a list of all of the onscreen bullets and adjust their info as needed (basically doable now, but you'd need to delete and respawn each bullet 'cause there isn't yet an easy way to adjust another object's parameters).

Also, if you need to target an enemy/boss for a homing shot, just get the list and select an ID.
« Last Edit: November 17, 2009, 01:45:54 AM by Nuclear Cheese »
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 #411 on: November 17, 2009, 06:04:21 AM »
As seen above, both with and without spaces by the %, the same mdBase is generated.  Could you please provide some more details on the error you saw and, if possible, the full script you were using?

Okay, just wait while I switch my script back to...

...Wait what the heck! It works?!?! While I was positive it errored yesterday?!?!

Well, apparently you were right after all, unless it was some crazy situational glitch. However, since I apparently can't reproduce my error, forget it :-[.

You're saying you want to pass in additional arguments to an object you're creating, right (in this case, a shot)?  The messages idea I had a few posts back could cover this, and/or I could add a simple functionality to pass an additional arg when creating an object (give it an array if you need multiple parameters).

Finally, there's the idea I had above of accessing object parameters directly.

You're right, messages would solve this quite well.




Object listing.

Another major YESSSSSS addition that I have actually noticed the lack of in Danmakufu before. I was once coding a character whose focused bomb was meant to slow down all bullets within a certain radius around the point where the bomb was used. However, as I intended the char to be used in generic scripts instead of a game I was making, CommonData and object bullets was out of question. This, however, was exactly the function I was looking for: Get a list of bullets, save the location of those within a certain radius and move them backwards a certain portion of the distance they traveled next frame (outright slowing them would risk conflictions if the enemy script changed their speed while they would be in the area). However, due to DMF lacking this, I had to scrap my idea. Therefore, this is already a welcome addition.

Montblanc

  • I'll drive my toe into your eye socket,
  • And I'll Spin in it~
Re: A replacement for Danmakufu?
« Reply #412 on: November 17, 2009, 05:06:23 PM »
Checking in and happy with what I'm seeing~

I echo the above YESSSSSS at Object Listing. x3

The other updates are fine, too. =P

Keep on keeping on, Cheese.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #413 on: November 19, 2009, 02:47:43 AM »
Some more stuff tonight:

  • Fixed a small bug in the program that would display a negative lifebar (it extended out to the left).
  • ++ and -- implemented as simply increment/decrement operators.
    • Currently they can only be used as standalone statements, such as count--;
    • Not sure if Danmakufu supports this, but standard C ++ and -- also can be used mid-expression.  Not sure if I'm going to bother with such, unless there's demand for it.
  • Removed the (non-crashing) error about missing semicolons after the close-braces for if and while statements.  Please note that now having such semicolons there is a syntax error.
  • Removed the necessity for the braces on the if and while commands.  In other words, you can now say:
    if (count < 5) count = 60;
    Writing it like this limits you to one command, just like in C; you still need to use the braces for if and while commands that have multiple commands.
    As a side-effect of the way I did this change, you can now put in pairs of braces to group off sets of commands even without an if or while (C lets you do this too, unless I'm remembering incorrectly).
  • else.
    This actually was the main motivator for the previous change, since it lets us write:
    if (a == 5)
    {
       // stuff
    }
    else if (a == 6)
    {
       // other stuff
    }

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

Re: A replacement for Danmakufu?
« Reply #414 on: November 19, 2009, 02:52:31 AM »
Maybe this is a lot to ask, but there's no possibility of a converter from Danmakufu to this.. Right?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: A replacement for Danmakufu?
« Reply #415 on: November 19, 2009, 08:24:50 AM »
Object listening is like  OOP right? To modify the object's behaviour once it is spawned. Like

fire object bullet --> modify it's behaviour freely whenever you by   objectbullet.changespeed(3) or something?


I should get my eyes checked.  Object listing  >.<

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #416 on: November 20, 2009, 04:49:47 AM »
Maybe this is a lot to ask, but there's no possibility of a converter from Danmakufu to this.. Right?

This was discussed way long ago ... while it's certainly possible, it would be hell and a half to get anything other than very basic scripts converted automatically.



Object listening is like  OOP right? To modify the object's behaviour once it is spawned. Like

fire object bullet --> modify it's behaviour freely whenever you by   objectbullet.changespeed(3) or something?


Funny, you should mention this.  I had a couple ideas that are like this (posted about them a few days ago), and I just finished implementing a major piece:


Object Parameters.

You can now access certain parameters of any object you have the ID of simply by using the new -> operator.  For instance:

Code: (sample) [Select]
pid = GetPlayerID();
angle_to_player = arctan2(pid->y - GetY(), pid->x - GetX());

Right now, there are only four properties available: x, y, angle, and speed, but adding more as needed is relatively simple in the code.


You can also set object properties with this syntax:

Code: [Select]
shot_array = GetObjectList("Enemy_Shot");
let i = 0;
while (i < length(shot_array))
{
   obj_id = shot_array[i];
   obj_id->angle = obj_id->angle + 180;
   i++;
}

This code will make all existing enemy bullets do an instant turn-around.

NOTE:
Currently, in order to assign to a property, you need to have the object's ID stored in a variable directly.  I do want to add in assigning to an ID in an array (for instance, shot_array->speed = 5;), but for now that isn't allowed.

I also need to fine-tune the syntax of -> in expressions as well, since right now you can do stupid things like
what = "I'm a string lol" -> x;

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

Re: A replacement for Danmakufu?
« Reply #417 on: November 20, 2009, 08:26:41 AM »
Hmm. Ten days late and my first post, but

I know people want me to get the actual code posted up so people can criticize my sucky organization skillshelp out ... the first question is, of course, where do we keep it?  I'm not too familiar with these things, so suggestions are welcome.

Second question is when does it get posted?  I could post it this coming weekend if you guys really want, but be warned that the code is a freaking mess (by my standards, anyways).

Third, call me a jerk or whatnot, but I do want to retain some "control" over the codebase until it gets more complete.  Feel free to argue with me on this one; I might change my mind.

Let me introduce you to revision control systems (one of these is called Subversion, and I'll be speaking based on experience with SVN, but I think Mercurial is gaining popularity). Revision control manages a repository of files. Every change someone makes gets a unique revision identifier (e.g., initial set is revision 0 and the next change is revision 1). Each revision has metadata such as timestamp, author (if you choose to grant access to a few other people), and comments.

Doing this has several advantages; revisions can be compared, restored, and even merged. You can step back and check which revision introduced a bug, and with a diff you can see exactly what lines were changed. Or perhaps you can have two people work independently on the same program but doing different tasks; when they're done, they can easily merge their changes. Additionally, you can create a simple changelog just by glancing through the comments in the revision log.

Sites such as Google Code and SourceForge can provide a repository for you while allowing public users read-only access to it. If you choose not to go the version control route, I believe both of these services offer file uploads as well, so distributing the source .zip is a viable alternative.

Anyway, collaborative editing is extremely powerful. Things get done better and faster due to the combined input of several minds; improvements can be made thanks to the individual knowledge and experience each coder has, so if you do share the code with us soon, I hope to contribute some patches and help you out with the project.

... once I learn C#, that is.
« Last Edit: November 20, 2009, 08:34:55 AM by Theme97 »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #418 on: November 20, 2009, 10:40:40 AM »
Hmm. Ten days late and my first post, but

Let me introduce you to revision control systems (one of these is called Subversion, and I'll be speaking based on experience with SVN, but I think Mercurial is gaining popularity). Revision control manages a repository of files. Every change someone makes gets a unique revision identifier (e.g., initial set is revision 0 and the next change is revision 1). Each revision has metadata such as timestamp, author (if you choose to grant access to a few other people), and comments.

Doing this has several advantages; revisions can be compared, restored, and even merged. You can step back and check which revision introduced a bug, and with a diff you can see exactly what lines were changed. Or perhaps you can have two people work independently on the same program but doing different tasks; when they're done, they can easily merge their changes. Additionally, you can create a simple changelog just by glancing through the comments in the revision log.

Sites such as Google Code and SourceForge can provide a repository for you while allowing public users read-only access to it. If you choose not to go the version control route, I believe both of these services offer file uploads as well, so distributing the source .zip is a viable alternative.

Anyway, collaborative editing is extremely powerful. Things get done better and faster due to the combined input of several minds; improvements can be made thanks to the individual knowledge and experience each coder has, so if you do share the code with us soon, I hope to contribute some patches and help you out with the project.

Thanks for the info. I'm already pretty familiar with version control and such in general; I was more asking for opinions on which site would be best for this project.  SourceForge and Google Code were two ones I was looking at, but I'm not familiar with the particular features of each, so I was wondering what people thought.

I definitely agree that getting this under version control is a good idea, and I have some experience with SVN so that would probably be my first choice.



... once I learn C#, that is.

That's easy.  Just picture the bastard child of C++ and Java, and you're already 90% of the way there. :V
(serious: it's a piece of cake to pick up if you know either)



What the hell am I still doing up?  It's 0530am!  Stupid insomnia.  At least I took the day off of work.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #419 on: November 20, 2009, 06:31:52 PM »
I suggests using the . (as in id.x) instead of -> because that's used in some object-oriented languages I use so I'm pretty used to it and it's faster to type.
Also, I think it's better to use something like id.GetAngle() instead of id.angle to get the angle and use id.variable to access a local variable instead.

And about using arrays and this, using a Get command with an object list might not work that well but at least Set might work.