Ruby is...different. Yet somehow improved in the VX and VX Ace series. ANYWAY...
I'm curious as to whether or not the Menu System will be customizable through scripting.
Ruby is...different. Yet somehow improved in the VX and VX Ace series. ANYWAY...
I'm curious as to whether or not the Menu System will be customizable through scripting.
You just hit one of the major time-killers of all time right between the eyes didn't you?
...To preempt this I think the ENTIRE menu/inventory system will be scripted (using c++ for actual inventory of course). In order to do this the Gui and widget classes need to be very powerful, easy to use, and flexable. ..not an easy feat but I have some ideas. :)
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
Apparently the first post is too big to contain any more.. I'll see what I can do about that.
Anyway here we go. More Core Data Types:
(this process was 1/3 automated so some things were not output. but it should give an idea of how it works.) :)
Basic Sprite classes reference:Code:/** * class that manages attribute values. */ class attributes; { attributes(); attributes(const attributes &); attributes& operator +=(const attributes &); attributes& operator -=(const attributes &); attributes operator +(const attributes &) const; attributes operator -(const attributes &) const; int get_max_param(int) const; int get_stat(int) const; int get_element(int); int get_status_atk(int); int get_status_def(int); void set_max_param(int, int) const; void set_stat(int, int) const; void set_element(int, int); void set_status_atk(int, int); void set_status_def(int, int); }; /** * class that manages items and amount. */ class inventory { inventory(); inventory(const inventory &); }; /** * class that manages equipped items. */ class equipment { equipment(); equipment(const equipment &); }; /** * class that describes an enchantment * or temporary effect on an actor or entity. */ class buff { buff(); buff(const buff &); }; /** * class that holds all basic information of a character */ class character_data { string name; string script; string description; int id; int race_id; int class_id; int portrait_id; int map_spriteset_id; int battle_spriteset_id; int lv; int exp; int gold; attributes attributes; }; /** * class that holds all basic information of a monster */ class monster_data { string name; string script; string description; int id; int portrait_id; int map_spriteset_id; int battle_spriteset_id; int lv; int exp; int gold; attributes attributes; item_dropset item_dropset; }; /** * class that is an instance of a character or monster class; */ class actor { actor(); actor(const actor &); string name; string script; int id; int portrait_id; int map_spriteset_id; int battle_spriteset_id; int get_lv() const; int get_exp() const; int get_gold() const; void set_lv(int) const; void set_exp(int) const; void set_gold(int) const; int get_param(int) const; int get_max_param(int) const; int get_base_max_param(int) const; int get_stat(int) const; int get_base_stat(int) const; int get_status_atk(int) const; int get_status_def(int) const; int get_base_status_atk(int) const; int get_base_status_def(int) const; void set_param(int, int) const; void set_base_max_param(int, int) const; void set_base_stat(int, int) const; void set_base_status_atk(int, int) const; void set_base_status_def(int, int) const; const attributes& get_attributes() const; const equipment& get_equipment() const; }; /** * class entity that is a battle instance of, and * holds a reference to, an actor. */ class combatant { actor(); actor(const actor &); actor@ get_actor() const; int get_param(int) const; int get_max_param(int) const; int get_base_max_param(int) const; int get_stat(int) const; int get_base_stat(int) const; int get_status_atk(int) const; int get_status_def(int) const; int get_base_status_atk(int) const; int get_base_status_def(int) const; void set_param(int, int) const; void set_base_max_param(int, int) const; void set_base_stat(int, int) const; void set_base_status_atk(int, int) const; void set_base_status_def(int, int) const; const attributes& get_attributes() const; const equipment& get_equipment() const; }; /** * class that manages a list of current active and reserve * party members, as well as other information. */ class party { party(); party(const party &); int get_gold() const; int get_size() const; int get_active_size() const; int get_reserve_size() const; int get_max_size() const; int get_max_active_size() const; int get_active_member_id(int index) const; int get_reserve_member_id(int index) const; actor@ get_active_member(int index) const; actor@ get_reserve_member(int index) const; inventory& get_inventory(); const inventory& get_inventory() const; void set_gold(int); void set_max_size(int); void set_max_active_size(int); void add_gold(int); void remove_gold(int); void add_member(int); void remove_member(int); bool has_member(int) const; bool is_member_active(int) const; bool is_member_in_reserve(int) const; bool is_full() const; };
Whewee... we're getting serious now!Code://---------------------------------- // * Sprite //---------------------------------- class sprite { public: vec2 size; vec2 scale; color color; blendmode blendmode; float angle; rectf uv; sprite(); sprite(const sprite&); sprite &operator =(const sprite&); }; //---------------------------------- // * SpriteAnimation //---------------------------------- class sprite_animation { public: int animation_speed; int frame; int num_frames; rect source_rect; rectf uv; bool is_animated() const; //void flip(int flags); }; //---------------------------------- // * AnimatedSprite //---------------------------------- class animated_sprite : public sprite_animation { public: vec2 size; vec2 scale; color color; blendmode blendmode; float angle; animated_sprite(); animated_sprite(const animated_sprite&); animated_sprite &operator =(const sprite&); animated_sprite &operator =(const animated_sprite&); }; //---------------------------------- // * AnimatedSpriteSet //---------------------------------- class animated_spriteset { public: sprite_animation animation[]; vec2 size; vec2 scale; color color; blendmode blendmode; float angle; int num_animations; //get int state; animated_spriteset(); animated_spriteset(const animated_spriteset&); animated_spriteset &operator =(const animated_spriteset&); //void add_animation(const rect& sourceRect, float speed, int numFrames, int frameOffsetX, int frameOffsetY); //void remove_animation(int index); };
Anyway it's not perfect but it's the best documentation I can do right now.
Ideas for better design, names, functions, etc.. are most welcome.
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
I.. umm... sorta shit-canned the entire scripting engine... yeah. >_>
The reason was because it wasn't productive enough, period. Things like LUA and angelscript are great so long as the scripts are only responsible for doing specialized tasks and logic. That, and binding and creating the script API, both c++ side and script side, was taking up too much time. Angelscript worked great for my last side-project, but for a large project with this kind of scope you really need a more serious solution--well, that or some serious man power. Since I have zero additional man-power in this scenario it was actually a pretty easy call to scrap the whole thing for something better.
So what's better? -Embedded C# is better. There's also a lot of potential support for other languages: http://en.wikipedia.org/wiki/List_of_CLI_languages
This is in fact pretty much exactly what Unity3D does, and the .NET framework already has a shit ton of utility classes and containers ready to go without any fuss, so once the initial cost of set-up is out of the way it's smooth sailing.
The benefits as I see them are:
-Scripts can compile directly into machine code and would be almost as fast as c++. Can also be AOT compiled.
-Maintain portability; Works for x86, X64, and ARM.
-Large framework, with the ability to simply drop-in code off the web. eg., XNA, or use 3rd party libraries.
-Easy to write with an entire interwebs worth of reference material.
-Existing tools for integrated development environment such as Visual Studio, MonoDevelop; also some lightweight ones as well.
-Debugging support through Mono, or perhaps directly debugging through an additional assembly layer (have to think about this).
-I might actually work on it more.
Cons:
-Initial setup time.
-???
Thoughts?
I'll probably just throw together either a Tetris or Galaga clone for fun in order to test everything out.
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
I dare you to build a battle engine where the multiplier for damage is determined by how many lines you complete with a single piece of Tetris, thrown by the enemy's defense rating (so an enemy with a defense of say 12 might through a huge and unwieldly piece). Also, when you 'bust' on the tetris board your party gets hit with a huge attack, like a megaflare or something!
...What does that have to do with scripting? Nothing, you just said Tetris and I have a short attention span.
You got any plans for 3D Capabilities?
Yes, you can do 3D (mostly) the same as XNA. Of course getting it to work with 2D is another matter.
http://tech.pro/tutorial/750/creatin...red-box-in-xna
There's also a VertexArray which is something like this:
It's just openGl so you can write it in c/c++ and call that from a script also.Code:VertexColorTexture3D faces[8]; //fill the faces of the cube faces[0].position = new Vector3(0,1,0); faces[0].uv = animatedSprite.GetUVRect().TopLeft(); faces[0].color = Color.Blue; //etc. VertexArray<VertexColorTexture3D> vertexArray = new VertexArray(); vertexArray.Add(faces); Graphics.GraphicsDevice.DrawVertices(vertexArray);
I'm sure there are other ways; I haven't really given it much thought. The engine itself doesn't much, if any, 3D, so you have to do it yourself, or use 3rd party libraries.
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
As long as I can recreate FF5 in 3D I'll be happy.
C# is a lot of fun, you know that Gleeok.
There are currently 1 users browsing this thread. (0 members and 1 guests)