Habbo Camera API (Plus)

Status
Not open for further replies.

Core

Member
Nov 10, 2016
356
138
You should look into Imagick over GD. It has a lot more wrappers for different languages, e.g. C# so you can code the rendering directly into the emulator. It also allows for more intensive functions like perspective distortion which is perfect for plane textures as they're not based on default rotation. However, it can be a tod more difficult to set up for someone who has little/no experience with PHP so doesn't provide 'ease of use' which GD provides as as it's ready 'out the box'. Only issue which I had with my API (not fully working) was the colour matrix, as don't understand it so didn't get effects 100% working as colours didn't match up, I cheated and guessed until they looked like one another and texture perspectives as couldn't work out view point.

However, I have started making a tool which auto modifies swf for me to post raw data because I'm too lazy to try work out the rest xD!
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
I coded something similar to this, got it working etc. Just had problems with the actual Item interaction. Wish you good luck with this :)
 

Core

Member
Nov 10, 2016
356
138
I coded something similar to this, got it working etc. Just had problems with the actual Item interaction. Wish you good luck with this :)

There is no such interaction item required? The camera image data is sent via the item display flags (extradata); only reason you'd need to set up an interactor is if you use this as furniture type and you want to validate for the packets which it uses for example; delete sticky note, you might want to check if the image is a camera image.
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
426
642
There is no such interaction item required? The camera image data is sent via the item display flags (extradata); only reason you'd need to set up an interactor is if you use this as furniture type and you want to validate for the packets which it uses for example; delete sticky note, you might want to check if the image is a camera image.
Exactly this, the delete image is done via the delete post it packet, The only other use for having an interaction is imcase you want to generate the enxtra data for the item outside the items existing extra data(if that makes sense).

Far as updates go I've done all assets for furniture and pets. Just need to take a look into fixing some of these bugs which GD library make it almost impossible to do. Will probably look into using Imacick to handle a lot of these problems I'm having.
 

Core

Member
Nov 10, 2016
356
138
Exactly this, the delete image is done via the delete post it packet, The only other use for having an interaction is imcase you want to generate the enxtra data for the item outside the items existing extra data(if that makes sense).

Far as updates go I've done all assets for furniture and pets. Just need to take a look into fixing some of these bugs which GD library make it almost impossible to do. Will probably look into using Imacick to handle a lot of these problems I'm having.

What problems you having?
Effects etc was a pain with imagick as didn't keep transparency - had to copy image to blank instance rather than create an instance from the sprite file.
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
426
642
My 2 problems I'm having at the moment are.

1). Skewing wall/floor sprites for the textures.
2). Blending layers for effects and furniture. (example. Dragon Lamps)

Pets are REALLY buggy. But I barely looked into them yet as I wanted to fix furniture first.
 

Core

Member
Nov 10, 2016
356
138
My 2 problems I'm having at the moment are.

1). Skewing wall/floor sprites for the textures.
2). Blending layers for effects and furniture. (example. Dragon Lamps)

Pets are REALLY buggy. But I barely looked into them yet as I wanted to fix furniture first.

You want to distort based on the perspective rather than using a skew. There isn't actually a method to do it in php-gd i did try this class ( ) but never got it working 100%. Some of the textures had missing pixels, etc. As for you problem with effects, that's what I had with imagick.
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
426
642
Yeah, I did do some research into these problems and they all pointed towards using Imagick over native GD. Just haven't had the chance to look into using it yet, as hadn't had the time.
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
There is no such interaction item required? The camera image data is sent via the item display flags (extradata); only reason you'd need to set up an interactor is if you use this as furniture type and you want to validate for the packets which it uses for example; delete sticky note, you might want to check if the image is a camera image.
Exactly what I'm doing :p. I'm coding them a little different.
 

Core

Member
Nov 10, 2016
356
138
Exactly what I'm doing :p. I'm coding them a little different.
Explain? That's the way habbo does it, it's required for functionally? You may code different tho
You using links or something?
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
Explain? That's the way habbo does it, it's required for functionally? You may code different tho
You using links or something?
My idea still ain't certain yet, I've paused it for the time being due to other things. I'm currently just playing around with it. Not sure on the best way, but I currently don't like any other way lol.
 

Core

Member
Nov 10, 2016
356
138
My idea still ain't certain yet, I've paused it for the time being due to other things. I'm currently just playing around with it. Not sure on the best way, but I currently don't like any other way lol.

I personally don't use the render API which I made as never got effects, room ads (never looked at it tbh) and texture perspectives 100% working. So I just created a tool which modifies the swf automatically for me (as I liked to keep up to date with the latest production and it's a pain adding it myself each time). It wasn't too hard I just used that Flash Inspect library to do it.

1bf5befb40334a6faae9a4a5f0f98114.png


It uses raw bitmap from camera preview and uses the wonderful pngencoder which flash has. The data is then passed onto the function which constructs the json data for the room render event - as I use some of the information such as room id, time stamp etc for validation on my own script. I also use the zlib compression function in there to reduce the post data size. People can bypass this by modifying my SWF but would require a good knowledge in swf modification (e.g. RABCDAsm) and would take a lot of work. Then again all that for one users images, doesn't bother me they have a report function xD.
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
426
642
I personally don't use the render API which I made as never got effects, room ads (never looked at it tbh) and texture perspectives 100% working. So I just created a tool which modifies the swf automatically for me (as I liked to keep up to date with the latest production and it's a pain adding it myself each time). It wasn't too hard I just used that Flash Inspect library to do it.

1bf5befb40334a6faae9a4a5f0f98114.png


It uses raw bitmap from camera preview and uses the wonderful pngencoder which flash has. The data is then passed onto the function which constructs the json data for the room render event - as I use some of the information such as room id, time stamp etc for validation on my own script. I also use the zlib compression function in there to reduce the post data size. People can bypass this by modifying my SWF but would require a good knowledge in swf modification (e.g. RABCDAsm) and would take a lot of work. Then again all that for one users images, doesn't bother me they have a report function xD.
Looks really good and is probably the easier option.

I'm hoping to expand this once I've compleated it. For example using the sprites to create my own avatar imager, and creating a pretty advanced values page. The camera api is a stepping stone as well as a goal which I'll hopefully achieve in the near future.
 

Core

Member
Nov 10, 2016
356
138
Looks really good and is probably the easier option.

I'm hoping to expand this once I've compleated it. For example using the sprites to create my own avatar imager, and creating a pretty advanced values page. The camera api is a stepping stone as well as a goal which I'll hopefully achieve in the near future.

What do you mean for value page? You can just extract the images anyways?
As for standalone image generator, I use one which was released at rage back in like 2013 to support custom clothing but would love to see what you construct.
 

Liam

discord.gg/hivehub
Staff member
FindRetros Moderator
Apr 10, 2013
1,184
714
Looks promising, can't wait to see the finished result. Good luck Damien :)
 

Meap

Don't need glasses if you C#
Nov 7, 2010
1,045
296
What do you mean for value page? You can just extract the images anyways?
As for standalone image generator, I use one which was released at rage back in like 2013 to support custom clothing but would love to see what you construct.
I tried using the standalone one that was released like may 2015 but it doesn't seem to work properly for me which sucks
 

Core

Member
Nov 10, 2016
356
138
I tried using the standalone one that was released like may 2015 but it doesn't seem to work properly for me which sucks
You need the figure assets, it worked for me a while ago but not bothered with it recently maybe figuredata structure has change?
 

Meap

Don't need glasses if you C#
Nov 7, 2010
1,045
296
You need the figure assets, it worked for me a while ago but not bothered with it recently maybe figuredata structure has change?
Not too sure it just wouldn't grab images from some swfs so possible change somewhere in guessing
 
Status
Not open for further replies.

Users who are viewing this thread

Top