The internet is a lawless place with knowledge and sarcastic wit the pistols of this wild frontier.
Don't go out without being sufficiently armed.

~Blade

Other places

Ares (Current version: 0.B)

Ares's primary facilities have been moved elsewhere:

  • If you wish to report a bug in Ares, please proceed to its bugtracker.
  • If you'd like to request a feature, register a blueprint.
  • If you have questions or can provide answers regarding Ares's usage, visit the Q&A section.
  • Before you post a new question, you should check the FAQ, though.

Behavior

  • Mind the forum rules.
  • Due to its documentedly horrible quality, we do not offer NPatch support.


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Internal logics as pseudocode - worth posting or not?
Author Message
Commander-in-Chief DCoder Offline
Not Ares Anymore
*****
Admins

Posts: 1 756
Joined: 22 Nov 2004
Reputation: 18
Post: #1
Internal logics as pseudocode - worth posting or not?
I was wondering, would posting chunks of internal logic flow like this (WIP) be worth having at ModEnc? It does provide the insight, but will probably need someone to simplify it into layman's terms.

08.04.2008 08:09:22
Visit this user's website Find all posts by this user Quote this message in a reply
Corporal pd Offline
The Man with the Shock Rifle
****
STX Hostees

Posts: 731
Joined: 24 Jan 2005
Reputation: 10
Post: #2
RE: Internal logics as pseudocode -worth posting or not?
Since DLLs will be coded in C++ and the code you type using YR++ will look similar (not equal to that of course!), it might indeed be helpful as examples.

Besides, it makes the code accessible by people who can't read ASM. Wink

[Image: jsfml.png]
08.04.2008 08:28:18
Visit this user's website Find all posts by this user Quote this message in a reply
Sergeant gordon-creAtive Offline
creAtive FreemAn
****
Moderators

Posts: 395
Joined: 15 Apr 2007
Reputation: 5
Post: #3
RE: Internal logics as pseudocode - worth posting or not?
For normal modding this is quite useless (I think) although i find it VERY interesting. But I think with the release of YR++ this will be important...?

[Image: osen2o7mpmm4jg1fs0.jpg]
09.04.2008 18:15:00
Visit this user's website Find all posts by this user Quote this message in a reply
Corporal Marshall Offline
Ultimos Homo Statans
*****
STX Hostees

Posts: 1 033
Joined: 23 Jan 2005
Reputation: 12
Post: #4
RE: Internal logics as pseudocode - worth posting or not?
I concur with gordon's sentiments. For RP2 I suspect pd will release the source of his DLLs which should be sufficient for us to create further ones, however knowing how the game's native logics tackle things would be useful and interesting.

EDIT:
I've been looking at that pseudocode for some time and have finally figured out what was confusing me:
Code:
if ( weap1->Warhead->IsLocomotor
           && target
           && target->WhatAmI() == IS_BUILDING )
        return USE_SECONDARY;
...is completely unneccessary as long as the Verses are set up correctly.
I've switched MagneticBeam and MagneShake in my mod so that the Magnetron can attack walls, and it works fine.
Lol at WW.

Ever wondered what the hell is going on?
Believe me friend you're not the only one.
--Lysdexia

Check out Launch Base for RA2/YR - http://marshall.strategy-x.com
Also home to the Purple Alert mod, 1.002 UMP, and the YR Playlist Manager.
(This post was last modified: 24.04.2008 14:33:36 by Marshall.)
23.04.2008 21:18:47
Visit this user's website Find all posts by this user Quote this message in a reply
Commander-in-Chief DCoder Offline
Not Ares Anymore
*****
Admins

Posts: 1 756
Joined: 22 Nov 2004
Reputation: 18
Post: #5
RE: Internal logics as pseudocode - worth posting or not?
My thoughts when asking were that a sample like this explains the internals in detail (which is not always the same as what observing a game from a modder's perspective suggests), and is easier than typing out all the cases in plain English. (Case in point: the sample I gave already shows how many special case weapons assume they will only be in a particular primary/secondary weapon slot.)

Edit: Marshall, I believe that snippet was a block to avoid Locomotor weaponry attacking buildings when the locomotor weapon code was still in development, since internally buildings derive from a different class than the mobile objects and thus special code is needed to detect that (well, two lines of special code is not much, but ... we all know who wrote this game.). I think I should describe the main concepts in the game before posting more snippets.

24.04.2008 15:13:15
Visit this user's website Find all posts by this user Quote this message in a reply
Commander-in-Chief DCoder Offline
Not Ares Anymore
*****
Admins

Posts: 1 756
Joined: 22 Nov 2004
Reputation: 18
Post: #6
RE: Internal logics as pseudocode - worth posting or not?
I'm updating the repository bit by bit, and now I have a few questions: thus far, I've been posting simplified pesudocode that resembles C++, but isn't quite C++. I've been doing that to avoid the unnecessary complexity of C++ and focus on the actual algorithms. However, I have no way of assessing the readers' skill level in C++. Some of you might be familiar with it from high school/university, some might use it everyday, and some might not have seen it at all. So, I don't know if I should extend the quick reference to cover C++ basics like for/while/new ? Or should I stop dumbing it down and post it like it should be, full of gory scopes and dangling pointers? I'm asking because not understanding the way object functions work can lead to confusion and misinterpretations.

(Yes, I know my colorifications don't help that much. I'm not an artist, remember, that is a close approximation of what my IDE looks like.)

07.05.2008 20:48:15
Visit this user's website Find all posts by this user Quote this message in a reply
Corporal Marshall Offline
Ultimos Homo Statans
*****
STX Hostees

Posts: 1 033
Joined: 23 Jan 2005
Reputation: 12
Post: #7
RE: Internal logics as pseudocode - worth posting or not?
I understand [most of] what you've posted thus far.
Seeing as how the RP2 dlls will be C++, it makes sense for any pseudocode gleamed from the exe to be the same.

Ever wondered what the hell is going on?
Believe me friend you're not the only one.
--Lysdexia

Check out Launch Base for RA2/YR - http://marshall.strategy-x.com
Also home to the Purple Alert mod, 1.002 UMP, and the YR Playlist Manager.
07.05.2008 20:51:46
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)