Kromster80 / kam_remake

"KaM Remake" is an RTS game remake written in Delphi from scratch.
http://www.kamremake.com
GNU Affero General Public License v3.0
355 stars 88 forks source link

on ARM linux (raspberry pi) #443

Open ghost opened 5 years ago

ghost commented 5 years ago

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.

LauraRozier commented 5 years ago

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.

ghost commented 5 years ago

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 :)

ghost commented 5 years ago

No wine? good!! that is an start!

ghost commented 5 years ago

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!

ghost commented 5 years ago

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

LauraRozier commented 5 years ago

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.

ghost commented 5 years ago

Ok! 😊

El jue., 11 de oct. de 2018 12:12, Thimo notifications@github.com escribió:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kromster80/kam_remake/issues/443#issuecomment-428990660, or mute the thread https://github.com/notifications/unsubscribe-auth/Alj6K2aWVNkFyx0_evfC_8a7TgEys9UBks5uj1_UgaJpZM4XUPk- .

ghost commented 5 years ago

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".

ghost commented 5 years ago

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

Kromster80 commented 5 years ago

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

ghost commented 5 years ago

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

ghost commented 5 years ago

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

LauraRozier commented 5 years ago

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)

ghost commented 5 years ago

Thanks thimo

El jue., 29 de nov. de 2018 20:33, Thimo notifications@github.com escribió:

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)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kromster80/kam_remake/issues/443#issuecomment-443033768, or mute the thread https://github.com/notifications/unsubscribe-auth/Alj6K5zqlbfVC1Laa_t6Uj2NDvB1a7PMks5u0G7DgaJpZM4XUPk- .

Kromster80 commented 5 years ago

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.

ghost commented 5 years ago

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.

LauraRozier commented 5 years ago

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.

ghost commented 5 years ago

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

ghost commented 5 years ago

2019-01-17-031354_1600x900_scrot

ok, WDC conditionals problem resolved. now its opengl.

LauraRozier commented 5 years ago

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

ghost commented 5 years ago

it should work. I will keep trying.

LauraRozier commented 5 years ago

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.

ghost commented 5 years ago

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.

LauraRozier commented 5 years ago

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.

ghost commented 5 years ago

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.

LauraRozier commented 5 years ago

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.

ghost commented 5 years ago

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

ghost commented 3 years ago

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