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

Angry Fox

Re: A replacement for Danmakufu?
« Reply #30 on: September 08, 2009, 08:00:01 AM »
I had to check twice the date of posting to consider this much goodness.
A program designed to be an improvement and refinement over danmakufu.
I look forward to seeing this develop and being able to 'play test' it.

And as earlier mentioned, yes the applocale dependancy is a pain, only one system will run the program because of it...

Re: A replacement for Danmakufu?
« Reply #31 on: September 08, 2009, 01:43:52 PM »
Consider using an existing scripting language -- creating your own is a crapload of work. Calling the C# functions from any other .NET language shouldn't be too hard.

Alternatively, you can omit the scripting language altogether. Just make Shot/Enemy/Player classes and turn Initialize/Tick/Finalize blocks into methods.

Re: A replacement for Danmakufu?
« Reply #32 on: September 08, 2009, 04:38:46 PM »
On the subject of looping music (a subject I hold dear to my heart):

The way ZUN seems to do it is, he stores the BGMs as individual WAV files along with two numbers representing memory addresses in the WAV files. The first represents the memory address of the start of the loop, and the second represents the address of the end of the loop. So in PCB, for instance, the title screen BGM's loop begins at 0x00129300 (1217280 bytes into the WAV file), and ends at 0x00e9e420 (15328288 bytes in). I'm not entirely sure how useful this information will be; I'm also not sure how ZUN handles pausing the music when you pause the game (nor why this concept seems to have escaped Tasofro, but that's neither here no there), but just chipping in my two cents since I can't actually afford $20.

One thing to look into: being able to pause a BGM, play a different BGM, and then stopping the second BGM and resuming the first one where it left off. I suspect not bothering with this, now that the "continue" screen has its own BGM, is a good chunk of why ZUN has made continuing = "start over entire stage."

On the subject of menus:

I think the best way of handling menus (and also probably the most complicated) would be creating a secondary scripting language for how the title-menu should behave. That way, you aren't limited to making Touhou-style games; for instance, you could also make a Suguri-style game ("story mode": you select stages individually and unlock them as you beat them; "arcade mode": you play all the stages continuously; and you can also unlock and select weapons before playing, a mode where you select a boss to fight and then you only fight them, and so forth), or your own entirely different thing.

I think the best way to handle that would involve a sort of "menu screen" class with its own backgrounds, positioning of each item (absolutely or relatively) and/or a list, whether a menu-item is locked or unlocked, the appearance of the menu item if locked (i.e. the image is at 50% alpha for Extra on the title screen, "-------" instead of the name on the music room, etc), and a smattering of things that the menu-items actually do. This could also handle the pause-menu as well.

... okay, this is getting closer to 50 cents, but two more questions: 1. will it stay "scripted," or will you be able to "compile" the scripts to make it harder for someone to hax into your stuff and say, "Hey! There's a wacky unlockable-thing/ending sequence/whatever in this script!" (or just steal it, whatever)? 2. Will this project be open-source?

Re: A replacement for Danmakufu?
« Reply #33 on: September 08, 2009, 11:24:44 PM »
Consider using an existing scripting language -- creating your own is a crapload of work. Calling the C# functions from any other .NET language shouldn't be too hard.

Well, a lot of the work can be taken out if you just use a lexer to write the language (that's what I plan on doing with my javascript danmakufu interpreter). Either way, I think it would be nice if there was some sort of plugin structure that would allow for several different scripting languages. Bonus points if it's cross-platform. Just my two cents.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #34 on: September 09, 2009, 03:08:01 AM »
I have a suggestion on something you might want to code in...maybe. Just...player homing. I'd honestly like an easier way than just factoring everything in and putting in a huge script. Like, I'd rather just have something like IsHoming(true); in the script, with, say, HomingType(REIMU_AMULET); or something to define how it'd home in. (Such that you could have different types of homing, such as true homing that follows until it hits, like Reimu's amulets, homing within a certain range, such as Sakuya's, except still true homing, etc. Maybe allow people to then code in their own homing styles, too?) At least have a homing function that picks the target itself without us having to make a lot of code to do so, and also stop the homing when there's nothing to hit, especially when a boss is dying. Just a thought, though I'm sure a few people might say that they'd rather script the homing themselves, but it'd be nice to NOT have to go through all of that.

I agree with the enemy enumeration thing. Once you actually get a good homing code down, there's not really that much use for it aside from one or two things. It took me nine million years to actually GET a good homing code down, but I did it, and it works perfectly. =D

Enemy enumeration ... noted.


As far as prescripted homing -
I think that, between the people we have around here and the relatively limited scope of different types of homing, I think we can have the different types of homing pretty well covered easily, without me screwing up a shitty built-in implementation :V



Consider using an existing scripting language -- creating your own is a crapload of work. Calling the C# functions from any other .NET language shouldn't be too hard.

Alternatively, you can omit the scripting language altogether. Just make Shot/Enemy/Player classes and turn Initialize/Tick/Finalize blocks into methods.

Well, a lot of the work can be taken out if you just use a lexer to write the language (that's what I plan on doing with my javascript danmakufu interpreter).

If you can find me a scripting language that meets the needs, I'll look at using it.

On the topic of using a .NET language itself to script things - I've considered that.  I do have a couple concerns with the approach, but if they can be solved I'll consider it.
  • Security - probably just an issue of setting permissions, but I'd want to make sure that "Awesome Danmaku 89" isn't deleting a folder off your HDD every time you get hit :V
  • Compiling - all .NET languages, to my knowledge, are compiled languages, so where does compilation take place?  I don't want to force people to download development setups and create entire projects just for some danmaku
  • Complexity - there's a lot of stuff in .NET that would really be (IMO) useless in this application.  Also, the formalities of whatever language(s) is/are used could become cumbersome.

arcane - do you know of a good lexer for .NET languages, or perhaps even a full parser generator?  I can write a lexer/parser mself, but why reinvent the wheel?



On the subject of looping music (a subject I hold dear to my heart):

The way ZUN seems to do it is, he stores the BGMs as individual WAV files along with two numbers representing memory addresses in the WAV files. The first represents the memory address of the start of the loop, and the second represents the address of the end of the loop. So in PCB, for instance, the title screen BGM's loop begins at 0x00129300 (1217280 bytes into the WAV file), and ends at 0x00e9e420 (15328288 bytes in). I'm not entirely sure how useful this information will be; I'm also not sure how ZUN handles pausing the music when you pause the game (nor why this concept seems to have escaped Tasofro, but that's neither here no there), but just chipping in my two cents since I can't actually afford $20.

One thing to look into: being able to pause a BGM, play a different BGM, and then stopping the second BGM and resuming the first one where it left off. I suspect not bothering with this, now that the "continue" screen has its own BGM, is a good chunk of why ZUN has made continuing = "start over entire stage."

Hopefully I can set up a music looping like you describe.  Right now, though, I can't guarentee it - I've only done looping whole songs thusfar.
Like I mentioned above, though, it'd be simple enough to break your music file into two pieces to use my "Plan B" approach.

For simply pausing the music - that should be simple enough.  I'm pretty sure there's a "Pause"/"Resume" feature in the SDL.NET music functions.

As far as the "pause BGM1, play BGM2, resume BGM1" thing, I'm pretty sure it's possible.  The only thing I'd need to be able to do is get where the music is when I pause it, and then restart it at that point - both of which I'm confident are perfectly feasable with SDL.NET's music routines.



On the subject of menus:

I think the best way of handling menus (and also probably the most complicated) would be creating a secondary scripting language for how the title-menu should behave. That way, you aren't limited to making Touhou-style games; for instance, you could also make a Suguri-style game ("story mode": you select stages individually and unlock them as you beat them; "arcade mode": you play all the stages continuously; and you can also unlock and select weapons before playing, a mode where you select a boss to fight and then you only fight them, and so forth), or your own entirely different thing.

I think the best way to handle that would involve a sort of "menu screen" class with its own backgrounds, positioning of each item (absolutely or relatively) and/or a list, whether a menu-item is locked or unlocked, the appearance of the menu item if locked (i.e. the image is at 50% alpha for Extra on the title screen, "-------" instead of the name on the music room, etc), and a smattering of things that the menu-items actually do. This could also handle the pause-menu as well.

This sounds like an extension of my idea of a "Game script" ... a separate menu scripting language could certainly be in order.  Perhaps script each menu as a separate "menu object" of sorts, where each menu item can lead to a new menu or start up a game session.

Hmm ... the possibilities!



... okay, this is getting closer to 50 cents, but two more questions: 1. will it stay "scripted," or will you be able to "compile" the scripts to make it harder for someone to hax into your stuff and say, "Hey! There's a wacky unlockable-thing/ending sequence/whatever in this script!" (or just steal it, whatever)? 2. Will this project be open-source?

1) My plan is to have support for regular script files to be readable directly into the program.  If there is demand for a compiled format (so you can keep the ending hidden/stop Suikama from stealing shit*), I can add it in.

2) Currently my intention is not to open-source it ... not that I don't like open source stuff, but I'm not too comfortable with just throwing my code out there.  If there's heavy demand, I may change my mind though.



Either way, I think it would be nice if there was some sort of plugin structure that would allow for several different scripting languages. Bonus points if it's cross-platform. Just my two cents.

Supporting multiple different scripting languages is certainly possible, and an idea that I've been thinking about myself a bit.  Making it plugin-based (by .dll's, I'm assuming) would be a slight bit tricky, but certainly feasible.


* Suikama - don't take offense.  I'm just joking around ^__^
« Last Edit: September 09, 2009, 03:14:08 AM by Nuclear Cheese »
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #35 on: September 09, 2009, 03:30:54 AM »
1) My plan is to have support for regular script files to be readable directly into the program.  If there is demand for a compiled format (so you can keep the ending hidden/stop Suikama from stealing shit*), I can add it in.
You'll never stop me! :V

Re: A replacement for Danmakufu?
« Reply #36 on: September 09, 2009, 03:36:30 AM »
arcane - do you know of a good lexer for .NET languages, or perhaps even a full parser generator?  I can write a lexer/parser mself, but why reinvent the wheel?

Yeah, there's a bunch for .NET: http://en.wikipedia.org/wiki/List_of_parser_generators

I can't give you any specific one over the other, due to the fact that I don't know much about .NET.

It would be great if this was open source, that way I could transcribe your parser into my engine; I can't do that very easily with danmakufu, it would probably cut the time I'd need to spend on it in half.
« Last Edit: September 09, 2009, 03:42:22 AM by arcanesign »

Re: A replacement for Danmakufu?
« Reply #37 on: September 09, 2009, 05:00:26 AM »
Well, then, I demand that you make it open-source and include a "compiled" format! ;)

Seriously, though: open-sourcing it would make it a lot easier for people to find and fix bugs, make their own versions, add in "compiled" support if you never make it, pick up the project if you suddenly suffer a fatal heart attack or just lose interest, etc ... ;3

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #38 on: September 10, 2009, 02:49:35 AM »
arcane - do you know of a good lexer for .NET languages, or perhaps even a full parser generator?  I can write a lexer/parser mself, but why reinvent the wheel?

Yeah, there's a bunch for .NET: http://en.wikipedia.org/wiki/List_of_parser_generators

I can't give you any specific one over the other, due to the fact that I don't know much about .NET.

Whoa, awesome find.  This could help significantly.  I shall have to investigate.
How the hell did I not think to check for such a page?


It would be great if this was open source, that way I could transcribe your parser into my engine; I can't do that very easily with danmakufu, it would probably cut the time I'd need to spend on it in half.

Well, then, I demand that you make it open-source and include a "compiled" format! ;)

Seriously, though: open-sourcing it would make it a lot easier for people to find and fix bugs, make their own versions, add in "compiled" support if you never make it, pick up the project if you suddenly suffer a fatal heart attack or just lose interest, etc ... ;3

Jeez, you people and your demands :V

I'll think about the open source thing - probably can set it up once the codebase gets to a decent, stable point.  Never set up such a thing before, though, so when that point comes around, I'll be looking for advice/support on setting it up.

And I'll add a compiled format to the list of features, although please keep in mind that I think it'll be a low-priority feature for the time being.



1) My plan is to have support for regular script files to be readable directly into the program.  If there is demand for a compiled format (so you can keep the ending hidden/stop Suikama from stealing shit*), I can add it in.
You'll never stop me! :V

Is this a challenge?  >:D
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #39 on: September 10, 2009, 04:34:20 AM »
Well, then, I demand that you make it open-source and include a "compiled" format! ;)

Seriously, though: open-sourcing it would make it a lot easier for people to find and fix bugs, make their own versions, add in "compiled" support if you never make it, pick up the project if you suddenly suffer a fatal heart attack or just lose interest, etc ... ;3

Jeez, you people and your demands :V

I'll think about the open source thing - probably can set it up once the codebase gets to a decent, stable point.  Never set up such a thing before, though, so when that point comes around, I'll be looking for advice/support on setting it up.

And I'll add a compiled format to the list of features, although please keep in mind that I think it'll be a low-priority feature for the time being.
Fair enough. If "getting started on it" is part of the source of the problem with open-source, I can certainly sympathize. ;)

Lawence Codye

  • The Nine Tails of Subconscious...
  • Come & your desires shall all become reality...
Re: A replacement for Danmakufu?
« Reply #40 on: September 10, 2009, 08:06:12 AM »
I'd definitely like to see power items/power system put in there somewhere & for the player/character scripts to be easier to put together(?)...suggestions on how to go about this, I got nothing...
I am the Nine Tails of Subconscious...

Come & your greatest desires will be reality...

Infy♫

  • Demonic★Moe
  • *
Re: A replacement for Danmakufu?
« Reply #41 on: September 10, 2009, 05:58:13 PM »
I had the idea of making some sort of rules.ini file like with the game red alert 2 (if you know how to mod it)
the point here would be that you can modify many things outside of the actual game, such as:
title screen music, define if there is an extra stage and whats required to unlock it, the stage script list, a song title list, and such things.

Drake

  • *
Re: A replacement for Danmakufu?
« Reply #42 on: September 10, 2009, 07:22:10 PM »
The initialization file just points the code towards the files you want. Useful fr expansions and the like, but considering you'll be doing all the coding and inputting files in the script itself which can be edited, there's not much point, imo.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Re: A replacement for Danmakufu?
« Reply #43 on: September 10, 2009, 08:24:52 PM »
Random idea: put things like dialogue etc. in a specific separate file, for the purposes of making it easier to translate the game into other languages.

Re: A replacement for Danmakufu?
« Reply #44 on: September 10, 2009, 09:07:02 PM »
Jeez, you people and your demands :V

I'll think about the open source thing - probably can set it up once the codebase gets to a decent, stable point.  Never set up such a thing before, though, so when that point comes around, I'll be looking for advice/support on setting it up.

I'd be willing to help you out there, I know a lot about open source. PM me if you want.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #45 on: September 11, 2009, 01:28:08 AM »
I'd definitely like to see power items/power system put in there somewhere ...

I already have a note for power items.




... & for the player/character scripts to be easier to put together(?)...suggestions on how to go about this, I got nothing...

I'm not too familiar with Danmakufu's player scripting; any particular points that people felt were bad?



I had the idea of making some sort of rules.ini file like with the game red alert 2 (if you know how to mod it)
the point here would be that you can modify many things outside of the actual game, such as:
title screen music, define if there is an extra stage and whats required to unlock it, the stage script list, a song title list, and such things.

This falls in line with the idea of a "game script" - a script which gives an overall definition of the game, sets up menus, etc.



Random idea: put things like dialogue etc. in a specific separate file, for the purposes of making it easier to translate the game into other languages.

Good idea.  Noted.

... perhaps, we could even take it a step further, and format these files some way so that the player could select their preferred language, and have it use that when possible.  What do you people think?



I'd be willing to help you out there, I know a lot about open source. PM me if you want.

Thanks for the support.  (If/)When the time comes, I'll ping you about it.




This week has seen me pretty busy between work and family stuff.  Hopefully I'll get a chance to sit down on the weekend and perhaps start cranking some stuff out.  I'll keep you all posted, of course.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #46 on: September 11, 2009, 03:19:27 AM »
... perhaps, we could even take it a step further, and format these files some way so that the player could select their preferred language, and have it use that when possible.  What do you people think?
Even better!

Suggestion: rather than hardcoding things like power, bosses' health-meters, dying, etc., you include a bunch of "default scripts" which handle things like that, so that if someone doesn't want to use it or wants to use something different (i.e. an Imperishable Night-style game where one type of item is a powerup and another is a point-item for the human-character, and it's the other way around for the youkai-character; PCB-style "this boss has X number of health-meters" versus MoF-style versus EoSD-style; a health-meter for the player instead of a number of lives), they don't have to use scripts to fight an uphill battle against the hardcode.

Re: A replacement for Danmakufu?
« Reply #47 on: September 13, 2009, 03:58:40 AM »
I'm ditching danmakufu the instant you finish this.

Also, it'd be nice if you could compile the scripts into an exe.
« Last Edit: September 13, 2009, 04:01:23 AM by Darkblizer »

Momiji

  • Cya
Re: A replacement for Danmakufu?
« Reply #48 on: September 13, 2009, 10:58:07 AM »
Fourth Item: Implementation:

As I mentioned previously, this would be implemented using SDL.NET and OpenGL in C#.  The main advantage of this is that it should be entirely cross-platform portable (without even recompiling!) using Mono.
EW .NET! >_<  Er, uh... I mean, thanks for thinking about us Linux users.  Might actually give this a try if you work on it. =]  Lemme know if you need a Linux tester.

Re: A replacement for Danmakufu?
« Reply #49 on: September 13, 2009, 02:00:57 PM »
Fourth Item: Implementation:

As I mentioned previously, this would be implemented using SDL.NET and OpenGL in C#.  The main advantage of this is that it should be entirely cross-platform portable (without even recompiling!) using Mono.
EW .NET! >_<  Er, uh... I mean, thanks for thinking about us Linux users.  Might actually give this a try if you work on it. =]  Lemme know if you need a Linux tester.

Meh, a lot of Linux apps are written in C#... Banshee, tomboy, and countless others. It's actually a pretty nice language, from what I can tell.

DarkslimeZ

  • A REIMU SLIME APPEARED.
  • COMMAND?
    • Eternal Temporality
Re: A replacement for Danmakufu?
« Reply #50 on: September 13, 2009, 02:53:15 PM »
Awesome idea and something I never got around to doing, Nuclear Cheese.

How are you going about programming this, anyway? I have a lot of experience in SDL.NET, but I understand it's not the most efficient way to do things - unfortunately, I don't know how to use OpenGL in C#. Someone in #c76 mentioned they always just initialize the window with SDL.NET and then do everything else in openGL.

Along those lines, any websites you can point me towards regarding doing just that?

[14:12] <~BoredTSO> you need to have enough fissile material in a certain density to reach supercriticality

Re: A replacement for Danmakufu?
« Reply #51 on: September 13, 2009, 06:03:02 PM »
Just had another thought about localization: instead of just one text file, have a .ZIP file or whatever which would also contain any images with text on them.

And as I was typing that it occurred to me that you wouldn't just need to use that for languages: if you put in levels and menus, you could have things like mods and expansion packs ... the possibilities are endless.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #52 on: September 14, 2009, 01:00:56 AM »
I'm ditching danmakufu the instant you finish this.

Also, it'd be nice if you could compile the scripts into an exe.

Glad to have support.


Compiling scripts into an executable would be rather tricky, I think.  Not sure if I want to go down that path anytime soon. :-\
On the bright side, there have already been requests for a 'compiled' script format, which would covert your (text) script file into a binary one - this could be close to what you're looking for.



EW .NET! >_<  Er, uh... I mean, thanks for thinking about us Linux users.  Might actually give this a try if you work on it. =]  Lemme know if you need a Linux tester.

Honestly, .NET is one of the things that Microsoft did right, if you ask me.  And I'm usually on the frontlines of the MS-bashing. :V

As far as testing is concerned - when this gets to the point where I think some widespread testing* can occur, I'll put up a quick download for people to try.  Feel free to give it a go and post your results/etc then.

* In other words, when it doesn't look like total shit.



Awesome idea and something I never got around to doing, Nuclear Cheese.

How are you going about programming this, anyway? I have a lot of experience in SDL.NET, but I understand it's not the most efficient way to do things - unfortunately, I don't know how to use OpenGL in C#. Someone in #c76 mentioned they always just initialize the window with SDL.NET and then do everything else in openGL.

Along those lines, any websites you can point me towards regarding doing just that?

SDL.NET isn't that bad efficiency-wise, but using direct OpenGL calls is faster.  Basically, SDL.NET manages all of the resources, but for video output you use the Tao Framework OpenGL mapping to call OpenGL commands directly.  I still am going to use SDL.NET to manage audio and input processing.

Also, I've found that SDL.NET's graphics functions are a lot more limited - scaling or rotating an Surface requires you to create another Surface entirely for the result, for instance.  In OpenGL, theses are nothing more than a couple matrix operations at most.

As far as tutorials ... I learned OpenGL in a class at college (mostly), so I'm not sure what's good.  I hear the Nehe tutorials are good, though, and I think they've translated a couple for use with SDL.NET on SDL.NET's tutorial page.



Just had another thought about localization: instead of just one text file, have a .ZIP file or whatever which would also contain any images with text on them.

And as I was typing that it occurred to me that you wouldn't just need to use that for languages: if you put in levels and menus, you could have things like mods and expansion packs ... the possibilities are endless.

.zip files with all localization assets would be good; not sure if I have any easy way of reading into a .zip though, so worst case would be to extract the info into a subfolder or something.

And the idea for using them for mods and expansions could be cool.






And, finally, an update: CODING HAS STARTED

If I remember, I'll update with more details later, after working on it a bit more.  Very unlikely I'll have a testing release tonight, but I'd say so far the progress is pretty good.


To note, however - between work and family crap, I won't be able to much/any work on this during most weekdays.  I'll still have my laptop, so I can keep up with the folks here, but coding is unlikely at best, and downright impossible at worst, during the week. :-\
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #53 on: September 14, 2009, 01:02:46 AM »
And, finally, an update: CODING HAS STARTED
YEAAAAHH ಥ_____ಥ!!!

Re: A replacement for Danmakufu?
« Reply #54 on: September 14, 2009, 01:30:19 AM »
Very unlikely I'll have a testing release tonight, but I'd say so far the progress is pretty good.

Jesus dude, I wasn't expecting a working beta for weeks, at this rate I'm actually going to have to script something in Danmakufu before it becomes obsolete!

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #55 on: September 14, 2009, 02:33:35 AM »
Very unlikely I'll have a testing release tonight, but I'd say so far the progress is pretty good.

Jesus dude, I wasn't expecting a working beta for weeks ...

Well, I don't want you guys to expect something too soon ... like I said before I only really have time for this on the weekends (and that's only after I get more important weekend activities out of the way, like sleep).

Here's a summary of the progress so far:

  • Basic Structure:
    • Basic setup of class structures for Objects and Object Types.
  • Rendering Engine:
    • Window setup and SDL/OpenGL initialization.
    • Temporary code to draw a triangle for each Object.
  • Execution Engine:
    • Basic setup of class structures for Script containers.
    • Coded variable lookup and assignment.
    • Started work on core execution engine.
  • Other:
    • Simple angle & speed movement for Objects

Basically, it's a lot of back-end work that needs to be done, but ultimately isn't worth showing off. :V


Note that, when I say "Execution Engine", I'm referring to the code that actually executes scripts.  This does not include parsing script files - at this point the script has already been converted into a simple, almost assembler-like code that is very straightforward to execute in realtime.  Right now the only instruction it knows is add, and it can only do it with numbers right now (plan is to use that same function for string concatenation and boolean OR, and well as to convert an int/bool to a string to concatenate to another string).  So, here's the 'script' the program has hard-coded into it right now:

Initialize:
add global["a"], 1.0, 1.5

Tick:
add global["a"], 0.1, global["a"]

(This isn't what it actually looks like - really it's coded in by directly assigning the pieces of the script instruction array - really ugly to read and completely temporary for testing purposes)

In other words, it starts by setting the global-scope variable a to 1.0 + 1.5.  Then, each frame, the tick function adds 0.1 to it.  Currently, the game spawns two objects, so thats a total of +0.2 per frame.  Combine that with a temporary display of the value on the title bar to make sure it's working.  Wheee~

If it were an actual script language, it would probably look something like:
Code: [Select]
Musuu
Script[ScriptType]

// 'a' is a global variable
global a;

// Define an enemy boss object type
Boss "A Boss"
{
   // Define the initialization script
   Initialize
   {
      a = 1.0 + 1.5;
   }

   // Define the tick (per-frame) script
   Tick
   {
      a = a + 0.1;
   }
}

Of course, this is purely speculative syntax at this point.  The first line indicates that it is a Musuu no Danmaku script file, which the second line indicates the script file's type (as in, what syntax the file will have); this will allow multiple different script formats to be supported easily.


For the angle/speed movement thing - All Objects have an angle and speed parameter, which can be set to give them simple movement.  More movement options will, of course, be added, but this was simple enough to throw in there right away.



There's still a ton of things to get in before any sort of testing release ... notably:
  • Finish the Execution Engine
  • Load and Render Images, as well as finish other touches of the rendering system
  • Collision Detection
  • A Menu to Select Scripts
  • Input
  • Parsing an Actual Script Language (unless you people are crazy enough to try scripting in pseudo-assembler)

... did I miss anything critical?





... at this rate I'm actually going to have to script something in Danmakufu before it becomes obsolete!

Going by Drake's offer, obsoleting Danmakufu is going to be necessary if I ever want to finish my biggest Danmakufu script ever, so, despite leading this effort, I'll probably be one of the last ones here to fully switch over. :V
« Last Edit: September 14, 2009, 04:49:32 AM by Nuclear Cheese »
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #56 on: September 14, 2009, 02:41:42 AM »

DarkslimeZ

  • A REIMU SLIME APPEARED.
  • COMMAND?
    • Eternal Temporality
Re: A replacement for Danmakufu?
« Reply #57 on: September 14, 2009, 03:01:16 AM »
Don't forget the input handling. :p

Anyway, I'll look up some information on the Tao framework's openGL stuff, I guess, and play around with it a little. Hopefully I'll be in a position to help you out a little if you put the source code online... or something. 8D

EDIT -- Well, I taught myself openGL for a school group project(physics simulator, whoo) but that was using glut -- though it used enough openGL for the code to be recognizable to me. What I'm confused about, and what I can't find, is an example of using SDL.NET to create the window and then using openGL the rest of the way... The examples on Nehe have an insane amount of DLL and function imports all over the place >_<
« Last Edit: September 14, 2009, 03:13:07 AM by Darkslime »

[14:12] <~BoredTSO> you need to have enough fissile material in a certain density to reach supercriticality

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #58 on: September 14, 2009, 04:51:13 AM »
Don't forget the input handling. :p

What're you talking about?  It was on the list the whole time! *shifty eyes*

Anyway, I'll look up some information on the Tao framework's openGL stuff, I guess, and play around with it a little. Hopefully I'll be in a position to help you out a little if you put the source code online... or something. 8D

EDIT -- Well, I taught myself openGL for a school group project(physics simulator, whoo) but that was using glut -- though it used enough openGL for the code to be recognizable to me. What I'm confused about, and what I can't find, is an example of using SDL.NET to create the window and then using openGL the rest of the way... The examples on Nehe have an insane amount of DLL and function imports all over the place >_<

Perhaps this will help: http://cs-sdl.sourceforge.net/index.php/NeHe_1_OpenGL_Tutorial
to quote Naut:
"I can see the background, there are too many safespots."
:V

Momiji

  • Cya
Re: A replacement for Danmakufu?
« Reply #59 on: September 14, 2009, 10:53:38 AM »
Honestly, .NET is one of the things that Microsoft did right, if you ask me.  And I'm usually on the frontlines of the MS-bashing. :V

As far as testing is concerned - when this gets to the point where I think some widespread testing* can occur, I'll put up a quick download for people to try.  Feel free to give it a go and post your results/etc then.

* In other words, when it doesn't look like total shit.
Yep yep.  I guess I'll prefetch Mono, so I can install it when you have some code ready.