• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Moving towards OTC

What should we do


  • Total voters
    57
  • Poll closed .
Status
Not open for further replies.
I used notepad++ with "find and replace" and Regex.
But did alot of it manually aswell.
The best way to do it is to read a file(just look at the things in my first PR on github) and see what you wanna change.
Ex. if( => if (
Then you do the same for all elseif, for, while etc etc

The spaces to tabs probbly explains itself :p

But by now i've read through most files, for 2 reaons, find more issues aswell as learning about the functions.

Great work with the client.

The person asking for the 4sqm distance button, is that in the past. (Long time ago) there was a button that would automatically try to stay 4 sqm away from your target.
So for example if you used a bow, you could just click this button and go afk while fighting lol. It wasn't used very often because it would easily get you trapped in corners, or not stay diagonal, and it didn't move when your attackspeed was on cooldown, so monsters would easily catch up to you.

Honestly, it would be something I would add to Candybot rather than the normal client. (Keep distance, and Keep Diagonal towards monsters in the targeting tab would work)

I have done SO many edits to the OTClient, but most were to add features that normal tibia doesn't support.

The main thing I am working on now, is getting the client to have great FPS even on very slow computers. If I find a way to increase the optimization of the client I will definitely share it with everyone.
 
Great work with the client.

The person asking for the 4sqm distance button, is that in the past. (Long time ago) there was a button that would automatically try to stay 4 sqm away from your target.
So for example if you used a bow, you could just click this button and go afk while fighting lol. It wasn't used very often because it would easily get you trapped in corners, or not stay diagonal, and it didn't move when your attackspeed was on cooldown, so monsters would easily catch up to you.

Honestly, it would be something I would add to Candybot rather than the normal client. (Keep distance, and Keep Diagonal towards monsters in the targeting tab would work)

I have done SO many edits to the OTClient, but most were to add features that normal tibia doesn't support.

The main thing I am working on now, is getting the client to have great FPS even on very slow computers. If I find a way to increase the optimization of the client I will definitely share it with everyone.

Oh okay now I got it :p
It's a great thing that we can add to candybot, was thinking about doing it when I started with the target interface, but since I rarely play rps I felt it would be a better thing to add later on.
And I wanna finish off a couple of the nodes before I focus on things like that, so far I only added logic to one, "node".

Also have to find a way to serialize functions into the waypoint script, once that is done we can add logic to the "action" node.

Great hearing that :)
 
Great work with the client.

The person asking for the 4sqm distance button, is that in the past. (Long time ago) there was a button that would automatically try to stay 4 sqm away from your target.
So for example if you used a bow, you could just click this button and go afk while fighting lol. It wasn't used very often because it would easily get you trapped in corners, or not stay diagonal, and it didn't move when your attackspeed was on cooldown, so monsters would easily catch up to you.

Honestly, it would be something I would add to Candybot rather than the normal client. (Keep distance, and Keep Diagonal towards monsters in the targeting tab would work)

I have done SO many edits to the OTClient, but most were to add features that normal tibia doesn't support.

The main thing I am working on now, is getting the client to have great FPS even on very slow computers. If I find a way to increase the optimization of the client I will definitely share it with everyone.
I've done SO many things on my OT, too. Someone just requested a petty function like this.

Did anybody figure out the 16 bit rendering on the slow FPS in order to get a greater yield from OpenGL decoder software?
 
I've done SO many things on my OT, too. Someone just requested a petty function like this.

Did anybody figure out the 16 bit rendering on the slow FPS in order to get a greater yield from OpenGL decoder software?

I'm not sure honestly what that even means. (Most people on OTLand, including myself, are completely ignorant of all things to do with graphics engines)
I am literally studying OpenGL and OpenGL ES 2.0 from scratch, looking at other people's tile-based game engines and how they draw their tiles/characters/lighting, and so on.

But it will be some time before I can find out if there is even a better way to render the graphics for the otclient.

If you have any relevant information on what may be slowing down the OTClient, or what things could be done to speed it up, let me know.

By the way, I have a friend with a very slow computer, that tests for me, and even when turning OFF lights, and animated effects, and distance effects completely, and health bars/names of monsters, he still can have dips in FPS. And he still noticed FPS drops around lava, even with lighting disabled.

This means, my friend with his shitty computer experiences heavy FPS drops (below 30 fps) with only drawing ground tiles, borders, items, and creatures. So something clearly is odd, as no computer should really be dropping below 30 fps with only drawing those 4 things. (The FPS Drops are noticed around animated items/tiles, when lots of items are on the screen, or when lots of creatures are on the screen)
 
I'm not sure honestly what that even means. (Most people on OTLand, including myself, are completely ignorant of all things to do with graphics engines)
I am literally studying OpenGL and OpenGL ES 2.0 from scratch, looking at other people's tile-based game engines and how they draw their tiles/characters/lighting, and so on.

But it will be some time before I can find out if there is even a better way to render the graphics for the otclient.

If you have any relevant information on what may be slowing down the OTClient, or what things could be done to speed it up, let me know.

By the way, I have a friend with a very slow computer, that tests for me, and even when turning OFF lights, and animated effects, and distance effects completely, and health bars/names of monsters, he still can have dips in FPS. And he still noticed FPS drops around lava, even with lighting disabled.

This means, my friend with his shitty computer experiences heavy FPS drops (below 30 fps) with only drawing ground tiles, borders, items, and creatures. So something clearly is odd, as no computer should really be dropping below 30 fps with only drawing those 4 things. (The FPS Drops are noticed around animated items/tiles, when lots of items are on the screen, or when lots of creatures are on the screen)
Can you tell me your friend computer specs? Light are not so bad perhaps a lot of light source is needed to be rendered.
Effects is not a problem also, but if you have a lot of big effects like CIP spell ( Rage of the Skies ) a FPS drop should be expected.
You guys already tried see how CIP flash client works? Maybe we can get something with that.
 
Can you tell me your friend computer specs? Light are not so bad perhaps a lot of light source is needed to be rendered.
Effects is not a problem also, but if you have a lot of big effects like CIP spell ( Rage of the Skies ) a FPS drop should be expected.
You guys already tried see how CIP flash client works? Maybe we can get something with that.

Well I use an old version 10.77 mby? when im looking for things, I can get an updated one if someone wants it.
As I have said before, the code is hardely readable, just to give you a taste (this is one of mby 3-6 functions of the HUD UI and logic):
Code:
        private function drawCreatureStatusHUD(_arg1:Creature, _arg2:int, _arg3:int, _arg4:Boolean, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean, _arg8:Boolean):void{
            var _local12:Number;
            var _local13:Rectangle;
            var _local9 = (_arg1.ID == this.m_Player.ID);
            if (_arg4){
                this.m_TempHealthColour.ARGB = Creature.s_GetHealthColourARGB(_arg1.hitpointsPercent);
                this.m_TempManaColour.setChannels(0, 0, 0xFF);
            } else {
                this.m_TempHealthColour.setChannels(192, 192, 192);
                this.m_TempManaColour.setChannels(192, 192, 192);
            };
            if (this.m_OptionsLightEnabled){
                _local12 = this.m_TiledLightmapRenderer.calculateCreatureHudBrightnessFactor(_arg1, _local9);
                this.m_TempHealthColour.mulFloatToSelf(_local12, false);
                this.m_TempManaColour.mulFloatToSelf(_local12, false);
            };
            var _local10:Number = 0;
            var _local11:Number = 0;
            if (_arg1.mountOutfit != null){
                _local10 = (_arg2 - (_arg1.mountOutfit.ns_appearance_internal::m_Type.FrameGroups[FrameGroup.FRAME_GROUP_DEFAULT].exactSize / 2));
                _local11 = (_arg3 - (_arg1.mountOutfit.ns_appearance_internal::m_Type.FrameGroups[FrameGroup.FRAME_GROUP_DEFAULT].exactSize / 2));
            } else {
                if (_arg1.outfit != null){
                    _local10 = (_arg2 - (_arg1.outfit.ns_appearance_internal::m_Type.FrameGroups[FrameGroup.FRAME_GROUP_DEFAULT].exactSize / 2));
                    _local11 = (_arg3 - (_arg1.outfit.ns_appearance_internal::m_Type.FrameGroups[FrameGroup.FRAME_GROUP_DEFAULT].exactSize / 2));
                };
            };
            if (((((_local9) || (_arg4))) && (_arg6))){
                this.m_HelperPoint.x = (_local10 - ((3 * FIELD_SIZE) / 2));
                this.m_HelperPoint.y = _local11;
                this.m_HelperPoint = this.m_Transform.transformPoint(this.m_HelperPoint);
                this.drawHUDArc(this.m_HelperPoint.x, this.m_HelperPoint.y, HUD_ARC_ORIENTATION_LEFT, _arg1.hitpointsPercent, this.m_TempHealthColour.RGB);
            };
            if (((((_local9) || (_arg4))) && (_arg7))){
                this.m_HelperPoint.x = (_local10 + ((3 * FIELD_SIZE) / 2));
                this.m_HelperPoint.y = _local11;
                this.m_HelperPoint = this.m_Transform.transformPoint(this.m_HelperPoint);
                this.drawHUDArc(this.m_HelperPoint.x, this.m_HelperPoint.y, HUD_ARC_ORIENTATION_RIGHT, _arg1.manaPercent, this.m_TempManaColour.RGB);
            };
            if (_arg5){
                _local13 = this.m_CreatureNameCache.getItem((_arg1.name + this.m_TempHealthColour.toString()), _arg1.name, this.m_TempHealthColour.RGB);
                this.m_HelperPoint.x = (_arg2 - (FIELD_SIZE / 2));
                this.m_HelperPoint.y = (_arg3 - FIELD_SIZE);
                this.m_HelperPoint = this.m_Transform.transformPoint(this.m_HelperPoint);
                this.m_HelperPoint.x = Math.max(0, Math.min((this.m_HelperPoint.x - (_local13.width / 2)), (unscaledWidth - _local13.width)));
                this.m_HelperPoint.y = Math.max(0, Math.min((this.m_HelperPoint.y - _local13.height), (unscaledHeight - _local13.height)));
                this.m_HelperTrans.tx = (this.m_HelperPoint.x - _local13.x);
                this.m_HelperTrans.ty = (this.m_HelperPoint.y - _local13.y);
                graphics.beginBitmapFill(this.m_CreatureNameCache, this.m_HelperTrans, false, false);
                graphics.drawRect(this.m_HelperPoint.x, this.m_HelperPoint.y, _local13.width, _local13.height);
                graphics.endFill();
            };
            if (_arg8){
                this.drawCreatureFlags(_arg1, (_arg2 - (FIELD_SIZE / 2)), (_arg3 - FIELD_SIZE), _arg4);
            };
        }

Then you also have to find diffrent variables that are used, ex trying to find what _arg1 is (in most of the cases it's the byte array).
But im doing my best to track the flash client to OTC, ex adding the HUD, but it takes time and you get bored really quick when you start reading the flash source xD
 
Can you tell me your friend computer specs? Light are not so bad perhaps a lot of light source is needed to be rendered.
Effects is not a problem also, but if you have a lot of big effects like CIP spell ( Rage of the Skies ) a FPS drop should be expected.
You guys already tried see how CIP flash client works? Maybe we can get something with that.

Processor: Celeron Dual-Core CPU T3000 @ 1.50GHz 1.79GHz
Ram: 3.00 GB
Graphics: Mobile Intel® 4 Series Express Chipset Family
 
Flash sucks. I assume HTML is the next gamestep.

Also, the shaders do not seem to apply the particle effect mechanism in an efficient manner ; in relation to the pre-drawn bitmaps. I will look into this myself
 
Last edited by a moderator:
Also, the shaders do not seem to apply the particle effect mechanism in an efficient manner ; in relation to the pre-drawn bitmaps. I will look into this myself

If you fix anything, let me know what you fixed it to and why, (I'm seriously studying this shit)
 
Last edited:
Hey @WibbenZ can you post a screenshot of your current layout, so I know if still worth to share my last progress with you (https://imgur.com/a/oNHuH), since I'm kind of done with it.

Sure, here: http://2.1m.yt/GoCzau8.png
Still plenty to do before I can remove the top menu, if you wanna help out you can fix the cooldown bar, just let me know and ill give you the .spr file sprites ~ if you can't do it yourself.

Flash sucks. I assume HTML is the next gamestep.

If you ask me the flash client is pretty good, when I started working on it I felt like 99% "I hate it", but after a couple of hours I kinda fell in love with it.
Prefer it over the standalone client most of the time, only sad thing is that you can't see the skill window as in the standalone client.
But at the same time you can see one skill in the top bar, percent aswell as the level itself.
 
Well it's been abit slow for a while and the reason well .. :)
OTC now has idle and walking animations(not fully tested, but should be uploaded pretty soon).
Really happy that this got fixed so quickly, seeing as it's been an issue for a long while.

Have to give a huge shoutout to @Gesior.pl for the help getting started aswell as the issue I had last night with loading the dat file, would have taken me alot longer without your help!

DeVneoD.png
 
Well it's been abit slow for a while and the reason well .. :)
OTC now has idle and walking animations(not fully tested, but should be uploaded pretty soon).
Really happy that this got fixed so quickly, seeing as it's been an issue for a long while.

Have to give a huge shoutout to @Gesior.pl for the help getting started aswell as the issue I had last night with loading the dat file, would have taken me alot longer without your help!

DeVneoD.png
Great work dude!
 
Well it's been abit slow for a while and the reason well .. :)
OTC now has idle and walking animations(not fully tested, but should be uploaded pretty soon).
Really happy that this got fixed so quickly, seeing as it's been an issue for a long while.

Have to give a huge shoutout to @Gesior.pl for the help getting started aswell as the issue I had last night with loading the dat file, would have taken me alot longer without your help!

DeVneoD.png

I'm confused on this, I've been aware of the problem, but I don't understand the whole concept of the 'idle animation'.

Maybe it is also because I've been absent from real tibia for awhile, but could you run us through what exactly is an idle animation?

and how would we go about making a idle animation for an outfit?
 
I'm confused on this, I've been aware of the problem, but I don't understand the whole concept of the 'idle animation'.

Maybe it is also because I've been absent from real tibia for awhile, but could you run us through what exactly is an idle animation?

and how would we go about making a idle animation for an outfit?

There are 2 diffrent animation types, walking and idle / default.
When you stand still it animates the idle / default one.
When you walk it animates the walking one.

OTC didn't support the standing frame, the issue was that it loaded the idle one and then over read it with the walking one.
So when you stood still it used the first frame of the walking(your feets are about to move), insted of the idle animation frame(s) where you stand still.

You can compare the picture here; https://github.com/edubart/otclient/issues/649
 
There are 2 diffrent animation types, walking and idle / default.
When you stand still it animates the idle / default one.
When you walk it animates the walking one.

OTC didn't support the standing frame, the issue was that it loaded the idle one and then over read it with the walking one.
So when you stood still it used the first frame of the walking(your feets are about to move), insted of the idle animation frame(s) where you stand still.

You can compare the picture here; https://github.com/edubart/otclient/issues/649

Yeah, I knew that was the problem, but I guess what I am more wondering about how is the idle animation done?

IE, on real tibia, not all the outfits have an actual idle animation, they just stand their still.

But the Chaos Acolyte is an example of an actual idle animation, when you stand still the flame kinda moves around.

What I am asking is, how would I go about making an outfit have an actual animation while standing still, like what is seen on the Chaos Acolyte?

is there another parameter for it?

edit:

What I mean is, when setting up the outfit in the .dat, there isn't a clear way to make an animation while idle.

Animations used in the .dat is for the walking animation, pattern x is for the look directions, pattern y is for the addons, pattern z for mount.

And for monsters like the old rotworm which never stopped moving, there is an 'always animate' option, which just animates it through it's run cycle'.

What I am asking here is, is there a new parameter to this, to allow for setting up idle animations?

Reading the github Mignari mentioned a 'frame group', which I guess is the parameter for the idle animation.

I am guessing you actually wrote support for the 'frame group' parameter? If so, I am excited!
 
Last edited:
Yeah, I knew that was the problem, but I guess what I am more wondering about how is the idle animation done?

IE, on real tibia, not all the outfits have an actual idle animation, they just stand their still.

But the Chaos Acolyte is an example of an actual idle animation, when you stand still the flame kinda moves around.

What I am asking is, how would I go about making an outfit have an actual animation while standing still, like what is seen on the Chaos Acolyte?

is there another parameter for it?

Im not 100% read up on it, but from what ive know:
There are 2 appearance types, walking and idle.
Both have a unique frame group, https://github.com/WibbenZ/otclient/blob/master/src/client/thingtype.cpp#L286-L325

This makes it posible to have both an animated idle aswell as a non animated idle (like citizen, nothing moves) just by adding more sprites.
If we take ex the cyclop animation it has 12 * 3 = 36 animations, this includes walking and idle animations in diffrent directions. ( http://3.1m.yt/EGfst8-.png )
If we count the "north" animations we have 9, once again both walking and idle.
And if we split it up, we have 8 animated (walking) and 1 that isen't animated (idle).

So to put it simple, the walking animation has 8 diffrent "images" and the idle has 1.
To make the idle animated we have to add more then 1 animation to the idle appearance type.
This way it will follow the pattern (just as when we are walking) to always animate it, once we start moving it stops that animation and starts the walking animation.

Kinda hard to explain, but I hope you at least learnt abit xD


edit:

What I mean is, when setting up the outfit in the .dat, there isn't a clear way to make an animation while idle.

Animations used in the .dat is for the walking animation, pattern x is for the look directions, pattern y is for the addons, pattern z for mount.

And for monsters like the old rotworm which never stopped moving, there is an 'always animate' option, which just animates it through it's run cycle'.

What I am asking here is, is there a new parameter to this, to allow for setting up idle animations?

Reading the github Mignari mentioned a 'frame group', which I guess is the parameter for the idle animation.

I am guessing you actually wrote support for the 'frame group' parameter? If so, I am excited!

@Sportacus
Sorry diden't see that you had edited your post;

This is most likely because the dat editor is outdated, I might give it a try with updating it or atleast give Mignari the files and info I used to make this happen.

Yes there is a new "parameter", not really a parameter more like a function within a function aka frameGroup.
Each frame type (idle walking) has a frame group, this is where the animation phases, sprites etc are stored.
Thus making it posible to do w/e you want with the animations, we could really easy twist them around, making the walking animation the idle one.

Yes I did, I had to, as I said. OTC only supported one frame group, insted of as many as we want.
It's a pretty simple fix when you can look at how the flash client is doing it.
But idk how much is needed with the dat editor to make it work, if it was simple I bet he would have already done it (seeing as there is a 170$ bounty on it last time I checked).
 
Last edited:
Im not 100% read up on it, but from what ive know:
There are 2 appearance types, walking and idle.
Both have a unique frame group, https://github.com/WibbenZ/otclient/blob/master/src/client/thingtype.cpp#L286-L325

This makes it posible to have both an animated idle aswell as a non animated idle (like citizen, nothing moves) just by adding more sprites.
If we take ex the cyclop animation it has 12 * 3 = 36 animations, this includes walking and idle animations in diffrent directions. ( http://3.1m.yt/EGfst8-.png )
If we count the "north" animations we have 9, once again both walking and idle.
And if we split it up, we have 8 animated (walking) and 1 that isen't animated (idle).

So to put it simple, the walking animation has 8 diffrent "images" and the idle has 1.
To make the idle animated we have to add more then 1 animation to the idle appearance type.
This way it will follow the pattern (just as when we are walking) to always animate it, once we start moving it stops that animation and starts the walking animation.

Kinda hard to explain, but I hope you at least learnt abit xD




@Sportacus
Sorry diden't see that you had edited your post;

This is most likely because the dat editor is outdated, I might give it a try with updating it or atleast give Mignari the files and info I used to make this happen.

Yes there is a new "parameter", not really a parameter more like a function within a function aka frameGroup.
Each frame type (idle walking) has a frame group, this is where the animation phases, sprites etc are stored.
Thus making it posible to do w/e you want with the animations, we could really easy twist them around, making the walking animation the idle one.

Yes I did, I had to, as I said. OTC only supported one frame group, insted of as many as we want.
It's a pretty simple fix when you can look at how the flash client is doing it.
But idk how much is needed with the dat editor to make it work, if it was simple I bet he would have already done it (seeing as there is a 170$ bounty on it last time I checked).

I wouldn't imagine the update to the object builder would be that hard, it's just another parameter to add to the options, the hard part would be reading the dat to get the frameGroup, and apperantly you have done that given your fix to the OTC.

I'll look into it tonight after I am done with work

I've been working on cip client sytle sometimes ago but for 7.4 tibia client. If someone need help just msg me.
This is what i done so far:
nowy-obraz-mapy-bitowej.jpg

Your best bet is to put it up for download somewhere, or put it up on github, that way you'd reach a lot more people looking into it.

You did good work though! Looks really similar to old Tibia.

Though I do wonder what would happen if I closed some of the windows/tabs since there is no tab bar. I guess you'd just use a hotkey (like ctrl-S for the skills window) to reopen them. Or is the tab bar just hidden and thats what the T icon on the chat bar is for?
 
Last edited by a moderator:
Status
Not open for further replies.
Back
Top