Giter VIP home page Giter VIP logo

cubosphere-code's Introduction

Cubosphere [reborn] 🏀 🎮

CircleCI (all branches) #cubosphere on the Freenode IRC network linux downloads Language grade: C/C++

A little story behind it

One upon a time on planet called Earth one man found a very very cool game called "cubosphere", but it was abandoned in 2011-12. He enjoyed it and dreamed that some day it could become great.

After a while, he decided to pick it up and at least make it look like a modern project, so others will be able to contribute easily.

This is why this organisation exists now.

What is this game about?

This project is a freeware game similar to the PSX game "Kula World" / "Roll Away". It is designed to be platform independent, written in C++ and using the following libraries: OpenGL, SDL2 (Simple DirectMedia Layer), Lua, GLSL-Shader and POCO.

Features

  • Game similar to Kula World
  • Over 450 levels in 34 different designs!
  • Starting from beta 0.3 — a lot of new stuff like magnets, gravity changers, and so on
  • Multiball feature and two-player-mode
  • Internal level editor!
  • 3D engine via OpenGL
  • GLSL Shaders
  • Joystick/Gamepad support

What have I already done to improve the game?

  • Moved to SDL2 from SDL1.2
  • Migrated to CMake
  • Separated data and code repos with auto ZIP
  • Fixed some warnings
  • Removed using namespace std;
  • Made code C++17 compatible (no warnings or errors)
  • Configured Cricle CI with auto .deb build for Ubuntu LTS + last release (read next section), cross-linux .tar.gz
  • Created icon and .desktop file
  • Moved editor manual to GitHub wiki which can be opened from editor menu
  • Added .png support and converted all textures to it, previews are saved in it too
  • Replaced self-patched minizip with POCO Zip

... and a lot of technical or smaller internal changes!

How to download the latest git build?

  1. Go to http://cubosphere.vallua.ru/artifacts (warning: only the last build artifacts are kept, some of them may be missing if a build is uploading now)
  2. Download the appropriate package (the naming scheme is Cubosphere-timestamp+git-hash-...)
  3. Install as normal (if you don't know how, just open the file and click the "Install" button or similar)

Ubuntu packages

Some notes on the Ubuntu packages:

  1. You need both BIN and DATA packages, they are cubosphere and cubosphere-data, respectively.
  2. It is OK that their versions differ, data is stored in another repo and updates with it
  3. When updating, download only BIN package: download DATA only if deps can't be resolved
    1. You'll probably be reqested to remove cubosphere when updating cubosphere-data, do so and install new version later
    2. Use dpkg -i from the command line to avoid this issue (google it for more info)

What will/should be done?

Check out the projects page!

How can I take part in this fun and make cubosphere great again?

You can:

  • Fork repo and make a pull request, or
  • If you have made a lot of contributions and I trust you then you can ask for direct write access
  • Test the game, report issues, and tell your friends about it
  • If you have experience with CMake on Windows or macOS, any help with it will be appreciated!
  • Join IRC (click the badge at the top of this page) and talk to me, other players and (if they are here!) team members
  • Support development on Beerpay, motivate using Beerpay

OK, some credits

You can find original homepage, codebase and developers at https://sourceforge.net/projects/cubosphere.

cubosphere-code's People

Contributors

qwertychouskie avatar v1993 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cubosphere-code's Issues

Requesting permission to make trailer

I would like to create a trailer for "Cubosphere" beta 0.04a,

Additional context
All I need is some sort of release date, and permission to use stuff as in game-play E.C.T
(Also I'm quite patient so don't test how patient I am, most likely you will run out of patience yourself.)

Build failed: 'lua_equal' was not declared in this scope

I fail to build Cubosphere. This is the make log:

[  9%] Building CXX object CMakeFiles/cubosphere.dir/src/console.cpp.o
[  9%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboactors.cpp.o
[  9%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboenemies.cpp.o
[ 12%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboboxes.cpp.o
[ 15%] Building CXX object CMakeFiles/cubosphere.dir/src/c3dobjects.cpp.o
In file included from .../cubosphere/cubosphere-code/src/cuboboxes.hpp:21,
                 from .../cubosphere/cubosphere-code/src/cuboboxes.cpp:15:
.../cubosphere/cubosphere-code/src/luautils.hpp: In member function 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int)':
.../cubosphere/cubosphere-code/src/luautils.hpp:224:15: warning: there are no arguments to 'lua_equal' that depend on a template parameter, so a declaration of 'lua_equal' must be available [-fpermissive]
    bool res = lua_equal(L, -1, -2);
               ^~~~~~~~~
In file included from .../cubosphere/cubosphere-code/src/cuboboxes.hpp:21,
                 from .../cubosphere/cubosphere-code/src/cuboactors.hpp:18,
                 from .../cubosphere/cubosphere-code/src/cuboactors.cpp:15:
.../cubosphere/cubosphere-code/src/luautils.hpp: In member function 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int)':
.../cubosphere/cubosphere-code/src/luautils.hpp:224:15: warning: there are no arguments to 'lua_equal' that depend on a template parameter, so a declaration of 'lua_equal' must be available [-fpermissive]
    bool res = lua_equal(L, -1, -2);
               ^~~~~~~~~
In file included from .../cubosphere/cubosphere-code/src/cuboboxes.hpp:21,
                 from .../cubosphere/cubosphere-code/src/cuboactors.hpp:18,
                 from .../cubosphere/cubosphere-code/src/cuboenemies.hpp:17,
                 from .../cubosphere/cubosphere-code/src/cuboenemies.cpp:15:
.../cubosphere/cubosphere-code/src/luautils.hpp: In member function 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int)':
.../cubosphere/cubosphere-code/src/luautils.hpp:224:15: warning: there are no arguments to 'lua_equal' that depend on a template parameter, so a declaration of 'lua_equal' must be available [-fpermissive]
    bool res = lua_equal(L, -1, -2);
               ^~~~~~~~~
In file included from .../cubosphere/cubosphere-code/src/c3dobjects.cpp:21:
.../cubosphere/cubosphere-code/src/luautils.hpp: In member function 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int)':
.../cubosphere/cubosphere-code/src/luautils.hpp:224:15: warning: there are no arguments to 'lua_equal' that depend on a template parameter, so a declaration of 'lua_equal' must be available [-fpermissive]
    bool res = lua_equal(L, -1, -2);
               ^~~~~~~~~
In file included from .../cubosphere/cubosphere-code/src/console.hpp:20,
                 from .../cubosphere/cubosphere-code/src/console.cpp:15:
.../cubosphere/cubosphere-code/src/luautils.hpp: In member function 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int)':
.../cubosphere/cubosphere-code/src/luautils.hpp:224:15: warning: there are no arguments to 'lua_equal' that depend on a template parameter, so a declaration of 'lua_equal' must be available [-fpermissive]
    bool res = lua_equal(L, -1, -2);
               ^~~~~~~~~
.../cubosphere/cubosphere-code/src/luautils.hpp: In instantiation of 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]':
.../cubosphere/cubosphere-code/src/luautils.hpp:242:44:   required from 'bool LuaCXXData<T>::LuaCheckType(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]'
.../cubosphere/cubosphere-code/src/luautils.hpp:241:16:   required from here
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: error: 'lua_equal' was not declared in this scope
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: note: suggested alternative: 'lua_rawequal'
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
               lua_rawequal
.../cubosphere/cubosphere-code/src/luautils.hpp: In instantiation of 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]':
.../cubosphere/cubosphere-code/src/luautils.hpp:242:44:   required from 'bool LuaCXXData<T>::LuaCheckType(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]'
.../cubosphere/cubosphere-code/src/luautils.hpp:241:16:   required from here
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: error: 'lua_equal' was not declared in this scope
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: note: suggested alternative: 'lua_rawequal'
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
               lua_rawequal
.../cubosphere/cubosphere-code/src/luautils.hpp: In instantiation of 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]':
.../cubosphere/cubosphere-code/src/luautils.hpp:242:44:   required from 'bool LuaCXXData<T>::LuaCheckType(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]'
.../cubosphere/cubosphere-code/src/luautils.hpp:241:16:   required from here
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: error: 'lua_equal' was not declared in this scope
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
make[2]: *** [CMakeFiles/cubosphere.dir/build.make:115: CMakeFiles/cubosphere.dir/src/cuboenemies.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: note: suggested alternative: 'lua_rawequal'
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
               lua_rawequal
make[2]: *** [CMakeFiles/cubosphere.dir/build.make:63: CMakeFiles/cubosphere.dir/src/c3dobjects.cpp.o] Error 1
make[2]: *** [CMakeFiles/cubosphere.dir/build.make:102: CMakeFiles/cubosphere.dir/src/cuboboxes.cpp.o] Error 1
.../cubosphere/cubosphere-code/src/luautils.hpp: In instantiation of 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]':
.../cubosphere/cubosphere-code/src/luautils.hpp:242:44:   required from 'bool LuaCXXData<T>::LuaCheckType(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]'
.../cubosphere/cubosphere-code/src/luautils.hpp:241:16:   required from here
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: error: 'lua_equal' was not declared in this scope
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: note: suggested alternative: 'lua_rawequal'
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
               lua_rawequal
.../cubosphere/cubosphere-code/src/luautils.hpp: In instantiation of 'bool LuaCXXData<T>::LuaTypeExtraCheck(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]':
.../cubosphere/cubosphere-code/src/luautils.hpp:242:44:   required from 'bool LuaCXXData<T>::LuaCheckType(lua_State*, int) [with T = JoyWrapper; lua_State = lua_State]'
.../cubosphere/cubosphere-code/src/luautils.hpp:241:16:   required from here
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: error: 'lua_equal' was not declared in this scope
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
.../cubosphere/cubosphere-code/src/luautils.hpp:224:24: note: suggested alternative: 'lua_rawequal'
    bool res = lua_equal(L, -1, -2);
               ~~~~~~~~~^~~~~~~~~~~
               lua_rawequal
make[2]: *** [CMakeFiles/cubosphere.dir/build.make:76: CMakeFiles/cubosphere.dir/src/console.cpp.o] Error 1
make[2]: *** [CMakeFiles/cubosphere.dir/build.make:89: CMakeFiles/cubosphere.dir/src/cuboactors.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/cubosphere.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I've got Arch Linux with these packages:

  • lua51 5.1.5-8
  • lua 5.3.5-2 (in other words, I have got both Lua 5.3 and Lua 5.1)
  • glew 2.1.0-1
  • sdl2 2.0.9-1
  • sdl2_ttf 2.0.15-1
  • sdl2_mixer 2.0.4-3
  • sdl2_image 2.0.4-2
  • poco 1.9.0-2

Note about POCO: Yes, I know the INSTALL file told me that I shouldn't use a POCO version before 1.9.1, but according to https://pocoproject.org/, the latest version is 1.9.0. shrug
Also, the errors don't mention POCO anyway.

READ VERY IMPORTANT

After having a good look, I see that this project is for Linux only. Unless there is some secret windows build I don't know about, create one. I have have some glitches to test E.G. using an elevator to clip through blocks or getting 2 balls in an exit at the same time.

Switch to PhysFS?

Poco is currently disabled for Windows builds in my local working copy due to me having infinite headaches trying to get it to build for Windows and be included properly into Cubosphere. Also, Poco is very large, providing a lot of functionality not needed.

Enter PhysFS. (https://icculus.org/physfs/) From the description, it sounds like exactly what we need, and if we use it we would likely be able to get rid of most of filesystem.cpp, likely leaving only a few wrappers and helpers for the Lua scripts.

PhysFS seems to be kept reasonably up-to-date (there was a bugfix release in March of this year), and is used by many programs, including SuperTux.

What are your thoughts?

CI broken

I pushed a dummy commit to trigger a CI build, but it immediately fails.

Crash (VERY ANNOYING MUST FIX)

Describe the bug
When you put a toggle able block over the player, the game crashes.

To Reproduce
Steps to reproduce the behaviour:

  1. Create/open any level
  2. Put the player somewhere.
  3. Create a toggle able block.
  4. Move the block over the player
  5. CRASH

Expected behaviour
I would expect it to just continuously say "Ball in block!" every time you spawn. (When you start play testing.)

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Any?
  • Version: Not sure what this means

Additional context
The "Expected Behaviour" section may be the cause of the bug. This is also a problem that needs fixing, due to the amount of work you lose if you get curios as to what happens when a toggle able block and the player collide.

Relicense assets to be DFSG compliant

Right now the assets are mostly "free-to-listen-to" or CC-BY-SA-NC. Assets should be relicensed to be DFSG (Debian Free Software Guidelines) compatible (preferably CC-BY-SA 4.0 International), or otherwise replaced.

Why is this needed?

Having assets with a non-DFSG-compatible license (or no license) means that Cubosphere can't be distributed on many platforms without potential issues; also, to have Cubosphere be packaged in Linux distributions requires properly-licensed assets.

Music

  • Aquatopia.mp3
  • Arabic Desert.mp3
  • Arctican.mp3
  • At the Speed of Light.mp3
  • Cave Ambient 2.mp3
  • Cavern of Memory.mp3
  • Core of the Storm.mp3 | Sent email
  • Corridors.mp3
  • Data Empire.mp3
  • Deep Man.mp3 (currently CC-BY-SA-NC 3.0)
  • Endless Day of Grass Field.mp3 (currently CC-BY-SA-NC 3.0)
  • Escape from the Citadel.mp3
  • Everything is Floating Upward.mp3 (currently CC-BY-SA-NC 3.0)
  • Heretical Mysticism.mp3
  • Hyperspace.mp3
  • Journey to the East.mp3
  • Jungle Bed.mp3
  • Melodies de Mars.mp3 (currently CC-BY-SA-NC 3.0)
  • Mindmangler.mp3 (currently CC-BY-SA-NC 3.0)
  • Never Stop.mp3 | In progress, https://www.newgrounds.com/audio/listen/337730
  • Orchestral Theme.mp3
  • Perfect Morning.mp3 (currently CC-BY-SA-NC 3.0)
  • Persian Invasion.mp3
  • Rose At Meridiem.mp3
  • Rose At Twilight.mp3
  • Ruin.mp3
  • Running through Greece.mp3
  • Space_Forest.mp3
  • Stellar.mp3
  • Sun and Rainfall.mp3
  • Thatianne and the Sylph.mp3
  • The Sun Will Come.mp3
  • Triumphant Returns.mp3
  • Ziggurat.mp3 (This is a remix of a MOD, may make things more complicated) | In progress, https://www.newgrounds.com/audio/listen/167762

Textures

  • TODO: Fill in list

SFX

  • TODO: Fill in list

Pro score

Is your feature request related to a problem? Please describe.
No. Well, not really. The “problem” is that there are a lot of collectibles that give you score but the score is not really meaningful in Explore mode. You never know how many % of all collectibles of a level you got.

Describe the solution you'd like
I have a suggestion for Cubosphere:

Add a “pro score” for each level, that is, the highest possible score for finishing a level perfectly or nearly perfectly.
This is something for the completionists out there. :-)
Also, otherwise there is no real motivation to go to collect everything in explore mode. You can't really know from the highscore alone if you have collected everything, broke as many blocks as possible, etc.
So an easy victory with only collecting the keys does not much different from a perfect victory.

Usually the score can be calculated automatically by simply adding up the score of all collectibles in the level (assuming it is always possible to collect everything, if not, pro score needs to be set manually).
The score may need to be calculated manually for levels with breakable blocks, since destroying those add to your score and you can not always assume that all of those blocks can be destroyed without losing.
I don't know if other actions add to your score as well, those things might be considered as well.

In explore mode, the pro score can be displayed below the current high score. The level in the level list says something like “Level 1 - Mastered” (instead of “Level 1 - Done”) for all levels where the pro score was beaten.

In the episodes selection screen, the 3 stars could also be displayed differently. Now silver stars are awarded for finishing the levels. The silver stars turn into gold stars when you master as much levels, in a similar manner as you earn the gold starts for finishing in current Beta 0.3.

E.g. You mastered all 15 levels in Egypt: 3 gold stars
Finished 15 levels, mastered none: 3 silver stars.
You finished 15 levels and mastered 14 of them: 2 gold stars and 1 silver star. (the first two silver stars “have turned into” the gold stars)
You mastered 14 levels: 2 gold stars
You finished 14 levels, mastered none: 2 silver stars.
I hope you get the idea.

It should not matter in which mode (arcade or explore mode) the player has mastered a level, it should be saved in both cases.

Describe alternatives you've considered
None.

Additional context
This is an old request I made to the original Cubosphere. It has been copied from https://sourceforge.net/p/cubosphere/discussion/1057812/thread/5c6ffaca/.

Daily .tar.gz build should bundle necessary libs

@cddepppp256 gets this error when running the bin:

 ./cubosphere: error while loading shared libraries: libPocoZip.so.60: cannot open shared object file: No such file or directory

The libs needed by Cubosphere should either be bundled or statically linked to avoid these types of issues.

Migrate to SDL2

SDL2 have various advantages, also some users can't compile SDL_ttf for SDL1.

Move manual to wiki

Having editor manual is bad idea because:

  • Binary
  • Hard-to-collaborate

GitHub have wiki for things like this, so it makes both things good: markdown and git-wiki-style collaboration.

Port to GLES

Porting to GLES would allow a port to mobile platforms. I don't know OpenGL, so any help is appreciated.

Stuck jumping in level beginning

Describe the bug
In some cases (require futher investegation) ball may stuck jumping in beginning of level when playing with joystick. To cancell issue, hold jump button and release it.

To Reproduce
Steps to reproduce the behavior:

  1. Play some levels with joystick
  2. Bug will occur at some point

Expected behavior
Never getting stuck jumping.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 18.10
  • Version: git e27109d

Additional context

  • Bug type: annoying misfunction
  • Affected component: in-level, joystick

Settings stay as is for a level, even after going to the menu.

Describe the bug
After exiting a game (exit has a non-existent level to go to) and going into the settings, the main menu disappears and you are left with level settings, rendering the game unplayable.
To Reproduce
Steps to reproduce the behaviour:

  1. Create a level
  2. Make the level as easy or as complicated as you like
  3. Leave the exit level as is
  4. Save and exit to the menu
  5. Open it in "User Levels"
  6. Finish the level.
  7. Go to settings.
  8. Bug

Expected behavior
The game would crash, like the other 2 versions of cubosphere.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: 100% Any OS.
  • Version [e.g. git eabc0b9]
  • (still dont know what /\ means)

Additional context

  • Bug type: Game meant to load non-existent level, does not crash
  • Affected component: Game, bricked Restart, required (to start playing again)

Set up windows build

Is your feature request related to a problem? Please describe.
Major amount of Cubosphere enthusiasts use Windows as their platform. Since there is no way we can force them to move to Linux, Windows build becomes a must.

Describe the solution you'd like
I'm mostly considering using cross-compilation since that seems much easier than making build task run on Windows.

Describe alternatives you've considered
Moving all people to Linux? But it is not remotely plausible.

Additional context
There was some work on Windows build, but I really dislike it since it was pretty much cargo-culted from another unrelated project. It also suggests to use their dependencies archive, which is a terrible idea in many ways.

[BUG] casting pointer to 32-bit int, likely cause of Windows crashes

qwerty@qwerty-Inspiron-3520:~/Eclipse/eclipse-workspace/Cubosphere/build-win$ make -j6
[  2%] Building C object lib/glew/CMakeFiles/glew.dir/src/glewinfo.c.obj
[  5%] Building C object lib/glew/CMakeFiles/glew.dir/src/glew.c.obj
[  8%] Linking C static library libglew.a
[  8%] Built target glew
[ 11%] Building CXX object CMakeFiles/cubosphere.dir/src/console.cpp.obj
[ 13%] Building CXX object CMakeFiles/cubosphere.dir/src/c3dobjects.cpp.obj
[ 16%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboboxes.cpp.obj
[ 19%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboactors.cpp.obj
[ 25%] Building CXX object CMakeFiles/cubosphere.dir/src/cubolevels.cpp.obj
[ 25%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboenemies.cpp.obj
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp: In function ‘int LEVEL_FileBegin(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp:981:41: warning: cast from ‘FILE* {aka _iobuf*}’ to ‘long unsigned int’ loses precision [-fpermissive]
  unsigned long int i=(unsigned long int)f;
                                         ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp: In function ‘int LEVEL_FileWrite(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp:989:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp: In function ‘int LEVEL_FileData(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp:996:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp: In function ‘int LEVEL_FileEnd(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/cubolevels.cpp:1005:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
[ 27%] Building CXX object CMakeFiles/cubosphere.dir/src/cubopathfind.cpp.obj
[ 30%] Building CXX object CMakeFiles/cubosphere.dir/src/cuboutils.cpp.obj
[ 33%] Building CXX object CMakeFiles/cubosphere.dir/src/definitions.cpp.obj
[ 36%] Building CXX object CMakeFiles/cubosphere.dir/src/events.cpp.obj
[ 38%] Building CXX object CMakeFiles/cubosphere.dir/src/filesystem.cpp.obj
[ 41%] Building CXX object CMakeFiles/cubosphere.dir/src/fonts.cpp.obj
[ 44%] Building CXX object CMakeFiles/cubosphere.dir/src/game.cpp.obj
[ 47%] Building CXX object CMakeFiles/cubosphere.dir/src/globals.cpp.obj
[ 50%] Building CXX object CMakeFiles/cubosphere.dir/src/glutils.cpp.obj
[ 52%] Building CXX object CMakeFiles/cubosphere.dir/src/joystick.cpp.obj
[ 55%] Building CXX object CMakeFiles/cubosphere.dir/src/keyboard.cpp.obj
[ 58%] Building CXX object CMakeFiles/cubosphere.dir/src/log.cpp.obj
[ 61%] Building CXX object CMakeFiles/cubosphere.dir/src/luamodules.cpp.obj
[ 63%] Building CXX object CMakeFiles/cubosphere.dir/src/luautils.cpp.obj
[ 66%] Building CXX object CMakeFiles/cubosphere.dir/src/main.cpp.obj
[ 69%] Building CXX object CMakeFiles/cubosphere.dir/src/matrixutils.cpp.obj
[ 72%] Building CXX object CMakeFiles/cubosphere.dir/src/models.cpp.obj
[ 75%] Building CXX object CMakeFiles/cubosphere.dir/src/mouse.cpp.obj
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::SAVE_Open(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:777:41: warning: cast from ‘FILE* {aka _iobuf*}’ to ‘long unsigned int’ loses precision [-fpermissive]
  unsigned long int i=(unsigned long int)f;
                                         ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::SAVE_Write(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:785:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::SAVE_Close(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:793:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::SCORE_Open(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:828:41: warning: cast from ‘FILE* {aka _iobuf*}’ to ‘long unsigned int’ loses precision [-fpermissive]
  unsigned long int i=(unsigned long int)f;
                                         ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::SCORE_Write(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:836:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::SCORE_Close(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:844:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::CONFIG_Open(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:1014:41: warning: cast from ‘FILE* {aka _iobuf*}’ to ‘long unsigned int’ loses precision [-fpermissive]
  unsigned long int i=(unsigned long int)f;
                                         ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::CONFIG_Write(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:1022:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp: In static member function ‘static int LuaCuboLib::CONFIG_Close(lua_State*)’:
/home/qwerty/Eclipse/eclipse-workspace/Cubosphere/src/luautils.cpp:1030:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  FILE *f=(FILE *)c;
                  ^
[ 77%] Building CXX object CMakeFiles/cubosphere.dir/src/posteffects.cpp.obj
[ 80%] Building CXX object CMakeFiles/cubosphere.dir/src/shaderutil.cpp.obj
[ 83%] Building CXX object CMakeFiles/cubosphere.dir/src/skyboxes.cpp.obj
[ 86%] Building CXX object CMakeFiles/cubosphere.dir/src/sounds.cpp.obj
[ 88%] Building CXX object CMakeFiles/cubosphere.dir/src/spriteutils.cpp.obj
[ 91%] Building CXX object CMakeFiles/cubosphere.dir/src/textures.cpp.obj
[ 94%] Building CXX object CMakeFiles/cubosphere.dir/src/themes.cpp.obj
[ 97%] Building CXX object CMakeFiles/cubosphere.dir/src/vectors.cpp.obj
[100%] Linking CXX executable bin/cubosphere.exe
[100%] Built target cubosphere
qwerty@qwerty-Inspiron-3520:~/Eclipse/eclipse-workspace/Cubosphere/build-win$ 

According to https://stackoverflow.com/a/11797049/4901968 this will cause instability. A quick google shows https://github.com/benpop/lua-int64, in the mean time I'll try a 32bit build to see if it behaves differently.

Another solution might be to maintain an index/list/etc in the CPP and let the Lua scripts refer to the files by index, not pointer.

Port to Lua 5.3

Probably we can use add_definitions("-DLUA_COMPAT_5_1"), but it needs to be tested.

Is 'http://cubosphere.vallua.ru/artifacts' down?

Describe the bug
When ever I try to go onto the website with the git builds, the website returns with this error: DNS_PROBE_FINISHED_NXDOMAIN
Is anyone else experiencing this?

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'http://cubosphere.vallua.ru/artifacts'
  2. Get the error

Expected behavior
Go on the website.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu Linux
  • Version NONE

Repo is unclonable

Dear @qwertychouskie, this project use CircleCI for automated builds. It have failed on your last commit.

Click on build: failing sign on main repo page and write results to me. While commit looks innocent enough by itself, you should learn a bit about that CI (check do you have access to it, setup notifications).

Please report results here.

Use modern OpenGL

Is your feature request related to a problem? Please describe.
If we want to make it possible to port cubosphere to mobile world, using OpenGL 3.1+ is simply a requiment.

This will be huge work, and lua shaders will be just gone, but it is just required.

Describe the solution you'd like
Replace Fixed Pipeline with Programmable one, i.e. GL shaders + VBO.

Describe alternatives you've considered
There are two of them:

  1. Throw out cubosphere and write cubosphere 2.0 from int main. Looking at all arhitecture flaws and problems, it is probably a right way…
  2. Just ignore entire problem and use OpenGL 2.0.

Additional context
Nope.

Incorrect settings menu

I've discovered a bug which can be reproduced this way:

  1. Complete level as normal
  2. Select Select level
  3. Return to main menu
  4. Select options: in-level version will appear
  5. When you'll select Ok or press Esc, back screen will appear and only way to exit it will be closing window.

Seems that Select level doesn't reset in-level state.

"Device" option does nothing

In SDL1.2 there was option "Device" which was used to turn on/off GPU renderer.

Seems that there is no such option in SDL2, so it shoud be removed/replaced with another one.

Can't view messages

Describe the bug
It is not possible to view the tutorial messages (the little speech bubbles). I tried pressing all the keys, tried reconfiguring the keys, tried keyboard and joypad, tried the Special key and everything else. Nothing works.

To Reproduce
Steps to reproduce the behavior:

  1. Start level 1 Egypt
  2. Try to view any messages
  3. Press all the keys including the Special key, fail every time

Expected behavior
Message opens.

Reference
In the original Cubosphere Beta 0.3a, there was a little overlay when I was at a message block, saying I can press the Special key to open the message. When I pressed this key, the message opened.

Version
3397939

Create issue template

There should be an issue template. Ex.:

## Type of issue
 * Graphics 
 * Menus
 * Other: (type)
## Issue description
...

Insane FPS value

There are a lot of things which I can believe, but 500+ FPS is too much!

I think that SDL2 have changed something in timers.

Include the level send thingy from the OG manual?

Is your feature request related to a problem? Please describe.
IDK if this has been done already, but i'm just wondering if anyone is intrested to get levels from users (for that potential beta 0.4 (if it ever happens)).
If this has already happened, please let me know where it was stated.

Where is cubosphere located?

Is your feature request related to a problem? Please describe.
I was just wondering where cubosphere is located. I'm kind of new, because i just switched a few months ago.

Can't compile

Error:

In file included from /media/user/A8847AB1847A819C/Source/cubosphere-code/src/cuboactors.hpp:19:0,
                 from /media/user/A8847AB1847A819C/Source/cubosphere-code/src/cuboactors.cpp:15:
/media/user/A8847AB1847A819C/Source/cubosphere-code/src/cubolevels.hpp: At global scope:
/media/user/A8847AB1847A819C/Source/cubosphere-code/src/cubolevels.hpp:125:15: error: ‘TraceResult CuboLevel::TraceLine(Vector3d, Vector3d, int)’, declared using unnamed type, is used but never defined [-fpermissive]
   TraceResult TraceLine(Vector3d start,Vector3d dir, int onlyblocking=0);
               ^~~~~~~~~
In file included from /media/user/A8847AB1847A819C/Source/cubosphere-code/src/cuboactors.hpp:19:0,
                 from /media/user/A8847AB1847A819C/Source/cubosphere-code/src/cuboactors.cpp:15:

Game crashes after trying to change any option to do with numbers

Describe the bug
IDK if its a me thing, but every time i try to change a one way arrow direction, the game crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Create a level
  2. Place 1 way arrow
  3. Press V
  4. Press enter

Expected behavior
I would be able to edit the direction.

Screenshots

Desktop (please complete the following information):

  • OS: Lubuntu
  • Version:

Replace non-standard lua extentions with .lua

I have this list for now:

<?xml version="1.0"?>
 <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/x-lua">
    <comment>Lua script</comment>
    <glob pattern="*.adef"/>
    <glob pattern="*.ldef"/>
    <glob pattern="*.bdef"/>
    <glob pattern="*.edef"/>
    <glob pattern="*.idef"/>
    <glob pattern="*.mdef"/>
    <glob pattern="*.pdef"/>
    <glob pattern="*.sdef"/>
    <glob pattern="*.tdef"/>
    <glob pattern="*.themedef"/>
    <glob pattern="*.inc"/>
  </mime-type>
 </mime-info>

[TODO] [GCC] Use standard struct definitions

TODO for myself: I need to change all structs like:

using TraceResult = struct {
	int hit;
	float dist;
	int block;
	int side;
};

to:

struct TraceResult {
	int hit;
	float dist;
	int block;
	int side;
};

Not sure why these were all defined in this way, but at least the given example freaks out GCC. @v1993 Any idea why these are all defined this way?

D-pad does not work

Describe the bug
The d-pad of joypads is ignored.

To Reproduce

  • Use the controls menu to change joypad / gamepad controls
  • Now try to assign controls to a d-pad button (I failed)

Expected behavior
I can assign d-pad buttons.

Other notes
The gamepad is at least recognized by the game. I am able to assign buttons and axes. It's only the d-pad which fails atm.

Version
3397939

Add joystick support in menus

Joysticks are not usable in main menu, which is probably pretty painful for some players and don't look OK for me at all.

SDL2 joysick system is required first.

[BUG][Regression] Saving in Classic Mode doesn't work

Describe the bug
Saving your progress in Classic mode results in a softlock

To Reproduce
Steps to reproduce the behavior:

  1. Go to Classic Mode
  2. Start a new game
  3. Play until it asks if you want to save
  4. Choose Yes, the world will keep spinning but nothing will happen.

Expected behavior
It saves, then lets you continue.

Desktop (please complete the following information):

  • OS: Xubuntu 18.04
  • Version: 1546352586+git-ca1b0eafa7d7620f8282fd59e75efc3b5509cdbe-bionic

No button/axis numbers

Describe the bug
Open joystick config. All axis will be numbered like Axis 1 and all buttons like Button 0

To Reproduce
Steps to reproduce the behavior:

  1. Go to Joystick controls menu
  2. Assign some key/axises to actions
  3. See that all of them are Axis 1 and Button 0

Expected behavior
Different buttons/axises produce different numbers.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 18.10
  • Version: git e27109d

Additional context

  • Bug type: not vital misbehavior
  • Affected component: options

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.