https://kotlinlang.org logo
Title
p

Pere Casafont

02/25/2018, 6:55 PM
has anyone considered to write a game engine in kt native?
o

orangy

02/25/2018, 7:08 PM
I’ve made something with SDL2, but I didn’t went too far because of time constraints
p

Pere Casafont

02/25/2018, 8:39 PM
I see, maybe it will be more worth it when it gets out of
0.*
o

orangy

02/25/2018, 8:42 PM
I mean, it works, but it’s not even near something you can call a “game engine” 🙂 Just some SDL2 wrappers, a little bit of game loop, event processing and some very rough drafts on UI, scenes, and other composition ideas.
I never made a game, so for me it is more of an exploratory story 🙂
e

elect

02/25/2018, 10:29 PM
have you maybe got some performance metrics?
p

Pere Casafont

02/26/2018, 1:08 AM
I did some game engines in cpp and it's so tedious to code in that language... I hope someday kotlin becomes a good alternative for engines' native code!
o

orangy

02/26/2018, 7:07 AM
@elect other than it works at 60fps with vsync for simple hex grid rendering, no. I added something like dropwizard metrics to gauge various phases of game loop, but didn’t spend a lot of time on that. Also it was like several months ago and K/N got a lot of perf optimizations since then.
o

olonho

02/26/2018, 7:37 AM
IMO, the best usecase of Kotlin, including K/N in gaming is not developing an engine from scratch (especially modern 3D one), but using it as a scripting engine for existing engine
o

orangy

02/26/2018, 7:40 AM
I don’t think we are talking professional game engine here :) there is always a place for fun in life, why can’t it be K/N game engine?
p

Pere Casafont

02/26/2018, 9:11 AM
why wouldn't a modern 3d engine be a good use case? nowadays most computations are done in the gpu anyways
o

orangy

02/26/2018, 10:15 AM
Because it’s a lot of work, I suppose. And requires specific expertise. If you have time & knowledge – you’re welcome! 😄
p

Pere Casafont

02/26/2018, 10:20 AM
I may do something opensource using jvm and lwjgl3, and once native tooling improves it should be pretty straight forward to move to native, shouldnt it?
e

elect

02/26/2018, 10:32 AM
what do you have in mind, @Pere Casafont?
p

Pere Casafont

02/26/2018, 11:56 AM
I have a small game engine with networking written in java for hobby, but it got polluted with game specific code and I'm not in the games industry anymore so maybe I will opensource it
the game was a moba prototype trying to copy league of legends, just for the lols
e

elect

02/26/2018, 3:41 PM
cool