ogre branch ? new attempt from scratch

The point of no return for both Ogre ports. Permanent links will be stickied on top with current information of each port (Lua and Python)

Moderators: ghoulsblade2, strook

Post Reply
strook
ISO Party Member
ISO Party Member
Posts: 461
Joined: Fri Sep 03, 2010 12:10 pm

Re: ogre branch ? new attempt from scratch

Post by strook »

Deus Siddis wrote:
strook wrote: as it is yet proposed, will YASS be free but closed source,
Folks might actually prefer the opposite arrangement, where the code is open sourced after enough donations have been made to that end.

(In other words people pay money to have the YASS source code released into the public domain.)
I don't know, I think they don't want to have the code simply public, too.

But I'll ask them.
plz visit my vegastrike project branch here

plz support VegaOgre by donating to it!

My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: ogre branch ? new attempt from scratch

Post by Deus Siddis »

strook wrote:It could be somehow be 'stealing of code' but vs could be life further on with the yass engine. I have sent an email to the other developers. And vs is free.

I mean the game structure could be used with yass, cause we have only an engine yet.

We could use

- most of the the data branch
- the space station interface
- the dynamic galaxy system with it's races
The problem would be many/most of those things have been released under licenses, by their numerous individual creators, which won't permit them to be distributed with software that isn't itself open sourced. Tracking down and asking all those individuals to re-release their content and code under a more permissive license would be very difficult.

If at some point the YASS engine was released under a GPL compatible license, it would no longer be an issue though. :mrgreen:
strook
ISO Party Member
ISO Party Member
Posts: 461
Joined: Fri Sep 03, 2010 12:10 pm

Re: ogre branch ? new attempt from scratch

Post by strook »

We are discussing Theese days if we make it open source if the vs code is usuable :)

We do this for the project, cause our project is completely a phun project.
plz visit my vegastrike project branch here

plz support VegaOgre by donating to it!

My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

Deus Siddis wrote:
strook wrote: as it is yet proposed, will YASS be free but closed source,
(In other words people pay money to have the YASS source code released into the public domain.)
A minor note on public domain. When you release something into public domain you no longer have any control over what happens. If someone uses your code they can do whatever they want with it. They can modify it and keep the changes closed. The basis of public domain is that you give up all rights to and over the code. It is not the same as releasing your source code under something like the GPL or MIT license. Just wanted to make sure everyone was aware of the difference ;)
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: ogre branch ? new attempt from scratch

Post by Deus Siddis »

pheonixstorm wrote: A minor note on public domain. When you release something into public domain you no longer have any control over what happens. If someone uses your code they can do whatever they want with it. They can modify it and keep the changes closed. The basis of public domain is that you give up all rights to and over the code. It is not the same as releasing your source code under something like the GPL or MIT license. Just wanted to make sure everyone was aware of the difference ;)
Indeed, that's what would be the issue with using GPL material from VS in a closed source YASS engine-- the licensing from the former probably wouldn't allow it to be used in the latter.

But if the YASS engine is Free Open Source Software, Open Source Software, or Public Domain, then there should be no issue. Any of the three should meet the GPL's special criteria, just as long as it isn't closed source and isn't restricted from commercial use. I don't think GPL material can be mingled with stuff that not everyone is allowed to sell.
strook
ISO Party Member
ISO Party Member
Posts: 461
Joined: Fri Sep 03, 2010 12:10 pm

Re: ogre branch ? new attempt from scratch

Post by strook »

And what about donations and our Public Domain Code then? Can we get donations with our Code weheres there are Parts in it with licenses that are free, but may Be non commercial?
plz visit my vegastrike project branch here

plz support VegaOgre by donating to it!

My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
Ronin
Atmospheric Pilot
Atmospheric Pilot
Posts: 1
Joined: Fri Sep 09, 2011 7:26 am

Re: ogre branch ? new attempt from scratch

Post by Ronin »

Hi everybody,

I'm a developer on the YASS project team and strook told me about your project and the ongoing discussion, so maybe I can say some things from my point of view.

I didn't talk to everybody on the YASS team yet, so all I say is just my personal opinion.

First of all, congratulations! The screenshots of VegaStrike I saw so far look very impressive!

YASS started in 2003 when a friend and I actually wanted to write a medieval RPG and we wrote a simple space shooter to get into the matter of computer game programming first. Somehow the space shooter was more interesting than the originally planned RPG though, so we stick to it and it evolved to something more complex.

Until strook joined our team some weeks ago we were only 2 developers and one artist who joined the team a few years ago. We talked about making the project open source, but decided against it at the very beginning.

But back then we were students and we had a lot of spare time at our hands. This has changed now, we have all to work and finding the time to work on the project is not easy. I had a call with strook yesterday in which he suggested to think again about making YASS open source. Well, I have to say: I do not hate it.

In early October we have rented a vacation home for 2 weeks and we will work on the next binary release of YASS. I think that will be a good time to make such a decision.

For me it is not so much about money (although the concept of donations is quite interesting ;-) ), but rather about what is best for the project and that there is progress. Of course it is also important for me to keep some control of what is going on, at least in the trunk. There are some legal issues with licenses to solve, but that should be possible.

All things considered I could imagine to release YASS under GPL for instance and seek for some kind of cooperation with you guys on the VegaStrike project. I will talk to the rest of the team and then we'll see.

Cheers,
Ronin
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: ogre branch ? new attempt from scratch

Post by Deus Siddis »

Sorry Ronin, I had totally missed your message yesterday when I posted.
Ronin wrote: But back then we were students and we had a lot of spare time at our hands. This has changed now, we have all to work and finding the time to work on the project is not easy. I had a call with strook yesterday in which he suggested to think again about making YASS open source. Well, I have to say: I do not hate it.
...
For me it is not so much about money (although the concept of donations is quite interesting ;-) ), but rather about what is best for the project and that there is progress.
Your team and project have reached a very common turning point then.

Almost always, when the original developers of a freeware closed source project no longer have the same time (or energy) to put into development, the project dies.

But if the source is liberated, it has a chance to live on with the help of newcomer developers, attracted by easy access to the code and the granted rights to use, improve and share it.
Of course it is also important for me to keep some control of what is going on, at least in the trunk.
Certainly, anyone competent and experienced enough to be useful to you in the first place, knows the difference between open source and open development. If someone really doesn't like what you are doing in trunk, they would be free to set up their own fork somewhere.
All things considered I could imagine to release YASS under GPL for instance and seek for some kind of cooperation with you guys on the VegaStrike project. I will talk to the rest of the team and then we'll see.

Cheers,
Ronin
Cool, look forward to hearing the decision.

P.S. In addition to Vega Strike, Pioneer is a similar GPL licensed space action/trade/rpg game. If you folks go open then cooperation with them could be fruitful as well. And there's the previously mentioned OpenGameArt.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

anything new with your version ghoul?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

nope, nothing new on my end, i'm tempted to pick it up again.
Last thing i was working on was a gui dialog for buying/selling stuff on market, wasn't really happy with it yet, gonna take a bit more playing with it i guess.

Also tempting would be making an alternative server software since i can load all the data needed, would take some reverse engineering of the network protocol since i didn't find any docs about that tho.
The current vega multiplayer is broken since you always blow up when you try to buy a new ship, so you're stuck to your starter ship, see tharin server thread.

Which would you guys prefer, alternative server or more ogre experiments / porting ?
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

Umm... actually? At least 10 hours of refactoring the current VS codebase :lol:

Thats actually a tough one.. either is useful.

As far as an alternate server.. I've had several thoughts on this and have wanted to redesign the damn thing for awhile now. Rebuild the whole thing from scratch using networking code (reworked of coarse so we can possibly charge for services at some point in time to fund some of our top tier programmers/artists) examples from Evemu, Ryzom, ManGos, Acremu, Ascent, and most deffinately from one of the quake engines. Another goal was to make the server multithreaded from the start.

Anyway, if you want some projects to run with try this:

1. Build up a design doc on a new vegaserver. Whatever ideas youve had or youve seen posted.
2. Rework the client/server networking code. Something that can be dropped into either ogre fork as well as the main VS client. I figure getting it to work in the ogres would be easier than the main client.
3. Well.. ca't really think of 3 rigt now.. too tired.

Anyway, your call. I'm just throwing out some suggestions for ya.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

Hehe, sorry i don't think just a few days worth of refactoring is gonna lead to a improvement there, the whole thing needs a fundamental redesign.

my idea regarding server was i implement a new and simple one from scratch that allows basic flying around, trade and buying equip, and uses the existing network protocol so the current vegastrike client can connect to it.

i can do the server by myself and have the the code and infos i need, except for one thing :
the actual network protocol used to communicat with the client.
I was hoping one of the devs here could explain it or show me docs, but it seems like it'll end up being me digging through the vegastrike code base and/or wire-sharking the existing server to reverse engineer the protocol. Not the way i'd preferred, but meh, should work.

As for server tech : i'd go simple first, and it should be enough for a few dozen players, luabased and directly use the loaders (+ random-system gen) for universe / tradegoods and equip i already have for my lua-client.
I'd make it so it works with the normal vegastrike client if i can find out that protocol, and also add multiplayer to my ogre-lua client so they can play together on the same server in theory.
In my client travelling/spec is different, no idea if this is clientside or needs server support/checking. For a fully fair non-cheating game you'd need server-side verification at some point, but i think it's low priority for now.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

For now Its all fiddle with this, fix that, poke and prod this and see what breaks... Ideas and new code is always good. There is a wiki article on the net code though its probably not near complete enough for your needs. Development:Network

And thats why i brought up a design doc for a new server. The current one is fine and we can fix it. Maybe even add a bit to it, but a new threaded server built from the ground up is the final project. Granted we may have to build a new no threaded server form the ground up first.. but at least it will be new and work the way its supposed to. And as far as scripting (python or lua) I think for a server would should leave out the scripting if possible.

I really wish I have more C++ experience... spent too much time learning C and php. Oh well.. at least I didnt learn asm :lol:
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

If you want to discuss about server design in detail we should prolly make a new thread =)
If that's what you wanna do feel free to move/split this message there (i suppose you have mod rights).
I've already worked on server & clientside of a bunch of multiplayer games intensely,
so i already have a good idea how i wanna do it.

thanks for that link, i'll look into it =)

Don't overlook the advantages of scripting on serverside : eveonline, a commercial with around 50k players average online is mostly written in python.
It does have its quirks, but so does c++, i'm just saying it's not something you should rule out too early, its definitely is worth a look, and it's the way i'll be going with this.

Anyway if you like my server later, i already have bindings for full multithreading (internally using boost threads) from another project. You cannot access lua-variables from another thread directly, but messages (and serialized data) can be exchanged using message queues (already implemented) and if that's not enough for some reason, handles to C/C++ objects for data can easily be passed around between threads.

I don't think multithreading is even needed for a simple server with a few dozen players,
since it's not necessary to simulate a full universe of npcs in per ship detail,
just in the systems where the actual players are, or even there only near players.
If you make good code and keep in mind that multithreading MIGHT someday be interesting, it's not too hard to add it to the server when it is really needed.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

If it was possible I would love to have something like NWNScript Dont know if you played Neverwinter Nights, but I loved the scripting system it had. It was very flexible and easy to use with the aurora toolset. I spent days playing with it designing worlds or just new scripts to release (though my releases were few and far between). As for a new server thread I think I started one, or at least one on possible features.

Either way I'll link to these last few posts so we can stop hijacking the ogre thread.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

I didn't find the thread you mentioned, please link it =)

Could you describe NWNScript a bit ? no idea what you mean.
Maybe something "graphical" like in world of warcraft editor where you get a dropdown menu of available commands, and then a dialog window to pick parameters from a list like unit-types, system locations etc ? I don't like that kind of "programming" much tho, a clear scripting api with a proper scripting language that can use variables and self-defined functions is the better choice i think.

What i'd do is make the server almost entirely scripted,
one interesting thing this would allow is to add & remove stations and systems on the fly with controlled parameters, adjust docking permission, market prices and avialability etc e.g. from mission scripts or multiplayer events like big battles.
Depending on how the protocol works, it's prolly even possible to create new item-types and add items to player cargo or market via script, or change the props of items.
With a bit of work on server scripts players could gather credits and buy a station, or hire npc mercenary fighters to accompany them for a while, or for pvp in outer systems claim sovereignity over an entire system and influence usage of jumpspots, station&planet docking, and npc patrols.
All of this might even work without changing the existing vegastrike client at all, e.g. chat commands to initiate a transaction if the conditions are met.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

scripting for NWN was like writing C or PHP. Its a fairly simple compiled code. Ill post a few examples, that should be the easiest way to see what i'm talking about. And its nothing like what you described for WoW. Not much time right now or I would go into more detail...
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

i meant warcraft 3 map editor rather than world of warcraft, sorry =)
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

oh... well tbh there *IS* a script editor for WoW, never used it but ive seen links to it.

Anyway, heres one script for persistent containers that used a hack to get NWN to run with a MySQL database

Code: Select all

// Name     : Persistent containers inventory disturbed
// Purpose  : Called when a player messes with the inventory of a persistent container
// Author   : Ingmar Stieger
// Modified : March 1, 2003

// This file is licensed under the terms of the
// GNU GENERAL PUBLIC LICENSE (GPL) Version 2

#include "aps_include"

// Note: The OnDisturbed event doesn't work reliable with stackable items
// so they are not supported in this implementation
int GetIsItemStackable(object oItem)
{
    int iType = GetBaseItemType(oItem);
    if (iType == BASE_ITEM_GEM || iType == BASE_ITEM_POTIONS ||
        iType == BASE_ITEM_HEALERSKIT || iType == BASE_ITEM_THIEVESTOOLS ||
        iType == BASE_ITEM_SCROLL || iType == BASE_ITEM_ARROW ||
        iType == BASE_ITEM_BOLT || iType == BASE_ITEM_BULLET ||
        iType == BASE_ITEM_DART || iType == BASE_ITEM_THROWINGAXE ||
        iType == BASE_ITEM_SHURIKEN || iType == BASE_ITEM_GOLD)
        return TRUE;
    else
        return FALSE;
}

// Add item to the container
void addItem(string sContainerTag, object oItem)
{
    string sSQL;
    string id = IntToString(GetIdentified(oItem));

    // lookup item
    sSQL = "SELECT * FROM containers WHERE container='" + sContainerTag +
           "' AND item='" + GetTag(oItem) + "' AND identified=" + id;
    SQLExecDirect(sSQL);

    if (SQLFetch() == SQL_SUCCESS)
    {
        // existent, increment item counter in existing row
        int iCount = StringToInt(SQLGetData(3)) + 1;
        sSQL = "UPDATE containers SET count=" + IntToString(iCount) +
               " WHERE container='" + sContainerTag + "' AND item='" +
               GetTag(oItem) + "' AND identified=" + id;
        SQLExecDirect(sSQL);
    }
    else
    {
        // not existent, add new row
        sSQL = "INSERT INTO containers (container,item,count,identified) VALUES " +
               "('" + sContainerTag + "','" + GetTag(oItem) + "',1," + id + ")";
        SQLExecDirect(sSQL);
    }
}

// Remove item from container
void removeItem(string sContainerTag, object oItem)
{
    string sSQL;
    string id = IntToString(GetIdentified(oItem));

    // lookup item
    sSQL = "SELECT * FROM containers WHERE container='" + sContainerTag +
           "' AND item='" + GetTag(oItem) + "' AND identified=" + id;
    SQLExecDirect(sSQL);

    if (SQLFetch() == SQL_SUCCESS)
    {
        // existant, decrement item counter in existing row
        int iCount = StringToInt(SQLGetData(3)) - 1;
        if (iCount == 0)
        {
            sSQL = "DELETE FROM containers WHERE container='" +
                   sContainerTag + "' AND item='" + GetTag(oItem) +
                   "' AND identified=" + id;
        }
        else
        {
            sSQL = "UPDATE containers SET count=" + IntToString(iCount) +
                   " WHERE container='" + sContainerTag + "' AND item='" +
                   GetTag(oItem) + "' AND identified=" + id;
        }
        SQLExecDirect(sSQL);
    }
}

void main()
{
    object oPC = GetLastDisturbed();
    if (!GetIsPC(oPC))
        return;

    object oItem = GetInventoryDisturbItem();
    if (!GetIsObjectValid(oItem))
        return;

    // reject stackable items
    if (GetIsItemStackable(oItem))
    {
        SendMessageToPC(oPC, "Stackable items are not supported.");
        ActionGiveItem(oItem, oPC);
        return;
    }

    switch(GetInventoryDisturbType())
    {
        case INVENTORY_DISTURB_TYPE_ADDED:
            addItem(GetTag(OBJECT_SELF), oItem);
        break;

        case INVENTORY_DISTURB_TYPE_REMOVED:
        case INVENTORY_DISTURB_TYPE_STOLEN:
            removeItem(GetTag(OBJECT_SELF), oItem);
        break;
    }
}
As you can see it is a lot like C and very powerful. I'll post a snippet from one of the AI scripts in the next post.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

Looks like a normal & fully functional scripting language to me,
no idea why you would want that rather than lua or python for server missions etc ?
You can do all it does in lua/python =)

I thought you meant something simplified to attract non-programmers / storywriters / game-designers etc tweak server stuff, missions etc, but does look like it requires the same level of programming skill as simply scripting in lua or python.

Anyway i don't think such extra work in the hope to attract more people to contribute to scripting is worth the effort at this point, better to get a basis up that programmers can work with for now.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

Heres one written by bioware, default heartbeat script. In the game and server a heartbeat happens every 6 seconds and can easily kill a game if there are too many (or is it 3 seconds...)

Code: Select all

//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT1
/*
  Default OnHeartbeat script for NPCs.

  This script causes NPCs to perform default animations
  while not otherwise engaged.

  This script duplicates the behavior of the default
  script and just cleans up the code and removes
  redundant conditional checks.

 */
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////

#include "nw_i0_generic"

void main()
{
    // * if not runnning normal or better Ai then exit for performance reasons
    if (GetAILevel() == AI_LEVEL_VERY_LOW) return;

    // Buff ourselves up right away if we should
    if(GetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY))
    {
        // This will return TRUE if an enemy was within 40.0 m
        // and we buffed ourselves up instantly to respond --
        // simulates a spellcaster with protections enabled
        // already.
        if(TalentAdvancedBuff(40.0))
        {
            // This is a one-shot deal
            SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY, FALSE);

            // This return means we skip sending the user-defined
            // heartbeat signal in this one case.
            return;
        }
    }


    if(GetHasEffect(EFFECT_TYPE_SLEEP))
    {
        // If we're asleep and this is the result of sleeping
        // at night, apply the floating 'z's visual effect
        // every so often

        if(GetSpawnInCondition(NW_FLAG_SLEEPING_AT_NIGHT))
        {
            effect eVis = EffectVisualEffect(VFX_IMP_SLEEP);
            if(d10() > 6)
            {
                ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
            }
        }
    }

    // If we have the 'constant' waypoints flag set, walk to the next
    // waypoint.
    else if ( GetWalkCondition(NW_WALK_FLAG_CONSTANT) )
    {
        WalkWayPoints();
    }

    // Check to see if we should be playing default animations
    // - make sure we don't have any current targets
    else if ( !GetIsObjectValid(GetAttemptedAttackTarget())
          && !GetIsObjectValid(GetAttemptedSpellTarget())
          // && !GetIsPostOrWalking())
          && !GetIsObjectValid(GetNearestSeenEnemy()))
    {
        if (GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) || GetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE) ||
            GetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE))
        {
            // This handles special attacking/fleeing behavior
            // for omnivores & herbivores.
            DetermineSpecialBehavior();
        }
        else if (!IsInConversation(OBJECT_SELF))
        {
            if (GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS)
                || GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS_AVIAN)
                || GetIsEncounterCreature())
            {
                PlayMobileAmbientAnimations();
            }
            else if (GetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS))
            {
                PlayImmobileAmbientAnimations();
            }
        }
    }

    // Send the user-defined event signal if specified
    if(GetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT))
    {
        SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_HEARTBEAT));
    }
}
I really wish VS had a scripting system like this. It would make things sooo much easier. Bioware does have links to a lot of their formats used in NWN listed... well nevermind, there are no more links to NWN :( not support links for formats, forum, etc... games too old now I guess. Oh well, but the script is still killer :)

Ok, since you posted before I finished this thread... Yes, its a full script language, but the important part of it has always been the script EDITOR that was a part of the toolset. It listed every single function you could use, all the constants, every defined variable, and several templates. Personally I have always found C much easier to learn and follow than say python or lua, at least cleanly written C.

Maybe its just that the VS python code is just too messy, cluttered, and undocumented for my taste... which makes it difficult to use and follow.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: ogre branch ? new attempt from scratch

Post by pheonixstorm »

as for the threads.. Mail features, Ryzom code, and TS3 SDK were the ones I was refering to
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

ok, so it's mainly clean api, docs and possibly tools (as in script editor with auto-completion and similar) that make all the difference =)

if you replace
{ -> then
} -> end
&& -> and
|| -> or
! -> ~
you almost have lua syntax already (only one-line ifs and first { of a function left), python has a few more quirks as whitespace,
but actually they're designed to encourage writing nicely formatted and readable code.
But in the end you can write hard to read code in any language without much effort.
ghoulsblade2
Bounty Hunter
Bounty Hunter
Posts: 136
Joined: Tue Jul 27, 2010 7:41 pm
Location: germany
Contact:

Re: ogre branch ? new attempt from scratch

Post by ghoulsblade2 »

aaand i have a small proxy mode in my luaVS for reverse-engineering the vegastrike network protocol,

i open normal vegastrike, and try to connect to a server, but instead of the real server ip i enter 127.0.0.1, my local computer, where my proxy is waiting for a connection and just redirects data to the real server (mets atm).
I already get hexdumps from what the client and server send to each other, so it's a bit like wireshark, but easier to script and tweak.
I cannot enter the game yet, probably since i used 0.5 release rather than compiling current svn, i also can't enter game without the proxy, but it's a start =)

thanks again for the link, the list of packets at
http://vegastrike.sourceforge.net/wiki/ ... ket_format
is really useful for starting out, even if the docs are incomplete =)
strook
ISO Party Member
ISO Party Member
Posts: 461
Joined: Fri Sep 03, 2010 12:10 pm

Re: ogre branch ? new attempt from scratch

Post by strook »

phew, what's this? =) great! i'm moderator :D

well as you should know, i'm working on an implementation of the flight, but shouldn't we leave vs opengl engine as it is?

as you should know, as far as i know now, we needed a full new implementation if we take ghouls version.

ok mine isn't very well, but maybe we could implement an level switch and use the ogre engine, then.

/me is thinking of when you enter the atmosphere, the ogre engine will be used after you see an athmosphere entering animation.

for rocky planets, a simple noiselib like implementation could be used without LOD.

mmmh ok, i'll go on coding on my branch and make the implementation for the rocky planets first in opengl.

i'll use the windows runnable version from log0.
plz visit my vegastrike project branch here

plz support VegaOgre by donating to it!

My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
Post Reply