#🍐 Jonk Stuff
1 messages · Page 3 of 1
ya la próxima w
learning rust - day 1 (ignore the spanish, i wanna add some comments that i can understand easily)
rust, why.
like, i understand the String::with_capacity
but not the normal_string.chars().nth.....
oh fuck you
nah i already did it
challenge done
i have one question, why you can use flxsubstate as an flxstate
yepe
im really bored
task manager done
basic game
making a quick calculator in rust
Bebos mira
@tall patio que
Opians
También hice shakes
uuuu te voy a robar el hilo
y eso que quería usar leros
Lerps
Pero se me iba mucho sldks
para el shake o la barra
Y si, es muy clean porque va a 60 FPS el procesado
Ambos
Pero me enfrente el problema con los flotantes y pixel perfects
para el shake podria quedar bien, para la barra no creo, le quita el estilo undertale
Y entonces tendría que hacerlo muy fijado
de que
si es 0.1 usar directamente 0
Para evitar esos decimales
Y usar pixel perfects render no es buena idea
Porque queda feo
Ya que cosas como el jugador / NPCs si se pretende que sea imperfecto
en temas de posición
Aunque estoy usando haxe, puedo perfectamente meter una Lib extra
No sé al usar Haxe siempre y cuando una Lib sea puro código nativo en haxe y que no use cosas externas (EJ. Librerías de utilidades matemáticas) podría implementarlas
Iré a revisar a HaxeLib si hay algo que resuelva mi problema de textels vs pixel texture
@tall patio PENSANDO DE UNA MANERA
TEÓRICAMENTE PUEDO USAR HSCRIPT
o rulescript
ya que están escritas en haxe
mientras reflaxe no explote si
Puedo usarlas
no explota
gozu
si usas rulescript de la misma manera que lo harias con hscript no creo
si usas las clases
ahi si creo que podria haber unos cuantos problemas
Depende, que tanto usa RuleScript?
macros
macros
y mas macros
rust is slowly becoming on one of my favorites languages
same speed as cpp
less headaches
Las macros no sirven
ohno
Osea uso una
Pero es de que
lee archivos
Y los pone en Asstes y los pone en strings
Para tener algo similar a Godot
Pero es macro no de run time
osea, como, lee archivos y vuelves sus rutas a strings?
Aja
Luego evolucionará a poder buscar carpetas
Pero luego
™
tm
Aunque teóricamente se podría
for (f in Reflect.fields(Assets))
if (f.startsWith("shit/")
trace(f)
puede que si funcione, rulescript por lo que tengo entendido modifica las clases que van a ser scripteadas para que se ejecuten sus funciones a la version del script
pero claro es lento
reflect.fields es lentisimo como la chucha
pero aveces no hay otras alternativas 😔
Pero las modifica antes de compilarlas?
Pues bueno hay filter
array.filter(f -> f.startsWith("shit/"))
si, podria decirse
Entonces podría funcionar
La cosa es Godot
Godot no es tan flexible con sus clases
godot dios, fue divertido el dia que lo use
tru
Osea
Es bueno con sus clases
Pero no permite hacerlas tan dinámicas
de que, si cambias algo durante el runtime
Tienes que recompilar el bytecode
o darle a reiniciar el juego
Es la misma
ah chucha
aunque la macro de rulescript por lo que lei del codigo crea el interp en la clase misma al modificarla, por lo que lee el codigo cada que creas la clase, haciendo que en teoria deberia ser dinamico para todas las clases
porque lo unico que cambia de la clase original es el uso de el interp para hacerle override
osea puede llegar a funcionar
La cosa es que funcionaria limitado
Y a este punto es mejor usar Reflaxe como scripting
Piénsalo
Mete haxe y lo básico junto Reflaxe
Hazlo un ejecutable
Y solo haz tipo comsndo
compile_hx()
y te lea scripts
Y te los convierta a gdscript
Y ahí directamente los entiende godot
Hay alternativas más sencillas de scripting
Una de ellas es Lua
si lo mejor seria usar lua o hscript puro
El tema con hscript puro
Es que
Pensandolo de manera coherente
Es mejor hacer un fork de GDSCRIPT de Reflaxe
Y poder hacer un ejecutable CLI
Y que venga como utilidad en el gosot
Y de que
./convert_haxe_to_gdscript path/to/src/
hscript deberia funcionar si lo vuelves a gdscript o no, osea, no cambia nada en la logica, es un interprete promedio que facilmente podrias hacer hasta en cobol
No estoy diciendo que no
Pero estarías haciendo tercera capa
Sería
Hscript -> Haxe -> GDScript
Haciendo posiblemente algo más lento
a eso si
que simplemente Haxe -> GDscript
Por eso usar Reflaxe sería una opción válida
Ó
Usar el Lua nativo de la comunidad de godot
Ó hacer Haxr
Haxe*
No sé cómo funcione el language server de godot
so.. rust is not the ideal environment to develop games
i guess its time
to learn deep c
and c++
...
4 months ago i created this chat to post my progress in sdl2 using haxe, 4 months, eh, i really learned a lot in 4 months, i want to learn how can i make physics systems on my own, using opengl, to learn c++ along the way
inheritance in cpp is so painful
yeppers
im not developing games in this
- opengl using haxe
- sdl using CPP
- opengl using cpp
- sdl using haxe
- Any other engine
thats my list of the most painful ways to make a game
so im not using sdl in cpp
i will only use cpp for opengl and other stuff
another interpreter yaaay
its python time
the best to do a language like this is using a parser like jeremy did in loreline
no more hscript type parsers 😔
@tall patio conoces latino?
Es un lenguaje de programación bien raro en español
MDC, y yo intentamos hacer un nuevo interprete, no quisimos
por lo que veo es lua en español
masomenos
sep
es un lua en español
por lo que veo es una vm stack based
i did it my way on the first take
absolute peak
can someone pls explain to me WHY MY ZIGZAGOON HAS A ULTRA BALL
it's waiting for you to turn your back
D:
WOBBUFFET IS THE FUCKING GOAT
que
help, i dont know what to doooo
idk what im doing
I'd recommend having a base Component class/interface
oh, i hadnt thought in that about bc im sleepy
and this is working yaaay
thanks for the recomendation!
im using lime signals
omg
it can move now
i love lime opengl context fr
i like the engine structure, its more understandable and easier to work with than the original pear version that i made using hxglad and hxsdl, although its still a bit far from what i managed to do with that pear version, but the progress i made tonight isnt bad.
wow 2 months
the fact that both versions are so different says a lot about how ive changed my programming style in these 2 months
ill be working in textures until i fall sleep
Lol go to bed
im in my bed
Then how are you programming
laptop
💤
buenos dias gentita linda
How long did you sleep
6 hours
That's little
yep
SpriteComponent yaay
how do i render a png in lime 
what context are you using

webgl/opengl stuff
Jonk Stuff (Pear - A OpenGL Lime engine)
load an image using Image, create your basic shader to load textures, create your buffer, create an opengl texture, add the image data to the texture (do this only once, you dont want an overflow in ram), create your basic vertex buffer, draw everything, done
this is how i do it, the code in the red circle is the drawing logic
There is a sample which demos it I think
BORINGNGGGGGGG

Bindless textures are better
yep
👍
im making pear so that it is as compatible as possible with all possible targets and computers
Try your best though it's rather scarce so I'd recommend watching this video on that:
https://www.youtube.com/watch?v=YTfdBSjitd8
How do modern video games manage to load hundreds of high resolution textures when OpenGL expects them to limit themselves to 16 or 32 per draw call? In this video, we go over Sparse Bindless Texture Arrays, a collection of advanced graphics programming techniques in OpenGL and Vulkan, which can be used to get the most out of the video memory av...
And fall back if your opengl driver version does not support the bindless texture extension
me with openfl
openfl god
i dont like fallbacks, they are a lot, a lot of work, something i wont do for a small project that uses opengl like this one
Whatever
also, i dont think youre going to use that many textures in a single scene in a 2d game that are displayed on the screen, if you do youre crazy
It's worth the 7x rendering speed improvement though
Also
Sparrow atlas characters
i dont know, ive never had that amout of lag or such a long loading time using sparrow atlas
Because it's preloading every buffer and program
And it's important for fast load times
the irony that it slows the first load time
I suspect the bottleneck is currently where it converts the textures to premultiplied alpha
Cuz openfl/flixel uses premultiplied alpha
that is mega fast, as it loading a texture
so something else is going on I think
i dont know, if flixel and openfl use that and you say that it preloads all the buffers and programs then something is happening, i dont think loading buffers and programs are that expensive, and if so you should optimize it urgently because that doesnt happen by creating a normal opengl program, it would be a problem with peote view or something wrong in the game code
yeah it's not an issue in other apps
apparently funkin is going through each pixel of each texture on load
if I understand correctly
ralsei html5 is real yaay
oh i think i should make my own 2d framework in openfl
i wonder how drawquads works
i recommend it, using openfl is not as complex as using opengl and it is very fun, plus in the process you learn techniques that could be useful to you in a future project

But idk what's making the first load of a buffer and program slow as fuck
That's initially why I made this buffer and program shit in the first place
Cuz if you have so many it's gonna eventually take a tenth of even a second to load all of it
Cuz each one is roughly 20ms
20ms for each buffer and program load
actuall nevermind, filling this chat with unrelated crap
are you referring to the loading of the first shader? i dont know why its so slow either. its something i noticed when i was doing the first version of pear. itss always like that, even in the most basic opengl project
it is better than being inactive :v
why the game is not well positioned
with what pear currently have, you should be able to make a basic game. ill be posting progress on github
fun fact, the first little game engine I put together with peote view was named pear
it was terrible
xd
i really feel comfortable with how the project is looking, and im surprised that i did half of it while i was sleepy at 12 at night. i relook look at the code later. maybe i did something wrong at that time
how did you get the motivation to do this lol
sometimes i just feel like doing something else
i was sleepy
and i was bored
me sleepy = me not doin anything
this is where it all began
i would have continued coding if aaxe hadnt appeared and told me to go to sleep
can i make a pull request that deletes export and adds a gitignore :3
no problem
i still dont know why my git keeps ignoring gitignore
xd
tbh i dont know how to use git and github, this year was the first time i used it

pr is up now
yipiee
np
and now, whats next, what should i do?
animations
how should i implement animations? i mean, i already have the base, my renderer allows me to draw only some parts of the texture, what is the structure that i should use?
everything in pear is based on components, like gears, how should i implement the sparrow atlas, spritesheets, etc, etc
AnimationComponent -> Texture -> Frame Width, height (for spritesheets)
-> loadAtlas -> Sparrow Atlas, etc, etc
-> addAnimation
-> addAnimationByIndices
-> playAnimation
thats fine i guess
oh and addAnimationByPrefix ofc
omg i have a functional system
show 
the base is already done, now i just need to create the frames based on the sparrow atlas and its ready, oh and addByPrefix
hold on hold on
this is weird
its was working
IM A FUCKING IDIOT
ok, it works now
i just need to apply the rotations to the animation in base of the current frame
and its done
boyfriend from fnf is real 
obs is a liar
wha?
oh
im really happy with how is this going
like, you can really make a game using this
and you shouldnt have any problems
you can now use animations
omg i fell sleep
so what now
eerhm
sounds i guess
oh no
this will be hard
i hate html5
Imo web audio is a much nicer api
yeah, but i dont like developing 2 systems at the same time
Fair
xd
tbh its my first time working with web audio api so xd
LOL
the sound is broken
and html5 isnt working
....
ill be reading the lime api
im a fucking idiot
done
it should be working
how much time wasted
why do i always have to complicate things for myself? xd
you can now change between 2 display types
letterbox and default
letterbox: keep aspect ratio
default: default
so...
what now
should i publish pear as a haxelib?
Yeah but make it first stable
k
when I finish this i will try to make an emulator in haxe using lime, i will try
q
Dije hace tiempo que quería hacer emular
a
lol
oh my god, now its time for me to learn how to handle register-based bytecode
its necessary to make my atari 2600 emulator 😔
you know what? im not going to make an assembly code interpreter, id rather do nothing.
im not that persistent with my projects
🍐 Jonk Stuff (Pear - A OpenGL Lime engine)
master ball
im never doing a brick furnace again
you can now use entities as scenes
im testing some things
idk if it will work
rip pc
maybe
idk
im rendering 10000 rectangles
did i just spent 2 hours reading "how to optimize draw call" posts in reddit?
i have a question, how many rectangles i should be able to renderer before flushing the renderer
100?
1000?
i hate wegbl
webgl
rect batch
FINALLY
done
omfg
you know what?
im moving to webgl2
it will be a headache, but at least ill be able to use "modern" opengl features
from 20% of cpu usage with webgl is now 15% with opengles3
and it works in html5
yaaay
yaaay
- Removed Renderer
- Added ExperimentalRenderer
- Removed SpriteBatch
- Added a REAL RectBatch
- Using OpenGL and WebGL2
now i am forced to learn how to manage registers
oh, it wasnt that hard
i hate parsers
yipi
oh no
i need to make a system that reuses registers smartly
aaah
well, i have one but it only works when you are using constants
it cant handle locals
uuugh
@tall patio al final aprendí algo de AST para mí propio sistema de diálogos sldns
increible!! vas a hacer un interprete o solo vas a compilar el ast a otro formato
como hace srd
no sé tengo un sistema raro
debería funcionar con enums
los enums en haxe son tu mejor apuesta para hacer ast
cuando me mude de typescript a haxe en cuanto a lenguajes intente usar objetos
nunca mas lo hago en mi vida
i dont know what i just did
but its working
im not using strings for variables
like
IM NOT STORING VARIABLES AT ALL
LOOL
nah this shit is fast asf
register vs stack
but the compiler is so confusing
fr
i need to place comments
im not using stack based vms
in MY LIFE AGAIN
the last challenge will be making a chip 8 emulator but now i need to learn the basics of registers
and learn some optimizations when using registers
like
now im using 256 registers
but chip 8 only can use 16
and with my system im using 6 registers doing this
let aea = 2
let bea = aea * 2
bea
let cea = 2 + aea * bea
cea
return cea
i cant use reflaxe gscript 😔
Por?
vscode explota
Po???
exceso de clases
Pero si son pocas 😭
Osea juntando lime, OpenFL y Flixel juntos son casi lo mismo
Y contigo ha funcionado, cierto?
¿?
ademas que reflaxe usa pura macros
Pos que PC tienes para que se te muera
una laptop de hace 12 años
A gracias w
Dime procesador pe
creo que es porque nunca use un proyecto con 1731 clases y que se basara completamente en las macros
nvm
i realized that the more time passes, coding is becoming boring for me, that, i don't know why, makes me sad
im sleepy
this will be my last project and then i will take a long break
this time is real
its time to make the compiler
🍐 Jonk Stuff
omfg this is so boring
What does the language look like
its just hscript
but with a register based vm
thats all
I see
i cant replicate this 💔
including the error logs
is worthy to stay the the ⭐ pretty ⭐ logs?
ifuckinghatethecompilationtime
theinterpreterisfastasfuck
thefuckinglogsarekillingeverything
AAAH
struct User {
private let _name = ""
private let _password = ""
private let _status = "offline"
func constructor(name, password) {
if password.length < 8 {
throw "Password must have at least 8 characters"
}
self._name = name
self._password = password
}
func login() {
self._status = "online"
print(self._name + " has logged in.")
}
func logout() {
self._status = "offline"
print(self._name + " has logged out.")
}
func isOnline() {
return self._status == "online"
}
func info() {
print("User: " + self._name + " | Status: " + self._status)
}
}
let user = User("JonkIsKindaCool", "SuperSecret123")
user.login()
user.info()
user.setName("Webos")
user.info()
user.logout()
i need some opinions
this is fine?
and fuck hscript x
im making my own shit
if statements are working
while loops are working
how can i implement custom iterators
hmmm
where do i learn this :keoiki
the guy voice is relaxing
and he explains everything in a way that anyone can understand it
im just using structs
like
struct Counter{
private let max = null;
private let current = 0;
func constructor(max){
self.max = max;
}
func next(){
//Iterator end == null
if (current <= max) return null;
current += 1;
return current
}
}
for loop done
its time to work on... structs
D:
like, the final test is this shit
its my first time working with that kinds of objects sooo
luck to me?
parser is working yaay
oh
i think its working
oh wait no nvm
idk why but if i make a function in a struct and call it the program just goes to an infinite loop
ill fix it tomorrow
i hate string interpolation :3
adding bytecode
did i just created the most slower bytecode interpreter?
LOL
this is so fucking funny
||isxijfpsaklsxzxockoxzfkdsfdkpofkpoaskpowksfkodsfoksmckvsdokf'oerowefplskfpsvsxpomvplseamsdpmaspfamdpofmdspfmdspvmpoweoirjeroidsfpsdfmlmmdsmlfsdlmlc mdsdkfokori5ijt re kcnk k ok kks vkds dskv pkvc oiuouyyuioiuyklhgfhkel,ndvfewo,ijut nvcbtr||
im too lazy to make a registervm
its a lot of work for a project that im making for fun
😭
the most fastest thing would be making a stack based vm
but the amount of pop and push that i do make the program to go even slower than a normal interpreter
you know why not
im making the stack based
again...
with a direct threaded vm
well, kinda
idk if that is possible in haxe
ill be using maps?
idk
no, maybe arrays
my instructions are just ints
so i can just do
instructionHandlerinstruction
no, this is
when im not using the idea of the maps
and a register vm makes it even faster
thats why i dont like stack based

but im too lazy to make a register vm
yeah
but in the for loops is kinda slow
It's okay cuz the total result is literally 10ms faster
0.010ms*
xd
Yeah, I gotta say, average it out for more accurate results
Unless you're on a cpu with varying frequency like mine that is base 1.7ghz and turbo boost 3.5ghz
So yeah
i was going to do it but the test script is a bit heavy and i dont want to wait 3 minutes for 10,000 results to be made and take an average.
I've just had the best fucking day in my life as of right now
So do 1000 results
That's what
the result is the same as making one
and this is the final boss
its working on the normal interpreter
ast walker interpreter
i just discovered i can use private inside a function
wtf im seeing
what a shitty day omfg
its baaack
Why is it
a lot of bad news
working on some language features would relieve my stress, maybe while loops. i think i forgot to make objects
i guess its working
its not the fastest implementation
but it works
i guess im implementing creation of classes instances from haxe
you know, for using it in modding
That's literally faster than what you have
?
are you talking about the function calls or the creation of objects
haxe classes are working yaay
Idk what you showed on that screenshot
print function
well, function calss
calls
Oh
Well
Regular haxe traces slow down the stuff like a lot
Prints will always slow anything down
It's natural
i know that
It's the command prompt
sending things to the terminal output is really slow
functions calls with parents works perfectly
The new stack implementation is slower as opposed to this
?
Old version was From 0.19ms to 0.03ms and new version from 0.42ms to 0.15ms
what old version
Here
oh
That's literally what I showed you
its because im using type.createinstance
the example with the function to haxe classes
reflect and type are kinda slow
buti its the only choice that i have for now
So what did the old version use
its just a function call
What function call
bro i didnt change the print function
im just adding features
im not changing anything
Ok
it works in js yaaay
i dont wanna redo the struct system
🥺
but i wanna see the stack time
1ms for the structs
wow
thats slow
im highlighting this
yipie
snippets are functionals
pasa num p
wtf it works
holymoly
holy shit its really working
i just did
the easiest way to make blocks
another thing that i will always do ✅
!
kicosa
Shhhshh
Instala bun y vuelves a la felicidad
deno*
deno*
yo cuando al fin puedo hacer juegos en opengl usando javascript
vida buena
por eso odio los stack interpreters....
su tiempo de ejecucion es muy variado
vrg
lopuseenespañolporinstinto
nvm
i hate the stack interpreters
😔
they execution time is so random
specially if you are doing big loops
oh shit i was doing functions
fr this is easy
things to do:
- If Statements
- Assigment operations
- Structs....
and with that the stack interpreter is done
i like c++
i think i understant how cmake works
another day without using haxe 💔
cmake error
💔
bro wth 💔
why the build directory in cmakecache is different than the current directory where te project is
💔 🥀
idk, unreadable cmake error
im just using stb_image and uploading everything to the texture
😄
:D
yay finally
trying 3d in lime
ah shit, here we go again
recomendaria cambiar lo snombres de las carpetas
no tengo ideas 😔
and i forgot how messy is setting up opengl
anyway
i wanna test with bits manipulation
day one using peote view: i think i know how can i make spritesheets animations
hold on
Awesome
Sparrow atlas? If so, I'd steal
Because I want a sparrow atlas that's a whole buffer and program like I did intentionally for ordering
what
(sorry, today its my first time using peoteview)
What do youu mean "spritesheets animations"?
Do you mean sparrow atlas? Cuz I have an example of it right here
this is a spritesheet animation bro.
its just a image
with a bunch of frames
its the same logic
except that with a sparrow atlas you have to read the file and archive the frames
really nice experience tbh
i learned a lot about peote view this two hours
and i made my first optimization
lets goo
semmi approvement really made me happy xd
ohhh
how it looks can niz see it?
(Image, not code)
can i
wha-
srry i was sleeping
a simple system that automatically set a element to a buffer-program
based on the texture
so all the elements that are using the same texture exists inside one buffer-program
as it should be
idk how i could flip elements in peoteview
like
fliiping the texture coords that will be used in the buffer
that could be a solution
now the problem is how
how i can do it respecting peote view architecture
usa la lógica de scala -1
i dont in what format the elements send the data to the buffer
but if it works how i think
i think i can apply flipX
i have flipX
opengl necesita que le especifiques las coordenadas a motrar de la textura
solo voltee las coordenadas
i have my first farm
learning how to use nme
nvm
i wanted to use python as a scripting engine in haxe
but hxpy sucks (sorry vortex)
so im making a vm
lol
oh no
its says ident
and not indent
lol
sigh
only 6 expressions
and the parser is done
xd
then i just need to make the compiler
and then a vm using frames chunks and that stuff
the most annoying part is almost done
XD
icantsleep
El que queria hacer
aaaaaaaaaaaaaaah
try messing with math stuff like (60 * (60 * (60 * (60 * (60) * (60)))))
si aprendes lo basico de opengl puedes hacer uno funcional en menos de cinco horas
wha
in the vm?
✅
oh ok
Quería usar flixel
Y rehacer muchos backends
alright what gif is better
og catowl
wait i have a good one
Y ya que eso lo que haría sería modificar el flujo de trabajo
ohno
good.
aunque optimizar haxeflixel si seria un golazo
cambiando todo en el camino
i mean
primero modificaré lo esencial
Audio y Dibujado
Y meter todo como godot para temas de posiciones
porque genuinamente es muy intuitivos
ponle que tenemos algo así como un nodo padre
class NodeTest extends FlxNode
Y eso tendría automáticamente posiciones de X, Y
entonces
Si rienes un FlxSprite
Tomaría las posiciones del padre
Y sus posiciones locales
de que
global_position = parent.position + this.position
Eso haría que se borre FlxSpriteGroup
Y FlxTypedSpriteGroup
Y
Hacer un batch de draws
osea no hacer millones de draws
solo las necesarias
Que opinas?
@tall patio
ah y meter motor de físicas modular
de FlxPhisics
FlxG.phisycs = new FlxPhisics
y ahí se saque todo el tema de cosas necesarias
osea que Flxsprite solo se encarga de cosas de dibujado
lo de los batchs es buena idea
no solo es buena idea es algo que no sé por qué no está
y los nodos padre tmb
es complicado
cada shader de opengl tiene un maximo de texturas usables
Poeees sí pero es algo a favor de hacer atractiva la optimizacion
y eso que quita del batch
batch es ahorrar drawcalls
usando un solo buffer y programa
programa es igual a shader
y buffer donde se almacenan los datos
well, bye guys, im going to school
baiiii
helo
esta bien
nomas que tendrias que dejar de usar openfl o usar openfl de manera avanzada
porque
bueno, flixel tiene mucha dependencia a openfl
y la manera en la que dibuja cosas
es... peculiar
por decirlo de alguna manera
Cómo que dejar de usarlo
o usarlo avanzado
gulp
el renderizado en flixel es usando framebuffers
algo asi
copia los pixeles de los objetos a una camara
y creo que eso es mas caro que un drawcall comun
no c como optimizar esas cosas en openfl
por eso el dejar de usarlo
aunque de seguro hay maneras de hacer las cosas mejor
no uso openfl de manera avanzada hace como tres año
años
ea

ayayay
👀
papa lendo que hara en este chat mas muerto


