Bithack / principia

Open source physics-based sandbox game.
https://principia-web.se
Other
260 stars 25 forks source link

Feature - External Object Management #143

Closed Prophet1980 closed 7 months ago

Prophet1980 commented 7 months ago

Basically,

I would like to see all of the games objects created from external files, outlined/described by a markup language. (ie, XML, etc,.)

And ran via external script files that, are of course just composed of a simple scripting language. (ie, Neverwinter script, etc,.)

Something like:

.XML

<Name>RC Activator</Name>
<Script>RC_Activator.psl</Script>
<Description>....</Description>
<... Other Info Here ... Whatever is needed./>

Etc, etc, etc,...

.PSL (Principia Scripting Language) Begin Script // Code Here... End Script

Exposing internal functions to an external scripting language, isn't too hard, in fact, simply implementing something like LUA, or .NET (see GTA 4/5 Script Extender) gives your user access to all the native code necessary to do nearly anything, minimizing the amount of internal functions you really need to expose, to allow object manipulation.

User modifications bring end users, because it adds infinite replayability, and possibilities, not to mention, keeps games relevant far beyond their years. (ie, Morrowind is still being played, and, modded today, OpenMW, MWSE, MCP, etc,.)

And if development ever stops, officially, and the source code is lost to time, whatever, you've given your end users a powerful toolset to continue to add content to the game, keeping it alive for years to come.

GTA .NET ScriptHook (Reference) https://hazardx.com/files/gta4_net_scripthook-83

griffi-gh commented 7 months ago

XML is a weird choice... also Principia... Scripting Language?

anyway i don't think this is the right way to handle that, as we already have a Lua scripting system. (and expanding on that is a much better idea; i had something like powder toy's system in mind, where objects are allocated and managed by lua scripts; but it's just an idea, I'm not even entirely sure it's possible to implement something like that without a major refactor)

Prophet1980 commented 7 months ago

Whatever works, the idea, is to liberate object creation from being hard coded, and, making it open to the end users, not only for changing existing objects, but, creating new as well.

As I said, I haven't seen the source code, so, you would have the better idea of implementation details, but, end of the day, keep in mind, with my PC intact, I could have a working demo up within the hour using my methods, and, reverse engineering.

griffi-gh commented 7 months ago

reverse engineering

(on an open source game?)


i get what you mean but it's still a monumental task

Prophet1980 commented 7 months ago

OpenMW is open source, and, it has modding, not only the original Morrowind stuff, but it also includes a new LUA based script engine, and, will probably eventually integrate MWSE functionality.

Why? For the end users, of course.

And yes, I'm telling you that I could hack the functionality into Principia within the hour, so, imagine what you can do with the source code.

griffi-gh commented 7 months ago

OpenMW is open source, and, it has modding

... because Morrowind was initially built as a game engine? (with everything being scriptable)

Prophet1980 commented 7 months ago

GTA 4/5 weren't initially modifiable, and, it exists too.

See: ScriptHook.Net

Prophet1980 commented 7 months ago

@griffi-gh XML is a weird choice...

How so?

Tons of AAA games, and, apps use .XML for this purpose, use Json, or whatever you please, it's just a matter of preference...

XML Extensible Markup Language is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. ...human-readable and machine-readable. ...attribute is a markup construct consisting of a name–value pair...

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays.

The point, is that they store data in human/machine readable format, thus, no conversions are necessary, they allow for the population of in engine objects with various bits of data necessary for creation/use, ie, name, description, position, rotation, whatever you need...

@griffi-gh also Principia... Scripting Language?

NWScript is the scripting language used to control the behavior of objects, items, NPCs and other aspects of modules in Neverwinter Nights. (ie, NWS, et al, .bsa (Bethesda Software Archive), and about a million other file formats.)

That's a pretty standard naming convention among applications and games.

@griffi-gh reverse engineering (on an open source game?)

Yeah, according to you, I can certainly manipulate the engine easier from the outside, than you can from the inside...

Bedsides, I've already pointed you to various examples of such things, and, regardless of initial modabililty of the game, they were never intended to do the things made possible via these projects. (Why would they expose identical functionality, they wouldn't, all of them implemented new features, that's why they exist...)

I offered a suggestion, I gave implementation details, primarily to make the request clear, but, the example is based on various real world projects, that are very successful, and, were built for the same purpose. (To extend the original functionality of the engine, and, really, it should be easier for you to implement this, as you actually have source code.)

rollerozxa commented 7 months ago

Once again, the game is open source, it is not a proprietary game and the source code is not going to magically disappear. You do not need to rewrite the entire game in XML(??) just in case the source code disappears (if it disappears, your computer is probably ten feet underwater too, so you would have other issues than lack of hackability for Principia)

Prophet1980 commented 7 months ago

Once again, the game is open source, it is not a proprietary game and the source code is not going to magically disappear. You do not need to rewrite the entire game in XML(??) just in case the source code disappears (if it disappears, your computer is probably ten feet underwater too, so you would have other issues than lack of hackability for Principia)

Once again, you don't know what you're talking about... That's not even close, to what has been suggested, at all.

And, thank you, for proving my point about, WHY, I explained in such excruciating detail, because, even when I do, some people don't listen.

The only thing in the XML is item descriptions, etc, the point of doing this, is that anyone, can quickly, add new items to the game.

Downloading the source, figuring out how it works, figuring out what language it's written in, setting up a development environment, rewriting the source code, compiling, hoping you don't end up with a bunch of linking errors, etc, IS NOT USER FRIENDLY. (Every time, any user wants to add something new, they're supposed to modify the source, that's insane....)

That's like telling me it's easier to paint my kitchen blue, by digging out the blueprints, modifying that, and, then hiring people to rebuild the entire house with a blue kitchen.... (That's ridiculous...)

When, were my kitchen ran by an .xml, I could open up the file, change the "color" property, and, boom, done, easy...

--

Oh, and source code gets lost, all the time...

https://www.reddit.com/r/gaming/comments/aucqan/what_games_do_you_know_that_have_had_their_source/