Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Visual RGSS Express -- IMPORTANT UPDATE

OS

Sponsor

No. I decreased the height so that it would fit on the screen while the TaskBar was out. If I don't, the Status Bar at the bottom of my Programs slides a little bit under the TaskBar, and it loos stupid.

I've got 2008, but I don't use it. Didn't know it made Apps look that much different. I like it. I think I'll try making the new form in 2008, and see how it goes.
 
Actually some of the UI elements you saw in that example were some I coded myself.  The list with the TestMethod() is a custom control, as are the menus.
 

OS

Sponsor

Oh. Hey, do you think you could help me understand better how to create these? I can make Drawing Panels and such, but I don't know how to really work with things like List Boxes.

The one thing I am really trying to figure out is how to make the Code List Box act like the one in RMXP, showing multiple lines of text and always starting <> (or something similar, that doesn't get placed in the Lines of the List Box, but is just there for aesthetic reasons) Like the picture in your Methods Box, except with a string.

See ya.

~Owesome Scriptor
 
Well,

The .NET Common Language Runtime comes with the ability to extend the default control set.  So what I did was make a class that extended the regular ListBox control and added my own functionality on top of it.

Since ComboBox, ListBox, MenuItem all support owner drawn capabilities, I wrote a generalized framework using generic types and each one of my own controls implemented the general framework in their own specific way.

In the case of the ListBox, I created an ImageCheckedListBox like so:
public partial class ImageCheckedListBox : ListBox,
    IOwnerDrawn<ImageCheckedListBox.ImageObjectItem, ImageCheckedListBox>
{
Which basically instructs the system on how to make the relationship between the 'Ownerdrawn' element and its parent.  The parent is used to determine the top-most element in the owner-drawn hierarchy.

To make it actually work; however, the ImageListBox/ImageCheckedListBox has its DrawMode set to DrawMode.OwnerDrawVariable (from System.Windows.Forms), and it overrides OnDrawItem(System.Windows.Forms.DrawItemEventArgs e) and OnMeasureItem(System.Windows.Forms.MeasureItemEventArgs e).  Since I used a generalized drawing/measure framework, I pass the draw/measure to the appropriate style manager (this way I can have multiple styles, and the style object controls the drawing, instead of the control).

Here's the OnDrawItem code.
protected override void OnDrawItem(System.Windows.Forms.DrawItemEventArgs e)
{
    if ((e.Index != -1) && e.Index < base.Items.Count)
    {
        object item = base.Items[e.Index];
        if (item is ImageObjectItem)
        {
            try
            {
                DrawItemState diState = e.State;
                if ((item as ImageObjectItem).Checked)
                    diState |= DrawItemState.Checked;
                DrawItemEventArgs newArgs = new DrawItemEventArgs(e.Graphics, e.Font, e.Bounds, e.Index, diState);
                if (this.Style != null)
                    this.Style.OnDrawItemEvent(item as ImageObjectItem, newArgs, this.Font);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message + "\r\n" + ee.StackTrace);
            }
        }
    }
    base.OnDrawItem(e);
}

If you're interested I can go into further detail.
 

OS

Sponsor

I am very much interested. I have found a bunch of tutorials in the past few minutes, but they all require me to sign up to their sites (I have so many passwords I don't know what to do with them all...)

Some more detail would be great. But first, I have some questions about the little stuff in that method; when you use the 'as' keyword, is it like Type Casting? Also, which operator is '|'. I've only ever seen it in 'or' (||) and as a way to include multiple values from an enum (Day.Morning | Day.Noon).

Thank you much for this help. I love learning more about Programming, but I haven't had much time to learn these things. I've been too busy planning out my projects. Sigh.

~Owesome Scriptor
 
What you saw was called an assignment operator, that is more specifically assign |= which is like +=, except instead of adding the value to the current value, it does a logical or ('|') against the current value and then assigns.

For the keyword 'as', it basically works on class-types only.  For example, lets say you have something you suspect may be a form, but you're not quite sure, but you don't want to throw an error by trying to do a cast.  What you'd do is:

Form myValue = theirValue as Form;
if (myValue == null) //... et cetera

See, what it does is checks if the value, theirValue, is a form, if it is, it sets the variable, myValue, to null if it is NOT a form, but sets it to the form if it is.  It ensures type-safety without having to worry about throwing an error if you're wrong.

The reason it works on value-types only is even interface types can be assigned to a structure, and cannot be null themselves.  So you can't apply something that could potentially return 'null', to some arbitrary input that might be a value-type (non-nullable type).
 

OS

Sponsor

Oh, I see. Thank you for explaining those to me. This is a great help to me. If you have any more ideas for the layout, or any advice, please let me know. I appreciate your help very much.

~Owesome Scriptor
 

OS

Sponsor

Thanks. Me too. lol

OK, so I am having a bit of trouble getting hired anywhere in town, so I think I'm going to be making VRE a bit more simplified and saving big features for a different program called Visual RGSS Studio (VRS), which will probably be going for ~20-60 USD. I'm also going to be writing a bunch of other programs to make some money, so if anyone has any ideas for a program, PM me.

Now, a little more on-topic:

I have successfully implemented a PlugIn system, so now this won't only be limited to RGSS. I (or someone who actually has VX) can make RGSS2 PlugIns, and there will also be the possibility of entirely different languages being used, because the code that generates the scripts is inside the plug in for its language.

In case I'm not being clear, the RgssPlugIn contains the Commands, Generators, and Templates. This means that Rgss2PlugIn has its own Syntax and Templates and etc. That means that other languages (such as GameMaker's GML, for instance) could be applied.

Cool, right?

Because of this, what do you think might be a cool new name for the program, so it sounds more general?
 
OS":2e8epk0h said:
Thanks. Me too. lol

OK, so I am having a bit of trouble getting hired anywhere in town, so I think I'm going to be making VRE a bit more simplified and saving big features for a different program called Visual RGSS Studio (VRS), which will probably be going for ~20-60 USD. I'm also going to be writing a bunch of other programs to make some money, so if anyone has any ideas for a program, PM me.

Now, a little more on-topic:

I have successfully implemented a PlugIn system, so now this won't only be limited to RGSS. I (or someone who actually has VX) can make RGSS2 PlugIns, and there will also be the possibility of entirely different languages being used, because the code that generates the scripts is inside the plug in for its language.

In case I'm not being clear, the RgssPlugIn contains the Commands, Generators, and Templates. This means that Rgss2PlugIn has its own Syntax and Templates and etc. That means that other languages (such as GameMaker's GML, for instance) could be applied.

Cool, right?

Because of this, what do you think might be a cool new name for the program, so it sounds more general?

Wait... If VRS is going to cost money, will VRE also? I was hoping for freeware ;)
 
Well if the word 'Express' is similar to the 'Express' in 'Visual ____ Express Edition's (Insert C#, Basic, J#, C++ and so on in the ____), then it means it's free.  The only difference is a few key features are left out; however, the features left out are minimal at best. Just time-savers and things like that.  Express editions of those products remove plug-in support, higher-level refactoring, et al.  Things that you can live without, but the features are nice to have, if you have them.

I'm guessing VRS³ will come after VRE due to OS needing to actually functionally develop the project concepts.  I'm guessing (pure guess, haven't talked to OS) that VRS³ will just be more polished and contain a features that the other doesn't have, perhaps more powerful time savers (since that's the entire reason to use a Visual Editor).

Edit:
As for a more generalized name: Visual Game Scripting Studio for the full, and Visual Game Scripting Express, for the free?

Amusingly, you may remember I'm also making an entire framework around code generation.  If you're interested in knowing more about the actual framework, you can e-mail me at Alex@AlexanderMorou.com.  It's double filtered, so I won't have to worry about spam.
 

OS

Sponsor

As Alex says, VRE will be free, and VRS will cost money. But VRS will have more special features, including extra Templates, better/more tutorials, and...well, here is a planned feature list for both programs:

Basic Mode: All Versions
Advanced Mode: All Versions
Visual Window Maker: All Versions
Visual Scene Builder: All Versions
Visual Battle Editor: Undecided*#*
FBF Scene Builder: Studio XP, Studio VX, and Studio Pro only
TUT: Using Basic: All Versions
TUT: Using Advanced: All Versions
TUT: Windows: All Versions
TUT: Scenes: All Versions
TUT: Battles: Undecided*#*
TUT: Scenes 2 (FBF): Studio XP, Studio VX, and Studio Pro only
RGSS PlugIns: Express, Studio XP, and Studio Pro only
RGSS2 PlugIns: Studio VX and Studio Pro only
PlugIns Allowed: Studio XP, Studio VX, and Studio Pro only (SEE NOTICE BELOW)
TUT: RGSS Commands: Express, Studio XP, and Studio Pro only
TUT: RGSS2 Commands: Studio VX and Studio Pro only

*This is only a rough draft, and subject to change. Not all of the features are shown.

I am not sure what to do with Battle Building. It seems like a feature a lot of people might pay for, but I just don't know if I want to do that to the users that can't afford it. After all, I know what it is like to miss out because of money problems. GRAHHHH! What to do? idk...I'll consider this a while longer. Maybe have certain features locked in here for Express? I just don't know...

Express will only have access to certain commands in RGSS. PlugIns will be available from me that allow RGSS2 (eventually) and other languages I feel like doing. These packs are different than regular plug ins, and are the only kinds of files that will work in Express, so you won't be able to 'cheat' and add the missing commands yourself. Don't worry, though. The missing commands will be the ones that are more for real scriptors, and some that don't have too much affect on the Express User.

You may notice there are 4 versions now. Express, Studio XP, Studio VX, and Studio Pro. This is because some may be working in XP only, VX only, or both, so I decided to split them up. The only real difference is that XP only has the RGSS libraries, while VX has only the RGSS2 libraries, and the Pro version has both. I think I might add special editors for XP and VX as well.

Oh, and thanks for the name suggestions, Alex. I think VGS might be the new name (Visual Game Scriptor). VGSe and VGS2.

So, final thoughts: I'll try to finish the Express Beta by the end of summer, or at least before October. My schedule has been shifting a bit, and in anticipation of the coming year, I predict a final product be next Summer, or, if I am lucky (and get my ass in gear), by Christmas.

Peace!

~Owen Sael
 

OS

Sponsor

MAJOR UPDATE:

OK, so I have been working hard all day, and I am so excited, I want to share what I have done. I don't have a demo ready, but this is a small portion of the one I am making, which I plan to release by the end of summer.

The code below (in C#, mind you) is just the Interface for Codes, and an example code, the slightly simplified Variable Operations. It also showcases my Parameter System, which I am very excited to show. So tell me what you think.

Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace VGSBeta
{
    public interface ICode
    {
        string Name { get; set; }
        List<Variable> Variables { get; set; }
        Parameters Parameters { get; set; }

        /// <summary>
        /// Actual code, generated and supplied to a complete method/class/etc.
        /// </summary>
        /// <returns></returns>
        List<string> GenerateCode();
        /// <summary>
        /// The text displayed in the Event-Style Editors.
        /// </summary>
        /// <returns></returns>
        string EditorText();
    }

    namespace Codes
    {
        namespace Common
        {
            public class VariableOperations : ICode
            {
                private string name;
                private List<Variable> variables;
                private Parameters parameters;
                private Scope scope;

                public VariableOperations()
                {
                    name = "Variable Operations";
                    scope = Scope.Local;
                    variables = new List<Variable>();
                    parameters = new Parameters();
                    VariableListParameter param1 = new VariableListParameter("VariableChoice", "A List of variables.", Scope.Local);
                    ListParameter param2 = new ListParameter("Action", "A list of actions.", "Set", "Add", "Sub", "Mod", "Multiply", "Divide");
                    BasicParameter param3 = new BasicParameter("Value", "The value that the variable will be 'actioned' by.");

                    parameters.Add(param1);
                    parameters.Add(param2);
                    parameters.Add(param3);
                }

                public Scope Scope
                {
                    get { return scope; }
                    set
                    {
                        VariableListParameter param = (VariableListParameter)parameters["VariableChoice"];
                        param.Scope = scope = value;
                        parameters["VaraibleChoice"] = param;
                    }
                }

                #region ICode Members

                public string Name
                {
                    get
                    {
                        return name;
                    }
                    set
                    {
                        name = value;
                    }
                }

                public List<Variable> Variables
                {
                    get
                    {
                        return variables;
                    }
                    set
                    {
                        variables = value;
                    }
                }

                public Parameters Parameters
                {
                    get
                    {
                        return parameters;
                    }
                    set
                    {
                        parameters = value;
                    }
                }

                public List<string> GenerateCode()
                {
                    List<string> lines = new List<string>();

                    VariableListParameter vList = (VariableListParameter)parameters["VariableChoice"];
                    Variable var = VGSBeta.Variables.GetVariable(vList.Value, vList.Scope);
                    ListParameter action = (ListParameter)parameters["Action"];
                    BasicParameter value = (BasicParameter)parameters["Value"];

                    string actionSymbol = "";
                    if (action.Value == "Set")
                        actionSymbol = "=";
                    else if (action.Value == "Add")
                        actionSymbol = "+";
                    else if (action.Value == "Sub")
                        actionSymbol = "-";
                    else if (action.Value == "Mod")
                        actionSymbol = "%";
                    else if (action.Value == "Multiply")
                        actionSymbol = "*";
                    else if (action.Value == "Divide")
                        actionSymbol = "/";

                    string result = string.Format("{0} {1} {2}", var.FullName, actionSymbol, value.Value);

                    lines.Add(result);

                    return lines;
                }

                public string EditorText()
                {
                    return string.Format("Variable [{0}] {1} {2}", parameters["VariableChoice"], parameters["Action"], parameters["Value"]);
                }

                #endregion
            }
        }
    }
}

If you pay attention to the GenerateCode() method, you might notice that that entire class (Codes.Common.VariableOperations) only creates one line of code with three parts: a variable, the operation (= + -  % / *), and the value to use on the variable.

Seems kind of ridiculous, but it should work. Just wait until I start doing the big codes!

If anyone has any questions, comments, ideas, etc., post away. I can only hope this gets people as excited as I am. Giggity giggity.

~Owen Sael
 
Just a few questions if you don't mind...

So will this be able to target Visual Basic.NET where '%' is 'Mod', or other languages where the mathematical operators vary from the definitions you've presented?

How about cases where the member accessors aren't periods?  So when you have a case where 'thisThing.Test = 9' if the member accessor is '->' or '::' you might have an issue, or does that go beyond the scope that you're focusing on?

Also, are action symbols limited to the six options you've provided, if they are: couldn't you condense it into an enum type instead of using string values to store the symbols?  I hope I'm not being too terribly picky here.  It's just a few things I'm curious about.

Languages are my playground so I tend to get a bit picky, if you think that's what this is, just ignore this post.
 

OS

Sponsor

Actually, after some consideration, I have decided to just stick with RGSS. In order to make things work correctly, I need to build RGSS specific data into some parts of the editor. I don't really mind, since RGSS was my original target anyways.

As for the symbols, they are defined inside of a Parameter object. This is because they are only used inside this one code right now. If they become a recurring object (as I suspect they might at this point), then I will create a Parameter object that can be reused.

The symbols are also just the ones I have for now; I will finish writing this Code object later, with more Actions, and possibly more targets. Don't expect them in the Beta, but I can tell you they will be there in the final release.

And for those interested, you can see how I put the language together in my code. I just assemble terms using conditionals.

Oh, and I have great news for Developers that want to make PlugIns: After finally designing the smallest parts of the program (IParameter, ICode, and Variable), I have figured out a way to make life easier for those making plug ins; a small application that uses my Libraries to allow developers to build plug ins with a few simple commands.

I think I will release it with VRS Pro.

And yeah, I need to change the name back to VRE/VRS. It is far too difficult to use VGS after so long with VRE.
 

OS

Sponsor

UPDATE:

I just finished writing the Basic If Statement class. It works like a regular ICode class, but has a List<ICode> object to hold the code inside the If Statement. It is called BasicIfCode because it doesn't allow Variables to be used just yet. That will be a separate code. Oh, and I created a separate class for Operators. By next update, the Operators class will have a way to limit which operators are used in an instance.

Here are a few of the classes I have written:

http://i64.photobucket.com/albums/h163/ ... gram-1.jpg[/img]

I've got all of my Parameter, Content, and Code classes so far, as well as the Main Form and the FrameByFrame Control. There are several more ICode classes to write, but they should be pretty easy (though tedious) to write.

Peace.

~OS
 
It looks good. I'd ask to be a beta tester, but I'd probably be a pretty bad one, and you probably don't need it  :wink:

In truth, I just wanna try it now :tongue:
 

OS

Sponsor

Well, I was inspired by The Scene Generator, so even though this was supposed to be my weekend off, I started writing a scene generator from scratch kind of like my Demo on the previous page. It was going to allow for a Scene with Updating, a sample of my Method Editor, and Variable/Loop/Conditional support. But I just quit. The stupid thing takes a lot of work to try and make it simple without coding everything in the Real VRE. Sorry.

Have a nice weekend,

~Owen Sael
 

OS

Sponsor

IMPORTANT UPDATE

--COMPLETE DESIGN REWRITE--

I understand some people wanted this to work for them, but I don't have time to waste on making everyones' lives so easy. So, I'm doing the next best thing (imo). Check first post for info.

P.S. It took ~15-20 mins to write the simplest version of Variable Operations. If I was still writing these commands, in the full form, it would take far too long to write all of the Event Commands from XP as well as RGSS-Specific commands. Sorry, folks.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top