Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The DLL Project
#46
How can you fix bugs if you don't know what causes them?
That's the big problem, I have no idea what causes the recons.

I do have a theory on it though.
We have contructors, destructors, load and save (from/to a savegame) code, but I never found anything related to replication (communication between client and server / client and client), ie how packets are sent and what exactly is sent.
Also, custom properties did not undergo the CRC calculations.

Using the DLLs this problem might be "magically" fixed because I do not edit the original classes anymore.
Formerly, I increased the class data size and put my custom data at the end of the class data.
With YR++, this will not be possible any longer, which means the original classes stay as they are. Alas, the recons should be solved.
How you'd be able to manage the replication of data, I don't know yet.


Another thing, this project is currently inactive.
Before you speculate it's gonna die, no, it is not.
Actually, I've taken some time and looked over the "wishtracker" as you may have noticed. Smile

My motherboard is broken and my financial situation would allow getting a new one, but it would certainly not be the best thing to spend my money on.
At the moment I'm fine with my laptop, also I got me tickets for Rock am Ring and bought some shoes today... things that are certainly more important. Tongue
I will probably get me some hardware to access my IDE drive via USB instead of getting a new mainboard (any suggestions here?).
When that's gonna be, sorry, I can't tell yet, hehe... (typical me, right?)
[Image: jsfml.png]
Reply
#47
What CPU do you need a motherboard for? I have a few old socket A motherboards if you are on an old athlon/athlon XP you can have.
Reply
#48
I'd need a S939, but I might get a new S775 motherboard for an E6750 (or Q6750 which isn't much more expensive for some reason).
[Image: jsfml.png]
Reply
#49
the Q6750 isn't much more than the E6750?

now, i couldn't actually find me a Q6750, but the same speed, the Q9450 (2.66GHz at 1.33GHz bus) was about +75% the price, so, either the Q6750 is slow, your E6750 us overpriced, or you've got a great deal on a quadcore.

for a price comparison, the Q9450 here is around £212, which costs more than my new graphics card Oops

anyway, unless you're... ok, i won't say that. just go for the new AMD64 mobo.
Reply
#50
Have you got back to work on the path pd?
Reply
#51
While everything is set up for me to code again, I'm kinda... not doing it. Bang head against wall

Flame me to death, but at the moment I don't work on it, all the class definitions have been driving me nuts.
I've been having a two-month-long break already and I can't tell yet when I'll continue. I'm still around in the bugtracker and I'm happy to discuss stuff, but my former goal to do it early 2008 is more than in jeopardy.

Lame!
[Image: jsfml.png]
Reply
#52
The way I see it, you work at a project like this non-stop it's only natural you're gonna run out of steam. Take a break and hopefully you'll get the motivation to work at it - in a less intensive approach, of course!
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.
Reply
#53
I'm writing this in German 'cause I'm not able to translate it completly :S It basically says: Calm down & chill out Wink


Hey pd, ich kenne das Gefühl auch. Du hast etwas angefangen, wo du denkst du musst es zuende bringen, zum einen weil du schon soviel Zeit investiert hast, zum anderen weil so ziemliche die halbe Community auf dich wartet. Aber:
  • Es ist ein Community-Projekt. Du bekommst kein Geld dafür, du machst es, weil es Spaß macht. Also setzt dich nicht selber unter Druck: Keine Zeitpläne, keine Deadlines. Das Resultat zählt und nicht die Zeit.
  • Dies ist ein Befehl: Die nächsten 2 Wochen verbiete ich dir C&C-Seiten zu besuchen, desweitern wirst du heute abend sowie die verbleibenden zwei Wochenenden mit lustigen Kumpanen in die Disko gehen und zuviel trinken. Ein Europapark-Besuch wäre auch eine nette Idee.
  • Wenn du wieder mit dem Projekt anfängst, lade dir nicht zuviel auf. Ignoriere den Bugtracker, realisiere gerade das was dir in den Sinn kommt - aber nicht unter Druck setzen. So wie Bepo in Momo: Nicht versuchen die Straße so schnell wie möglich fegen und dauernd überprüfen wie weit man gekommen ist, sondern einen Schritt nach dem anderen, dazu singen und an alles, nur nicht die Arbeit denken.
Ich hoffe dass hilft dir Digger. Mach dir keinen Stress und chill mal. -> "When it's done"


Hey pd, I know that feeling. You began working on something and think you have to finish it, because firstly, you have invested a lot of time in it and secondly, about half of the community is waiting for you to finish it, but:
  • It's a community project. You don't get any money for it, you do it because you feel like doing it. So don't put any pressure on yourself: no ETAs, no deadlines. It's the result that counts, not the time.
  • This is an order: For the next 2 weeks, I forbid you to visit any of the C&C sites, furthermore, tonight as well as the next 2 weeks, you will go to the disco with funny friends and drink too much. A good idea would also be visiting the Europapark.
  • If you start working on your project again, don't plan on doing too much. Ignore the bugtracker, do what comes into your mind - but don't put any pressure on yourself. Like Bepo in Momo (note from pd: wth??): Don't try and sweep the road as fast as possible while constantly checking how far you have come, but do one step after another, sing while doing it and everything, just don't think about the work.

I hope this will help you buddy (another note from pd: Dear Lord, Hamburgers Tongue *expects -1 from Ren*). Don't stress and chill out. -> "When it's done"

translated =) -pd
[Image: osen2o7mpmm4jg1fs0.jpg]
Reply
#54
Marshall Wrote:The way I see it, you work at a project like this non-stop it's only natural you're gonna run out of steam. Take a break and hopefully you'll get the motivation to work at it - in a less intensive approach, of course!
Hehe, it's true. I just got tired of it - yet again. At the moment I'm a lot into UT2004.


Nice post, gordon. Wink
gordon-creAtive Wrote:It's a community project. You don't get any money for it, you do it because you feel like doing it. So don't put any pressure on yourself: no ETAs, no deadlines. It's the result that counts, not the time.
Haha, I think I received 3 money offerings already. Big Grin
Of course I agree on all this, and it's good that you feel this way. The problem I see is that YR modding is in its last stage of life right now, I have no idea when YR is gonna get me again, it might be tomorrow, it might be next month, arf.
It would be a shame if people will never be able to try out this DLL thingy simply because they have quit YR modding.
On the other hand, it's no real disadvantage to have a small community. Wink It saves us n00bs for one...

gordon-creAtive Wrote:This is an order: For the next 2 weeks, I forbid you to visit any of the C&C sites, furthermore, tonight as well as the next 2 weeks, you will go to the disco with funny friends and drink too much. A good idea would also be visiting the Europapark.
I don't need your order for that. Tongue
Take this Friday, it was one of those days when you cannot remember how the hell you got in your bed...

gordon-creAtive Wrote:If you start working on your project again, don't plan on doing too much. Ignore the bugtracker, do what comes into your mind - but don't put any pressure on yourself. Like Bepo in Momo: Don't try and sweep the road as fast as possible while constantly checking how far you have come, but do one step after another, sing while doing it and everything, just don't think about the work.

I don't really consider this "work". As you said in point 1, I don't get any money for this.
This is just for fun, just I chained myself a little now.
To be able to even start working on "RockPatch 2", I need to make all the game classes accessible via C++. Only DCoder might be able to actually confirm it, but it's quite a bunch of stuff to do. >.<
My problem isn't time pressure or anything, but the sheer boringness of this process... it's a huge amount of C&P, just you have to check really often if everything is like in the game's exe. I guess I have 60% of what I need for a first RP2 done.

gordon-creAtive Wrote:Don't stress and chill out.
Yeah, that's where Marshall's thoughts come in. I do alot in short time, but I can't keep that on for a really long time. I'm getting tired, not physically of course (although I had my days after which my fingers kinda hurt xD), but it's all the same.

At the moment I'm trying to kick myself in the arse to turn on good music and just pull this all in 2 and 3 days.
Working on RP2 will be very entertaining, but this base stuff is plain boring. >.<
[Image: jsfml.png]
Reply
#55
Quote:Like Bepo in Momo
Oh lawd, someone else who's actually read the book.
Quote:To be able to even start working on "RockPatch 2", I need to make all the game classes accessible via C++. Only DCoder might be able to actually confirm it, but it's quite a bunch of stuff to do. >.<
Confirmed. It's a humongous amount of stuff to do. And it's not made easier by Westwood's crazy code. (Coming soon to a forum near you, "Westwood's code considered harmful, the series". All the horrors you can think of and more.)

Seriously, my opinion is quite the same as Marshall's and gordon's, take it easy, relax, have fun, there's no rush. Of course I am not a modder, I would be more likely to write some DLLs for it than actually mod with it, but I still think any decent modder has enough common sense not to assume (s?)he's entitled to whine at you for delay.

Worth playing: 1 | 2 | 3
Reply
#56
A little fear is just that I take so long that no modder is left when it's done. Big Grin

Anyway, despite my posts, I solved my callback idea problems and finished the BuildingTypeClass. Thanks DCoder again for converting the huge property lists. Smile
[Image: jsfml.png]
Reply
#57
Alright, the first feature of Ares (aka RockPatch2) is done...
but it's no big deal. Tongue

I'm talking of the -NOLOGO command line argument, I just used it to try out command line argument parsing via DLLs, and it works fine. Wink
Heck, there's progress!
I finished the AircraftType/BuildingType/InfantryType and UnitType handlers and also introduces mouse event handling.

This is where it gets really funny.
DLLs can react on any mouse event on the battlefield, ie mouse movement, clicking, etc, in realtime.
A funny little test of this was spawning an AMCV everywhere you clicked:
http://rp2.strategy-x.com/mouse_input_handling.jpg
(source code: http://rp2.strategy-x.com/mouse_input_handling.txt )

What can this be used for other than for fun?
The first idea that popped into my head on this was unit context menus. Wink
With primitive and SHP drawing support and now mouse event handling, this belongs to the "possible" section...
[Image: jsfml.png]
Reply
#58
Lol, loving it. I'm definitely gonna be using RP2 for Purple Alert 9.

Out of interest, how much of the RP2 'core' is done and how much work are you anticipating for DLLs? (god that sounds like a 'when wil it be done' question - I'm really just interested in the development process, I gather the core part is the boring bit and the DLLs are the fun part?)

Is there anything that members of the community are likely to be able to help with at this stage? I know nothing about C++ but I understood most of what that code example is doing.

Also, I gather that the intention is that all bug fixes (e.g. neutral MCVs IE) should be fixable through DLLs, or will certain changes that you have in mind require you to directly alter the executable?

Please do not take time out of relaxing or developing in order to answer my ramblings.

EDIT:
Wait a minute, where do we determine HouseClass::Player() ? I'm guessing that refers to the local client in which case that would desync in multiplayer?
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.
Reply
#59
wait, you're calling it Ares? thats a peer to peer downloader... my brother uses it.
Reply
#60
I'm not developing all day.Wink
So I'm happy to answer it all, hehe.

Marshall Wrote:Out of interest, how much of the RP2 'core' is done and how much work are you anticipating for DLLs?
The RP2 "core" (being YR++) is like the exe research, it cannot be "done". It would be done if I had the game's entire source code. Therefore, I won't be able to give you something like a progress bar for it.
For the first release, I plan this base to cover the most important classes, that is the whole AbstractType tree (all the INI defined stuff basically) and a good part of the AbstractTree (every ingame class) including the whole ObjectClass tree (everything visible).
You must be able to spawn and control units, animations, particles, warheads, etc, in order to make this any useful.
These things are progressing well. In this particular case I might say 66%.

Extra stuff like primitives drawing, SHP drawing and input handling are things I cannot give any progress about, I have nothing specifically planned for it.
You can handle mouse events now and add custom CommandClasses (functions you can bind to the keyboard), draw rectangles and SHPs and make text appear either in the MessageList (top left, like "Warning: Lightning storm approaching" or w/e) or just somewhere on the screen (tooltips, debug info).

The big big thing is callback functions.
Callbacks allow me to actually modify the game's code and add to it.
It is through callbacks that the DLL gets used at all. And I will need to define a lot of them to assure full control.
The largest bunch of callback code done is for SuperWeaponTypes, and in all you can already code your custom SW.

Marshall Wrote:Is there anything that members of the community are likely to be able to help with at this stage? I know nothing about C++ but I understood most of what that code example is doing.
Unfortunately no.
The compiler must compile all my class definitions and function callings and stack frames so that they look and work *exactly* like in the game's executable, thus this is still a kind of hacking process.
That code part is an example of things you will be able to do once we have a good YR++ base to work with.

Defining the callback functions is basically exactly the same thing I did before in order to add or modify functionality, ie this is hacking.

Marshall Wrote:Also, I gather that the intention is that all bug fixes (e.g. neutral MCVs IE) should be fixable through DLLs, or will certain changes that you have in mind require you to directly alter the executable?
The intention of the DLLs are that I don't have to tussle with all the ASM and hex and stack bugs and so on.

Almost everything that exe modifying could do can be done using these DLLs:
- Removing code, by simply jumping somewhere else.
- Modyfing code, by recoding the bit you want modified.
- Adding code.
- Modify rw data, by simply overwriting it.

What we can not do using DLLs is modify read-only data, but right now I cannot think of a point in RP development where that was necessary, except for dialogs.
The modified dialogs can be included in the DLL though, with a different ID than the original, and then you can just change that ID used in code.

In all, the only exe modification is my addition of the DLL loader code, and that does only get used if you run the game via Debugger.exe. If you run normally via gamemd.exe, no modifications are applied, which is a huge benefit IMO.

Marshall Wrote:Wait a minute, where do we determine HouseClass:: Player() ? I'm guessing that refers to the local client in which case that would desync in multiplayer?
You don't determine it, it already is.
HouseClass:: Player() returns a pointer to the current player, sitting at the very computer.
IE online, for you, it will return a pointer to your HouseClass instance, for your friend X, it will return a pointer to his HouseClass instance. For this code that means, whoever clicks will own the MCVs spawned.

HouseClass:: Player() needs to be a function because it reads from the game's RAM directly. And since it's possible that the pointer changes while the exe runs (eg you go back to the menus and start another game), it needs to always the return the pointer as of the time you call it.

Bobingabout Wrote:wait, you're calling it Ares? thats a peer to peer downloader... my brother uses it.
Yeah, I've heard of it.
If people want to download that filesharing client and all they get is some DLL file, they'll probably notice that something is wrong.

This is no official or commercial or that large project that it should create any confusion.
Since everyone is calling this RP2 anyway, who knows whether that name change will succeed at all...

EDIT:
Code:
virtual void vt_entry_50C(
    DWORD dwUnk,DWORD dwUnk2,DWORD dwUnk3,DWORD dwUnk4,
    DWORD dwUnk5,DWORD dwUnk6,DWORD dwUnk7,DWORD dwUnk8,
    DWORD dwUnk9,DWORD dwUnk10,DWORD dwUnk11,DWORD dwUnk12,
    DWORD dwUnk13,DWORD dwUnk14,DWORD dwUnk15,DWORD dwUnk16)
{
    PUSH_VAR32(dwUnk16);PUSH_VAR32(dwUnk15);
    PUSH_VAR32(dwUnk14);PUSH_VAR32(dwUnk13);
    PUSH_VAR32(dwUnk12);PUSH_VAR32(dwUnk11);
    PUSH_VAR32(dwUnk10);PUSH_VAR32(dwUnk9);
    PUSH_VAR32(dwUnk8);PUSH_VAR32(dwUnk7);
    PUSH_VAR32(dwUnk6);PUSH_VAR32(dwUnk5);
    PUSH_VAR32(dwUnk4);PUSH_VAR32(dwUnk3);
    PUSH_VAR32(dwUnk2);PUSH_VAR32(dwUnk);
    THISCALL(0x41C090);
}
THIS IS WHY NOBODY CAN HELP ME! Bang head against wall
[Image: jsfml.png]
Reply




Users browsing this thread: 1 Guest(s)