re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Thank you guys for all the support :ott:.
Sorry that these updates seem pretty lame but it took me a little while to figure out how to get room rights and room ownership 100% along with getting the "Room Settings" button to appear for the owner.
Changelog
- Create room
- Edit room details
- Delete room
- Rewrote room handler to support multiple entities in future (decided to do it now rather than later), such as bots and pets
- Changed how rooms work by making sure that furniture/AI/room tick cycle will be loaded when there's people in the room, and unloaded when everyone leaves
Nothing is really that exciting except that I can easily add bots to rooms (only through code for now) and managed to show the room floor/wall thickness and different chat settings :)
Code:
Bot mahBawt = new Bot();
mahBawt.getRoomUser().setRoom(this);
mahBawt.getRoomUser().setX(this.getData().getModel().getDoorX());
mahBawt.getRoomUser().setY(this.getData().getModel().getDoorY());
mahBawt.getRoomUser().setHeight(this.getData().getModel().getHeight(mahBawt.getRoomUser().getPoint()));
mahBawt.getRoomUser().setVirtualId(this.getVirtualId());
this.entities.add(mahBawt);
http://i.imgur.com/ov1QZ7H.png
http://i.imgur.com/r9SvTUk.png
I used Sulkadasm to crack the swf, but there was an extra check to see if you're using the SWF past a certain date which I removed manually through rabcasm.
Looking good Alex. Especially the name used for declaring that bot.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Anyone know how on earth this is handled?
http://i.imgur.com/62O2EBx.png
Quote:
Originally Posted by
Jax
Looking good Alex. Especially the name used for declaring that bot.
Thanks :D:
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Good luck pal! I'm sure you'll succeed despite the negative comments from some users.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Why would you still work in plain sql?
Start using an ORM.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Eronisch
Why would you still work in plain sql?
Start using an ORM.
No point using an ORM for a Habbo server, not my problem if I don't appeal to your preferences.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
Yes. Its just a packet which contains compressed JSON data which you should forward to the camera script which renders the image.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Yes. Its just a packet which contains compressed JSON data which you should forward to the camera script which renders the image.
But the correct way would be to render it inside the Emulator and insert the data into the DB and then cache it, right?
I was told that using a web-based script was the "shitty" way of doing it.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Yes. Its just a packet which contains compressed JSON data which you should forward to the camera script which renders the image.
I can't figure out how to decompress the received data however. :(
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Jonteh
But the correct way would be to render it inside the Emulator and insert the data into the DB and then cache it, right?
I was told that using a web-based script was the "shitty" way of doing it.
Officially it's handled by a daemon written in NodeJS, external to the game server, but yeah the PHP script that's been released is kind of lacklustre. You don't store the Sprite data from the JSON message, it's rendered into a plain image file and the file name gets stored and returned to the client. Pretty stupid solution if you ask me, the client obviously knows how to get the JSON data from a rendered scene, it's trivial to do the same in reverse.
Sent from my iPhone using Tapatalk
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
scottstamp851
Officially it's handled by a daemon written in NodeJS, external to the game server, but yeah the PHP script that's been released is kind of lacklustre. You don't store the Sprite data from the JSON message, it's rendered into a plain image file and the file name gets stored and returned to the client. Pretty stupid solution if you ask me, the client obviously knows how to get the JSON data from a rendered scene, it's trivial to do the same in reverse.
Sent from my iPhone using Tapatalk
Thumbs up for typing all of that from a phone. But cheers for the explanation. May help Alex too!
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Jonteh
Thumbs up for typing all of that from a phone. But cheers for the explanation. May help Alex too!
Lol I've written code on this phone before, a forum post is nothing. I've given Alex some pointers on this but he's having trouble decompressing it with existing Java gzip implementations. I don't remember the exact compression suite we used in C# though.
Sent from my iPhone using Tapatalk
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
scottstamp851
Lol I've written code on this phone before, a forum post is nothing. I've given Alex some pointers on this but he's having trouble decompressing it with existing Java gzip implementations. I don't remember the exact compression suite we used in C# though.
Sent from my iPhone using Tapatalk
Pretty sure there are some emulators out there with Camera implemented he could take a look at. Not 100% on that tho, and they do it the shoddy way w/ a PHP script so eh.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Jonteh
Pretty sure there are some emulators out there with Camera implemented he could take a look at. Not 100% on that tho, and they do it the shoddy way w/ a PHP script so eh.
Azure decompresses it on the server for some processing that takes place before sending it to the webserver.
Sent from my iPhone using Tapatalk
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
scottstamp851
Azure decompresses it on the server for some processing that takes place before sending it to the webserver.
Sent from my iPhone using Tapatalk
Could be helpful to look at for Alex then, as even by reading it he could get an idea on how to decompress it.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Quackster
I can't figure out how to decompress the received data however. :(
Its just basic zip compression.
Altough writing this camera is a pain in the ass. If I were you I wouldn't put my priorities there.
Imgur: The most awesome images on the Internet
Code:
this.packet.getBuffer().readFloat();
byte[] buffer = new byte[4096*3];
byte[] data = this.packet.getBuffer().readBytes(//packet bytes).array();
Inflater inflater = new Inflater();
inflater.setInput(data);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);
while (!inflater.finished()) {
int count = inflater.inflate(buffer);
outputStream.write(buffer, 0, count);
}
outputStream.close();
byte[] output = outputStream.toByteArray();
inflater.end();
System.out.println(new String(output));