Kromster80 / kam_remake

"KaM Remake" is an RTS game remake written in Delphi from scratch.

Home Page:http://www.kamremake.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

on ARM linux (raspberry pi)

opened this issue · comments

Loved this game and your remake. I know its a difficult task, but i think the raspberry pi matches all the specs needed to run these game (opengl include). Could I ask if it possible to compile it on raspberry (with lazarus) and use wine to run it natively (not emulated) like I did with other "windows" arm recompiled apps. It could be an amazing port to ARM. so, if you tell me that its possible than something like that could work I will try it. I know it will try to use some windows API, so I need to know if at least if possible to make it run, theoretically. it could take me a long time to compile it (because of a lack of knowledge), so I need at least some hope before start.

commented

With Laz you can cross-compile to any architecture, but the issue is the random bits and bobs of assembler. I think those are x86/x64 only... I could theoretically try to compile it once and try it on my B+
The real issue is that you can not play with "official" releases, as the security check won't allow this.
I did already work on a full-on linux-dist build and it works without wine.

Thanks for the quick answer. I follow your work from long time ago. This game has some economic mechanics were never present on another SRT games. if you could test it on your own pi I will appreciate that so much. I have a copy of the game and just need it on my pi because it should can :)

No wine? good!! that is an start!

2018-10-11-103845_1600x900_scrot
could you give me a little explanation of how to compile it? because its different from windows to linux. I dont know how to git revert the files from the replaced .data folder for example (following this guide https://github.com/Kromster80/kam_remake/wiki/ProjectCompilation). I only used git revert before to get revert a commit. please note than I am just a newbie than love this game my mail its salva.liebana@gmail.com . thanks to everything!

I use "git pull origin master" just in case it could help... but I barely think that.
so, I continue and when compiling this come out:
2018-10-11-104736_1600x900_scrot

commented

From Krom his repo you are unable to compile to Linux, this is broken and not supported. I have a fork with a specific branch I was using for Linux compilation.
I am just looking for time (Of which I don't have a lot) to test it on my own Pi, then I could help out.

Hi Thibmo! I know than you dont have so much time to give me some help! I am sorry if I am getting heavy on this, its only because I love this game and want to remind you than I count on you. Ive tested your linux client branch but unsuccesfully :( . seems broken to me, not an arm or x86 warning. just an "Error: Function is already declared".

nothing yet? sorry if you find me a little dens. I love to get this game working on rpi

@Askmewho please attach the exact error message you are getting. It is behind the hint on the above screenshot ..

Free Pascal Compiler version 3.0.0+dfsg-11+rpi1+deb9u1 [2017/07/27] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling KaM_Remake.dpr
(3104) Compiling src/KM_FormMain.pas
(3104) Compiling src/render/KM_RenderControl.pas
(3104) Compiling src/ext/KromOGLUtils.pas
(3104) Compiling ./src/ext/dglOpenGL.pas
(9009) Assembling dglopengl
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(41,10) Warning: (5033) Function result does not seem to be set
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(43,3) Note: (5025) Local variable "nPixelFormat" not used
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(44,3) Note: (5027) Local variable "PixelDepth" is assigned but never used
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(147,25) Warning: (5036) Local variable "NumFormats" does not seem to be initialized
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(147,8) Warning: (5036) Local variable "ValidFormat" does not seem to be initialized
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(149,17) Warning: (5036) Local variable "pixelFormat" does not seem to be initialized
(9009) Assembling kromoglutils
(3104) Compiling ./src/ext/LazarusOpenGL/openglcontext.pas
(3104) Compiling ./src/ext/LazarusOpenGL/glgtkglxcontext.pas
(9009) Assembling glgtkglxcontext
(9009) Assembling openglcontext
/home/pi/kam_remake/src/render/KM_RenderControl.pas(33,17) Note: (3250) Virtual method "DoOnResize;" has a lower visibility (private) than parent class TControl (protected)
(9009) Assembling km_rendercontrol
(3104) Compiling src/KM_Settings.pas
(3104) Compiling src/KM_Resolutions.pas
(3104) Compiling src/common/KM_Defaults.pas
(9009) Assembling km_defaults
/home/pi/kam_remake/src/KM_Resolutions.pas(83,3) Note: (5025) Local variable "I" not used
/home/pi/kam_remake/src/KM_Resolutions.pas(83,5) Note: (5025) Local variable "M" not used
/home/pi/kam_remake/src/KM_Resolutions.pas(83,7) Note: (5025) Local variable "N" not used
(9009) Assembling km_resolutions
(3104) Compiling src/KM_WareDistribution.pas
(3104) Compiling src/res/KM_ResWares.pas
(3104) Compiling src/res/KM_ResTexts.pas
(3104) Compiling src/ext/KromUtils.pas
/home/pi/kam_remake/src/ext/KromUtils.pas(62,13) Error: (3120) Function is already declared Public/Forward "SwapInt(var LongWord;var LongWord);"
/home/pi/kam_remake/src/ext/KromUtils.pas(81,25) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode

I use the branch linux-client on the fork of thibmo

commented

Setting up a RPi with guacamole at the moment, crosscompile from the Windows machine just ended up in a linker error so I'll try it this way (saves me having to add yet another monitor to the desk)

KromUtils.pas(62,13) Error: (3120) Function is already declared Public/Forward "SwapInt(var LongWord;var LongWord);" is likely caused by type collision - both Cardinal and NativeUInt map to LongWord on your system. You might need to ensure that WDC conditional define is turned off.

Couldnt make it (basically, I dont know how to turn off WCD conditional define on lazarus). thibmo, if you make any progress please contact me, my mail its salva.liebana@gmail.com . thanks for everything guys. you all made the best remake possible for the most underrated RTS game of all time.

commented

The WDC define DOES NOT exist within lazarus.
Only the FPC define exists. WDC is a customly set define that is set via the .inc file in the repo root. It is only set when a delphi-specific conditional define is set.

ok, btw, whats the opengl needed on this project? because vc4 mesa driver its only 2.1 capable

2019-01-17-031354_1600x900_scrot

ok, WDC conditionals problem resolved. now its opengl.

commented

KaM Remake requires:
– 500MHz or faster processor;
– 256MB or more of RAM;
– 3D graphics accelerator OpenGL 1.4 compliant;
– Sound card.

it should work. I will keep trying.

commented

Which branch are you using, btw?
I mainly work from the Linux-native-game-client branch on my fork.
It has (most of?) the modifications by Rey and should compile to "normal" GNU/Linux systems.

Yes, i am on that branch. could you give me a few instructions of how to compile it, what the project I have to open on lazarus, etc. because its a mess and maybe its not the same procces like on windows compilation.

commented

In Laz you just have to open the file KaM_Remake.lpi
Then you compile ot for your system, with Laz you have to clean before you rebuild the sources.

Hi, thibmo. One last thing. Have you any linux binary release? I will try it under emulation. It will be easier if you could supply a binary.

commented

Sadly I don't. There is also the fact that CPU architectures have to match, if a binary is compiled for x86 it won't run on ARM, etc.

Yeah. But i wanna run trought emulation... X86 emulation. But its ok.

https://youtu.be/yORdTDzlUds years later. it's now possible!!! that being said rpi4 is too weak on the gpu to run it perfectly, my rk3399 does a much better job. @thibmo @Kromster80