Offering Basic Script Help With RMX-OS

Started by Wizered67, October 14, 2012, 05:23:47 pm

Previous topic - Next topic

Wizered67

After using RMX-OS for a while, I feel like I have a fairly good understanding of how things work, so I felt that it was time to give back to the community. If you're using RMX-OS and need help adding a new feature or editing an existing one, I'd be happy to take a look at it when I get the time.

First of all, I will not help you set up the server. I had enough trouble doing that myself xD Also, I can't make any promises that I can actually do what you need, but I can take a shot at it. My free time is fairly limited, so don't expect me to be working 24/7 on it or anything. Finally, even with my experience with
RMX-OS, I'm not at the level where I can make an ABS work with it or anything like that, so try to keep it fairly simple, though I can always take a shot at some more advanced stuff.

Here's some samples of the stuff I made a while ago. Some of it may be outdated, but I made these a while ago.

http://forum.chaos-project.com/index.php?topic=8336.0
http://forum.chaos-project.com/index.php?topic=8960.0
http://forum.chaos-project.com/index.php?topic=7962.0
http://forum.chaos-project.com/index.php?topic=8533.0


For a sample of the more complex stuff I've pulled off, take a look at my project thread, where I've managed to get multiplayer building, global doors, global sound effects, etc.

If you have a script request, please give me details on what it is, how it works, any commands that need to be added, etc.

Just a final note, this is completely free, so don't worry about that, I just can't make any promises that I can do what you want. If you have any questions, let me know.


Blizzard

Quote from: Wizered67 on October 14, 2012, 05:23:47 pm
First of all, I will not help you set up the server.


Lol! When you figure it out, it's not that difficult. v1.2x even has a generic guide for network setup. Of course there will be some things that the users usually have to research on their own. e.g. reading the manual on how to turn on port forward on their router. I seriously don't understand how people can expect that one guide has a list of all possible routers and how they are set up. To expect this is as stupid as to actually make a list like that when there are specialized manuals for the given routers. And this is just the tip of the iceberg. It's funny how people expect that everything will be delivered to them without them having to lift a single finger. Much like a "press button to create game" feature. /rant
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

...
I suddenly want to write a program that will randomly generate a game with random items, goals, names, dialog ect. that it fills into a structure.  it would be funny to see what kind of ridiculous plots it would make.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

KK20

If and when I eventually get around to it, I'd like to make my Advance Wars online compatible while still having offline properties. Not even sure where I'd begin with that...

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Wizered67

To be honest, I really know nothing about the type of gameplay in Advance Wars. However, from this video I saw (I think its yours, http://www.youtube.com/watch?v=HEFG6Zv_ges&feature=channel&list=UL) it seems to be a turn based strategy game. (correct me if I'm wrong).

Something like that would be pretty complicated to get to work with RMX-OS in my opinion, but here's how I would start going about that. First of all, you will need some way of setting up matches between 2 players. I'd recommend having each map represent a different match. For that to work, you would theoretically have to have a number of different maps for matches equal to half the number of total players that can be online at once. (Since each match would take 2 players). Now to keep track of which maps are being used and which ones are empty, you could have a server extension which keeps track of an array of available maps. Whenever a match starts on one of the maps, have the client send a message to the server to remove that map from the list of available maps. Similarly, you could have the server keep track of an array with the ids of players looking to start a match. When another player tries to join a match, the server could randomly choose a player from the array of player's already looking for a match and pair them together. The server could then remove the player from the array, send a message to both clients transporting them to the next vacant map, and setup the match itself. Alternately, you could create a nice looking scene where players can actually choose their opponents instead of it being random.

Now on for the match itself. First of all, the match will need to have 1 active player and one inactive player (assuming its turn based). When the match is started, the server can select one of them to be the active and send a message to the client changing some sort of variable to true. The other player would have that variable set to false. When it is a players turn and they make a move, have the client send a message to the server with the move they made. The server could then send that message back to both clients so that the move is actually done. When a player ends their turn, the client could send a message to the server having the "active" variable switch to true on the other player, while switching it to false on the currently active one.

As I was writing this, I thought about how the server would know who the opponent was so that these variable changes get sent to the right person. Theoretically, anything being sent to both players could simply be sent as a "map message", sent to all clients on the map. However, otherwise it would have to be sent to 1 specific person. I haven't tested it, but to get the other player on the map, you could use this in the server extension when receiving a message from the client.
client.sender.get_map_clients

That would be in the client update section of the extension.

Oh, and if you want to make it online compatible as well as offline... I honestly don't know what I'd do about that. I suppose you could have it only load the RMX-OS stuff if its on multiplayer mode. An alternate (possibly easier) way would be to make an entirely separate game for the multiplayer mode, and then launch it through the main game with something similar to Blizzard's multi-game launcher (http://forum.chaos-project.com/index.php?topic=119.0)

Anyway, that's just a quick idea of how I'd do it with as little planning as possible. If you want some clarifications, actual code examples, etc just let me know. If you have a better way, also let me know. I'm sure Blizzard or someone is looking at what I wrote and thinking how much easier/better it could be.

KK20

Well I have to get the actual script done first before I even begin considering online play. It's just one of those things hanging on the bottom of my checklist for now.

You are correct that it is a TBS. The game can have up to 4 players on one map at a time (debating on whether or not to add more). It was also a plan of mine to release the engine when I finish most of it for anyone to add or edit their own designs.

I haven't really spent the time to study RMX-OS nor do I have any experience with online games at all (priorities blah blah). But if and when I get to it, I'll be sure to come back here for future help. Thanks for that essay!  ;)

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!