Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RSProt

[![GitHub Actions][actions-badge]][actions] [![MIT license][mit-badge]][mit]
[![OldSchool - 221 - 235 (Alpha)](https://img.shields.io/badge/OldSchool-221--235_(Alpha)-9a1abd)](https://github.com/blurite/rsprot/tree/master/protocol/osrs-235/osrs-235-api/src/main/kotlin/net/rsprot/protocol/api)
[![OldSchool - 221 - 236 (Alpha)](https://img.shields.io/badge/OldSchool-221--236_(Alpha)-9a1abd)](https://github.com/blurite/rsprot/tree/master/protocol/osrs-236/osrs-236-api/src/main/kotlin/net/rsprot/protocol/api)

## Status
> [!NOTE]
Expand All @@ -16,7 +16,7 @@ In order to add it to your server, add the below line under dependencies
in your build.gradle.kts.

```kts
implementation("net.rsprot:osrs-235-api:1.0.0-ALPHA-20250124")
implementation("net.rsprot:osrs-236-api:1.0.0-ALPHA-20250203")
```

An in-depth tutorial on how to implement it will be added into this read-me
Expand All @@ -32,12 +32,12 @@ other revisions are welcome, but will not be provided by default.
- Java 11

## Supported Versions
This library currently supports revision 221-235 OldSchool desktop clients.
This library currently supports revision 221-236 OldSchool desktop clients.

## Quick Guide
This section covers a quick guide for how to use the protocol after implementing
the base API. It is not a guide for the base API itself, that will come in the
future. This specific quick guide refers to revision 235. Revisions older
future. This specific quick guide refers to revision 236. Revisions older
than 235 have a significantly different API and will not be explored here.
It is recommented you upgrade to latest, or view an older readme in history.

Expand Down
23 changes: 23 additions & 0 deletions WHATSNEW.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
## What's New?

### Revision 236
Revision 236 brings a handful of new variants of existing packets.

New features:
- UPDATE_REBOOT_TIMER_V2
- Adds a 'message' field to show alongside the update timer.

The below packets all went through the same change - they now take absolute
coordinates relative to root world (not active!), rather than the previous
relative-to-build-area coordinates. Furthermore, all these packets are now
obfuscated, unlike their V1 counterparts.
- SET_MAP_FLAG_V2
- CAM_MOVETO_V2
- CAM_LOOKAT_V2
- CAM_MOVETO_CYCLES_V2
- CAM_LOOKAT_EASED_COORD_V2
- CAM_MOVETO_ARC_V2

Changes:
- WORLDENTITY_INFO_V7
- Bitpacks the width and length of the world entity sent in the add block into one byte.
- Extension info is now scrambled, bringing it in line with NPC and Player info packets.

### Revision 235
Revision 235 brings no protocol level changes.
However, as a small side note, OBJ packets are no longer limited to id 32767
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {

allprojects {
group = "net.rsprot"
version = "1.0.0-ALPHA-20250124"
version = "1.0.0-ALPHA-20250203"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import net.rsprot.protocol.internal.checkCommunicationThread
import net.rsprot.protocol.internal.game.outgoing.info.CoordFine
import net.rsprot.protocol.internal.game.outgoing.info.CoordGrid
import net.rsprot.protocol.internal.game.outgoing.info.util.ZoneIndexStorage
import java.util.Collections

/**
* The world entity info class tracks everything about the world entities that
Expand Down Expand Up @@ -78,8 +79,11 @@ public class WorldEntityInfo internal constructor(
}
private val unsortedTopKArray: WorldEntityUnsortedTopKArray = WorldEntityUnsortedTopKArray(MAX_HIGH_RES_COUNT)
private val allWorldEntities = ArrayList<Int>()
private val allWorldEntitiesUnmodifiable: List<Int> = Collections.unmodifiableList(allWorldEntities)
private val addedWorldEntities = ArrayList<Int>()
private val addedWorldEntitiesUnmodifiable: List<Int> = Collections.unmodifiableList(addedWorldEntities)
private val removedWorldEntities = ArrayList<Int>()
private val removedWorldEntitiesUnmodifiable: List<Int> = Collections.unmodifiableList(removedWorldEntities)
private var buffer: ByteBuf? = null

/**
Expand Down Expand Up @@ -142,9 +146,9 @@ public class WorldEntityInfo internal constructor(
* allowing for correct functionality for player and npc infos, as well as zone updates.
* @return a list of indices of the world entities currently in high resolution.
*/
internal fun getAllWorldEntityIndices(): List<Int> {
public fun getAllWorldEntityIndices(): List<Int> {
if (isDestroyed()) return emptyList()
return this.allWorldEntities
return this.allWorldEntitiesUnmodifiable
}

/**
Expand All @@ -154,9 +158,9 @@ public class WorldEntityInfo internal constructor(
* @return a list of all the world entity indices added to the high resolution view in this
* cycle.
*/
internal fun getAddedWorldEntityIndices(): List<Int> {
public fun getAddedWorldEntityIndices(): List<Int> {
if (isDestroyed()) return emptyList()
return this.addedWorldEntities
return this.addedWorldEntitiesUnmodifiable
}

/**
Expand All @@ -166,9 +170,9 @@ public class WorldEntityInfo internal constructor(
* @return a list of all the indices of the world entities that were removed from the high
* resolution view this cycle.
*/
internal fun getRemovedWorldEntityIndices(): List<Int> {
public fun getRemovedWorldEntityIndices(): List<Int> {
if (isDestroyed()) return emptyList()
return this.removedWorldEntities
return this.removedWorldEntitiesUnmodifiable
}

/**
Expand Down
1 change: 1 addition & 0 deletions protocol/osrs-236/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// No-op
40 changes: 40 additions & 0 deletions protocol/osrs-236/osrs-236-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
dependencies {
implementation(platform(rootProject.libs.netty.bom))
api(rootProject.libs.netty.buffer)
implementation(rootProject.libs.netty.transport)
implementation(rootProject.libs.netty.handler)
implementation(rootProject.libs.netty.native.epoll)
implementation(rootProject.libs.netty.native.kqueue)
implementation(rootProject.libs.netty.iouring)
implementation(rootProject.libs.netty.native.macos.dns.resolver)
val epollClassifiers = listOf("linux-aarch_64", "linux-x86_64", "linux-riscv64")
val kqueueClassifiers = listOf("osx-x86_64")
val iouringClassifiers = listOf("linux-aarch_64", "linux-x86_64")
for (classifier in epollClassifiers) {
implementation(variantOf(rootProject.libs.netty.native.epoll) { classifier(classifier) })
}
for (classifier in kqueueClassifiers) {
implementation(variantOf(rootProject.libs.netty.native.kqueue) { classifier(classifier) })
}
for (classifier in iouringClassifiers) {
implementation(variantOf(rootProject.libs.netty.iouring) { classifier(classifier) })
}
implementation(rootProject.libs.inline.logger)
api(projects.protocol)
api(projects.compression)
api(projects.crypto)
api(projects.protocol.osrs236.osrs236Common)
api(projects.protocol.osrs236.osrs236Model)
implementation(projects.protocol.osrs236.osrs236Internal)
implementation(projects.protocol.osrs236.osrs236Desktop)
implementation(projects.protocol.osrs236.osrs236Shared)
implementation(projects.buffer)
}

mavenPublishing {
pom {
name = "RsProt OSRS 236 API"
description = "The API module for revision 236 OldSchool RuneScape networking, " +
"offering an all-in-one implementation."
}
}
Loading
Loading