Ir para conteúdo
View in the app

A better way to browse. Learn more.

priston.pro

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

KingTale - O que eu aprendi

Postado

Fala galera, estou há algum tempo desenvolvendo essa refatoração do Priston e gostaria de compartilhar com vocês o que aprendi no caminho.

Vou começar pelo resultado, dêem uma olhada no vídeo e se puderem curtir e compartilhar, ajudaria demais!


Estou na reta final de desenvolvimento para lançar a primeira temporada.
https://www.youtube.com/watch?v=dR0hJ1Pnvpk


Acredito que assim como a maior parte do pessoal aqui, baixei diversas sources para tentar partir da mais completa, e, no meu caso, foi a source que o Draco (https://www.youtube.com/@dracogamesnft) disponibilizou no vídeo https://www.youtube.com/watch?v=ZRUWiXALoBc, queria desde já agradecê-lo por isso.


BACKGROUND

Eu já trabalhava com programação antes de começar a brincar na fonte do Priston, mas minha proficiência é, na verdade, com C#, eu até me habituei com C++, mas é impossível competir com a conveniência das IAs, então toda a manipulação de código foi feita por agentes como Codex, Claude, etc. Outro ponto importante é que esse não é o primeiro jogo em que eu trabalho, já desenvolvi um jogo para Steam (https://store.steampowered.com/app/4529570/Wave_43/?l=brazilian) e outros diversos que não terminei, e especificamente um deles acabou me dando uma boa bagagem que repliquei no Priston, que é esse aqui https://www.reddit.com/r/monogame/comments/1nqzveu/devlog_building_ashen_realms_a_25d_rpg_from/, inacabado também kk.

Como vocês podem notar o meu forte não é desenhar, como muitos, estou no aguardo da IA desenhar e animar de forma consistente.


A SOURCE

Como muitas das sources disponíveis hoje para baixar gratuitamente, essa também vinha com aquele combo: bugs, performance ruim, visualmente cru e sem features. Mas ainda assim, foi o melhor que eu consegui achar naquele momento, tudo "funcionava", e isso já era suficiente para começar.


O PASSO PARA TRÁS

Como diz o ditado, às vezes é necessário dar um passo atrás para conseguir dar dois à frente, isso nunca fez tanto sentido quando "eu" analisei (Claudinho da massa) o código pela primeira vez. E foi o que eu fiz, fiquei alguns meses sem implementar qualquer feature de gameplay e foquei apenas em refatorar, aproveitando para migrar de DX9 para DX11, e eu consigo resumir todo esse tempo de desenvolvimento em uma única palavra: Sofrimento kk

Mas, em algum momento eu consegui, após centenas de problemas e correções eu havia migrado e refatorado por completo o código do jogo.

O GRÁFICO

Ainda tem muita coisa que pode ser implementada, mas acredito ter chegado num ótimo nível visual, e foi aquele jogo inacabado que me indicou o norte da implementação do Priston. Naquele jogo eu precisei criar do zero uma engine para rodar o mesmo, e sim, eu poderia ter usado Unity, Godot, ou até mesmo Unreal, mas como um dev hardcore de code only eu fui para o MonoGame, e nele, é tudo feito na unha mesmo, e eu comecei a implementar na época em que as IAs ainda eram apenas chats, ou seja, tive muita ajuda mas também tive que aprender muita coisa, principalmente na parte de renderização, coisas como métodos de renderização (Forward, Forward+, Deferred, etc.), formas de iluminação, realtime, clustered, baked, e por aí vai.

O primeiro passo foi realizar uma integração com o ImGui para poder fazer ajustes finos de absolutamente tudo que eu implementava no jogo:

image.png


Depois de atualizar para o DX11, o primeiro passo foi fazer algo muito parecido com o que fiz naquele jogo, separar a renderização por fases, de forma que eu conseguisse enxergar separadamente a Albedo, Vertex, Normals, etc.. Veja isso:

Unlit
image.png

Normals:
image.png

E por aí vai..

O que eu implementei para alcançar esse visual foi basicamente:

  • PBR simplificado — materiais com resposta à iluminação mais realista, principalmente em personagens e armas.

  • Cascaded Shadow Maps (CSM) — sombras dinâmicas com 3 cascatas.

  • Baked Shadows — sombras pré-calculadas para o terreno.

  • Hybrid Shadows — combinação de sombras baked no cenário e dinâmicas nos personagens.

  • SSAO — Ambient Occlusion em espaço de tela.

  • Procedural Sky — sistema de céu procedural.

  • Water Rendering — novo sistema de renderização de água.

  • HDR Tone Mapping (ACES) — mapeamento de tons cinematográfico.

  • Color Grading (LUT) — ajuste de cores por tabelas de referência.

  • Bloom — iluminação difusa em áreas brilhantes.

  • Depth of Field (DOF) — desfoque baseado na profundidade da cena.

  • FXAA — antialiasing por pós-processamento.

  • SMAA — antialiasing com melhor preservação de detalhes.

  • TAA — antialiasing temporal.

  • AMD FSR 1.0 — upscaling espacial.

  • Dynamic Resolution Scaling — ajuste dinâmico da resolução visando manter o FPS-alvo, com integração ao FSR 1.0.

  • Terrain Painting — pintura de terrenos com diferentes materiais e texturas.

  • Materialize Editor — editor de materiais por categorias (grama, areia, pedra, madeira, folhagem e metal).

  • High-Resolution Terrain Textures — suporte a texturas de terreno de 256, 512 e 1024 pixels.

  • DDS BC1/BC7 Texture Compression — compressão otimizada de texturas.



O SERVIDOR

Para não deixar um tópico muito grande, eu finalizo com outro grande salto que tive que dar no código, que é o lado do servidor, por motivos de performance e principalmente custo, acabei migrando o servidor para rodar no Linux através do Wine, isso me permitiu fazer deploy automático (Launcher, Client e Server) apenas fazendo push para main, o server ficou em um container Docker, e os launchers se auto atualizam e também baixam updates para o client, inclusive o meu instalador acaba pesando apenas 80 MB pois ele só instala o launcher, e depois que abre a primeira vez ele baixa o client completo, que hoje deve estar em torno de 6 GB.


E POR FIM

Espero que esse relato ajude ou inspire quem também está se aventurando pelo código do Priston. Sei que muitos aqui já passaram (ou ainda estão passando kk) pelos mesmos desafios.

Agora estou na reta final para lançar a primeira temporada do KingTale. Se puderem dar uma força curtindo o vídeo, compartilhando ou deixando um feedback, já ajuda demais!

Valeu, galera!

image.png

Editado por Vieira

Featured Replies

Postado

Cara, inacreditavel o que tu fez, parabens de verdade! Esse grafico ta de cair o queixo.

Postado

Eu como acompanhei de perto algumas coisas so tenho que te dar parabens, e agradecer as trocas que tivemos, pois também me ajudou a deixar o League com uma cara muito melhor do que o padrão, como sempre te disse, quando eu acho que o meu ta bonito tu vai la e faz algo mais bonito, agora la vai eu estudar pra chegar no teu nivel sahushua, parabens meu amigo !

Postado

OBS: é disso que a comunidade precisa e as trocas que tivemos foram sensacionais ! um sempre ajudando o outro !

Postado

Wait, let me get this straight.

You spent months supposedly refactoring the entire codebase, migrating the rendering engine from DX9 to DX11, implementing modern rendering techniques, and overcoming hundreds of architectural challenges...

Yet, when it comes to the server, your solution for Linux compatibility is to run the Windows executable through Wine inside a Docker container?

And people are actually celebrating this as some kind of engineering achievement?

Don't get me wrong, Wine is a perfectly valid workaround for legacy software. But that's precisely the point: it's a workaround, not an architectural improvement.

Docker doesn't magically turn a Windows application into a Linux-native one, and wrapping legacy dependencies in a compatibility layer doesn't make them disappear.

What I find particularly confusing is the enormous gap between the sophistication you claim to have achieved on the rendering side and the rather questionable engineering decisions on the server side.

If you've genuinely refactored the entire codebase, why is the server still so tightly coupled to Windows that you need Wine to deploy it on Linux?

That's not modernization. That's containerizing technical debt.

Postado
  • Autor

Fala @tacolayt ! Pretendo continuar compartilhando e aprendendo com vocês, isso só tende a melhorar a comunidade!


@Default, you're absolutely right. The server side is indeed technical debt, and I'm fully aware of that.

I decided not to migrate the server to native Linux for two main reasons:

  • Performance vs. effort: Aside from memory consumption, the performance gains from a native Linux migration wouldn't be significant enough to justify the time investment right now. Focusing on optimizing how the server actually works has already brought much more noticeable improvements. I even considered rewriting the entire server in C#, but ultimately realized I'd be spending a lot of time on something that wouldn't bring substantial benefits at this stage.

  • Prioritization: After spending months working on the project, I was really eager to finally move into the initial beta testing phase. To do that, I needed to get the server into production. I basically had two choices: spend several more weeks polishing the server architecture, or get the game running and start gathering feedback, identifying bugs, and fixing real issues during the beta. I chose the latter because I felt it would bring more value to the project at that moment.

So yes, I spent months refactoring the client and considerably less time on the server. That doesn't mean I ignored the server, though. I've implemented and improved a lot of functionality on that side as well.

At the end of the day, it was a conscious decision about where to invest my limited development time, not an attempt to present Wine + Docker as some kind of architectural breakthrough.

The technical debt is still there, and a proper server modernization is still on my roadmap. I just decided that getting the game into players' hands and learning from actual testing was more valuable than pursuing architectural perfection before the first beta.

Postado

So it seems like there's an urge to get it online and earn some donations, right? hehe

Postado
  • Autor

@Default , Exactly! hehe

Like any other project, I've invested a lot of time and money into this, and I'm trying to improve it as much as possible before the official release. But yes, the financial aspect definitely matters too.

To be honest, my main goal is simply for the project to generate enough to sustain itself and stay online. I'm much more interested in seeing the community having fun than making a profit out of it.

Let's be real, this isn't exactly the kind of project that's going to make anyone rich, especially considering the legal gray area it operates in. haha

I think this is the kind of thing you do because you grew up playing the game, have a lot of nostalgic memories attached to it, happen to work in IT, and somehow find yourself with enough spare time to bring those memories back to life.

That's pretty much my story.

Postado

Yeah, I see this.

Every season I see 3 or 4 different guys that just "want to have fun" and just "make money to sustain the server itself". We all know where this goes: games bugged as shit (you can see the rushed and entirely vibe coded web shit our friends here did) and yet, despite weeks of my warning: god mode, regen cheat and much more are still a thing.

Do they worry? No. They just want to farm, and god forbid you say they are dumb or he's a vibecoder! xD

Anyway, the improvements you did seems OK: I can still see a lot of shitty things (thats my personal taste).

But statistically speaking, yeah. Every 3 or 4 months we see "new engine projects" and so on. Nothing new. GL

Editado por Default

Participe da Conversa

Você pode postar agora e se cadastrar mais tarde. Cadastre-se Agora para publicar com Sua Conta.

Visitante
Responder

Account

Navigation

Pesquisar

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.