SRL Archive - Discussions and Debates

Reverse engineering RS's 3D engine


ReadySteadyGo

2010-07-26 09:29:37

Got the idea from that Robots in Disguise thing.

It would allow for the main screen to be read from the minimap. This would allow for complete free range in the view angle/height and quality setting making it more human-like.

It would be done with quite simple trigonometry. Look up Ray Casting. Basically we are rendering (well, recording) the points of the mini map in 3d according to the height of the camera/angle of the map.

Gu3st...

2010-07-26 09:34:34

You mean like MMtoMS() type of thing?

ReadySteadyGo

2010-07-26 09:44:29

I'm not sure how that is done, I'll have a look.

This is a diagram of what I mean.


This is how the RS mainscreen is rendered (I think)
The Green Line being the ViewPlane (RS MainScreen)
Red Dot being the Veiwer (You)
Orange lines being the field of view.
This information can be translated into 3d to find the x co-ord of the object, then the height of the object you are looking for can be a prerecorded constant and can be modified with the perspective.


This wouldn't be like:
FindObjThroughMM(var x, y: Integer; Kind: string; Colors, Tol: TIntegerArray; UpText: TStringArray; Width, Height: Integer): Boolean;

It wouldn't need to check the colour on the mainscreen at all
It would simply return a tbox where that object is at any orientation of the camera angle.

The Claw

2010-07-26 09:57:55

Would be a LOT of work…you'd need to use reflection to figure out what the monsters, items, and players on the minimap are, what the players are wearing etc, then figure out what each seperate object is, for example trees on the minimap can be one of many types of tree, and many variations within the type. Same as everything else represented on the minimap, you'd also need to figure out if dungeons were up or down, what type of walls were represented, what path, etc…and then you've got tolerance, timing delays, random offsets, and the offset not matching the camera angle to deal with……but it would be cool lol

ReadySteadyGo

2010-07-26 10:01:10

Ah I didn't consider all the variations claw, thanks :)

ReadySteadyGo

2010-07-26 11:15:19

Once I get my ray casting engine for my 3D First Person Shooter finished I'll give this a shot…