arthurmco / familyline-testbed Goto Github PK
View Code? Open in Web Editor NEWnice and fun RTS game about the adventures of family in the ancient era. Homebrew engine. Just starting. Shitty graphics are expected
License: MIT License
nice and fun RTS game about the adventures of family in the ancient era. Homebrew engine. Just starting. Shitty graphics are expected
License: MIT License
The logs say this:
[ 0.6116] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6120] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6120] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 1 does not have a defined base level and cannot be used for texture mapping.
[ 0.6364] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6368] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6368] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 1 does not have a defined base level and cannot be used for texture mapping.
[ 0.6612] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6617] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6617] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 1 does not have a defined base level and cannot be used for texture mapping.
[ 0.6859] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6863] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.6863] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 1 does not have a defined base level and cannot be used for texture mapping.
[ 0.7103] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.7107] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.7108] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 1 does not have a defined base level and cannot be used for texture mapping.
[ 0.7348] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
[ 0.7352] [debug] gl-debug-opengl-api: [#131204] low prio: other: Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping.
The objects render normally, though.
The warning is a low-priority one, but it appears a lot, so I want to investigate.
The reason is probably that textures are not mipmapped in this game, but I am not 100% certain
This can help: https://www.khronos.org/opengl/wiki/Texture#Mip_maps
Let's present this game to the wonderful, colorful kingdom of Tim Cook!
It might build, but I need help to see if it builds, either by someone gently doing this for me, or someone I know lending me a Macbook.
The current player->team->city dynamics is not good, barely exists.
I need to think of something better...
I want to port this engine, currently OpenGL, to Vulkan, because it is modern and everybody it's using.
But before, I wanna make the engine worth of be ported
Rename any place that says "game object" (including the GameObject
class) to "game entity"
I think this might be a better name, and other engines also call them entities, not objects.
Collada models, with the .dae
extension, are used in a lot of games and game engines.
It might be a good idea to support it.
I have an impression that the logic part of the game runs faster in faster PCs
It should not be like that.
The logic part should run at constant speed.
The graphical part of the game should run faster in faster PCs
Check this, and fix it if it's true.
The game is leaking memory. A lot.
Probably the fault is on the pathfinder, but only probably.
The images are more or less after 10 and 25 minutes of runtime, respectively
As you can see, its memory consumption is bigger than Chrome, a browser who is bullied for consuming a lot of memory.
This happens on Windows, but probably happens on other platforms too.
Please run this on Valgrind and check
At low framerates, the input picker hangs, and the objects are not inserted.
There are crashes sometimes, but it might not be related with the input picker.
This (https://github.com/Microsoft/vcpkg) might help us to manage library dependencies on Windows.
I might not need to make you download that weird zip full of libraries
The current input system does not sepparate inputs from actions. This can be bad if the user needs to switch the default keys to other keys of its liking
For example, separating the input of the letter 'Q` to the action of "Building a house"
Also, rewrite the player system to respond to the actions instead
The GUI subsystem has some problems
A complete rework of the gui subsystem is needed to fix that.
On Windows, the game crashes and freezes frequently, unlike on Linux, where this almost never happen.
Check what might be the cause
Start writing the game history.
I have a summary of the game history, but I'd like to write it, completely and nicely, somewhere, here.
Probably I'm going to use the wiki for that
But first...
Instead of initializing them on first use, allow US to initialize themselves, and init them in one single place in the main code.
Testing will be easier this way.
Someday, I wanna put this game on Steam.
This might require using some nonfree components, like the steamworks sdk, but we can make it an addon, and keep the rest of the game free.
https://github.com/fmtlib/fmt. Some games use it, too
It seems safer than printf
, because it checks type in compile-time
And is supported by vcpkg and cmake.
We might need to change every printf
and sprintf
call to functions inside this one
Redo the logic engine.
Go for a more message-oriented approach: instead of snooping into the object manager's object list, the object manager will send a message to the appropriate listeners whenever the object has been created or destroyed.
We might also define other operations alongside creation or deletion.
Work is being done on the dev/logic-engine-rewrite
branch.
We need to update the information inside the files in docs
folder, because they might be old and wrong.
Some things:
I want to define units and buildings outside the game binary, so the development of them becomes easier.
The language Lua seems a good choice, because it is used in a large number of projects successfully
But first
This debug drawer leaks more memory than Biroliro burns trees
On Windows, it is leaking 400 kb/sec more or less.
If the debug drawer is replaced by the dummy debug drawer (added on 467414c), those leaks stop occurring.
Do some research and find a nice way to animate our meshes.
Decide between mesh deformation or bone deformation, or support both (with different shaders, maybe? (Bone deformations are almost always processed on the GPU)
Any help in this subject is welcome!
Currently, support for animated meshes is poor.
We need to have it, so the game looks more dynamic, with moving constructions, like boats that moves their sails, or mills that moves their pads.
It needs to support mesh deformation, for simple animations, and skeletal animation, for more complex ones. It might need to support static ones, at least for now
The game crashes when running on Optimus hardware on Linux.
Seems a driver thing, because this does not happen on Windows
The output is:
[manjaro@manjaro-gnome build]$ sudo primusrun ./familyline
[ 0.0000] Familyline 0.1.97
[ 0.0000] built on Feb 13 2020 by manjaro
[ 0.0001] git commit is 1885a7b
[ 0.0001] Actual date is 2020-02-13 04:56:52
[ 0.0001] Default model directory is ./models/
[ 0.0002] Default texture directory is ./textures/
[ 0.0002] Default material directory is ./materials/
[ 0.7978] main: driver found: x11 (default)
[ 0.7979] main: driver found: wayland
[ 0.7979] main: driver found: KMSDRM
[ 0.7979] main: driver found: dummy
[ 0.7979] input-listener: Created input listener 'default'
[ 0.7979] input-manager: Adding listener order 0.000 for event mast 0xffffffff
[ 0.8760] init: KHR_debug supported
[ 0.8761] fb: creating framebuffer f3D: handle=0x1, size=640 x 480
[ 0.8762] gl-debug-opengl-api: [#131169] low prio: other: Framebuffer detailed info: The driver allocated storage for renderbuffer 1.
[ 0.8770] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <first> + <count> must be less than the number of combined texture image units.%
[ 0.8770] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. Function glTexCoordP3ui is deprecated and not available in preview contexts.
��%
[ 0.8770] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <coord> enum is invalid; expected GL_TEXTURE_GEN_STR_OES
[ 0.8770] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <coord> enum is invalid; expected GL_TEXTURE_GEN_STR_OES
[ 0.8770] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <first> + <count> must be less than the number of combined texture image units.%
[ 0.8771] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <texture> is not the name of an existing texture.
[ 0.8771] fb: completed: texhandle=0x1, rbohandle=0x1
[ 0.8771] fb: creating framebuffer fGUI: handle=0x2, size=640 x 480
[ 0.8771] gl-debug-opengl-api: [#131169] low prio: other: Framebuffer detailed info: The driver allocated storage for renderbuffer 2.
[ 0.8776] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <first> + <count> must be less than the number of combined texture image units.%
[ 0.8776] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. Function glTexCoordP3ui is deprecated and not available in preview contexts.
��%
[ 0.8777] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <coord> enum is invalid; expected GL_TEXTURE_GEN_STR_OES
[ 0.8777] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <coord> enum is invalid; expected GL_TEXTURE_GEN_STR_OES
[ 0.8777] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <first> + <count> must be less than the number of combined texture image units.%
[ 0.8777] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <texture> is not the name of an existing texture.
[ 0.8777] fb: completed: texhandle=0x2, rbohandle=0x2
[ 0.8777] input-listener: Created input listener 'gui-listener'
[ 0.8777] input-manager: Adding listener order 0.800 for event mast 0x7
[ 0.8822] gl-debug-opengl-api: [#131185] other: Buffer detailed info: Buffer object 3 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[ 0.8822] gl-debug-opengl-api: [#131185] other: Buffer detailed info: Buffer object 4 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[ 0.8822] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <first> + <count> must be less than the number of combined texture image units.%
640.00 480.00[ 0.8822] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. Function glTexCoordP3ui is deprecated and not available in preview contexts.
��%
[ 0.8823] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <coord> enum is invalid; expected GL_TEXTURE_GEN_STR_OES
[ 0.8823] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <coord> enum is invalid; expected GL_TEXTURE_GEN_STR_OES
[ 0.8823] gl-debug-opengl-api: (FATAL) [#1282] error: GL_INVALID_OPERATION error generated. <first> + <count> must be less than the number of combined texture image units.%
[ 0.8823] gl-debug-opengl-api: (FATAL) [#1281] error: GL_INVALID_VALUE error generated. <maxLength> must not be negative.��%
[ 0.8823] texture: Discovered texture max size: -1x-1
[ 0.8823] texture: (FATAL) Invalid texture max size. Something is wrong
[ 0.8823] gl-debug-opengl-api: (FATAL) [#1281] error: GL_INVALID_VALUE error generated. <maxLength> must not be negative.��%
[ 0.8823] texture: Discovered texture max size: -1x-1
[ 0.8823] texture: (FATAL) Invalid texture max size. Something is wrong
[ 0.8823] texture: maximum tex size: 0 x 0
[ 1.2121] gui-image-control: opening image './icons//familyline-logo.png'
[ 1.2121] gui-image-control: image has size 794.00 x 937.00
[ 1.2236] gl-debug-opengl-api: (FATAL) [#1280] error: GL_INVALID_ENUM error generated. <buffer> enum is invalid; expected GL_DEPTH_STENCIL.�
[ 1.2236] gl-debug-opengl-api: (FATAL) [#1281] error: GL_INVALID_VALUE error generated. Object handle does not refer to an object generated by OpenGL.
Segmentation fault
lspci output is
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev ff) (prog-if ff)
!!! Unknown header type 7f
Kernel modules: nouveau, nvidia_drm, nvidia
https://developer.apple.com/macos/whats-new/
Apple seems to have deprecated OpenGL in favor of Metal, their graphic API
So we need to support Metal if we want to run on Macs.
First part of the rendering improvements I want to add, just the sufficient for the future assets to look acceptable.
With those things, we might be able to receive nicer assets, like meshes and textures, and they will look, at least, good.
The compiler gives an error about something in the <optional>
header, and the error happens while parsing player_manager.cpp
GCC and Clang compiles this code.
Reversing the code do an early version (that did not have the optional header there) fails too. I suspect it is a bug in MSVC, but I am not sure.
This happens on the devel
branch, and curiosly on the master
too, when things ran perfectly fine
The compiler log:
...deleted...
[build] Generating Code...
[build] Compiling...
[build] player.cpp
[build] replay_player.cpp
[build] player_manager.cpp
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\optional(35,35): error C2131: expression did not evaluate to a constant [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\optional(35,35): message : failure was caused by call of undefined function or one not declared 'constexpr' [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\optional(35,35): message : see usage of 'std::nullopt_t::nullopt_t' [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\set(420,51): warning C4244: 'argument': conversion from 'const uint64_t' to 'int', possible loss of data [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\set(550,46): warning C4244: 'argument': conversion from 'const double' to 'float', possible loss of data [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\set(560,65): warning C4244: 'argument': conversion from 'const double' to 'float', possible loss of data [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\set(418,5): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] terrain.cpp
[build] terrain_file.cpp
[build] D:\Arquivos\Documentos\projects\familyline\familyline\src\common\logic\terrain_file.cpp(220,17): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\Arquivos\Documentos\projects\familyline\familyline\build\src\common\familyline-common.vcxproj]
[build] Tent.cpp
[build] WatchTower.c
...deleted...
The beginning (where you will find the version)
[build] result='-1'
[build] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
[build] -- Found ZLIB: optimized;D:/vcpkg/installed/x86-windows/lib/zlib.lib;debug;D:/vcpkg/installed/x86-windows/debug/lib/zlibd.lib (found suitable version "1.2.11", minimum required is "1")
[build] No support for windows + address sanitizer yet
[build] No support for windows + address sanitizer yet
[build] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
[build] -- Configuring done
[build] -- Generating done
[build] -- Build files have been written to: <...>/familyline/familyline/build/googletest-download
[build] Microsoft(R) Build Engine versão 16.9.0+5e4b48a27 para .NET Framework
[build] Copyright (C) Microsoft Corporation. Todos os direitos reservados.
[build]
[build]
Some state change subevents are very similar to object events.
Rename them to be clearer about their intents.
For example, ObjectState::Created
can be renamed to ObjectState::Ready
, because it means that the object is ready (building has finished being built, unit has finished being trained.)
Also ObjectState::Creating
can be removed as well.
We will continue to use Cairo to render the control, though.
Pathfinder seems to hang randomly on certain ocasions, inside a very time consuming loop inside the PathFinder.cpp
file, starting at line 183. Here is the loop
This causes the game to freeze
It do not seem to be related with position, object, terrain height of the origin or destiny
It also seem to be more common in Windows, but also happens in Linux as well, though more rarely.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.