Coder Social home page Coder Social logo

pjasicek / openclaw Goto Github PK

View Code? Open in Web Editor NEW
326.0 326.0 38.0 29.81 MB

Reimplementation of Captain Claw (1997) platformer

License: GNU General Public License v3.0

C++ 53.66% CMake 0.62% C 44.07% M 0.11% Objective-C 1.02% Lua 0.02% Shell 0.07% C# 0.31% Makefile 0.01% HTML 0.12%

openclaw's People

Contributors

bakasurarce avatar denispapec avatar krzema12 avatar loblik avatar pjasicek avatar ricorodriges avatar valpackett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openclaw's Issues

No background music during play

screenshot-2017-05-05_21 23 03
On Arch Linux, with installed and configured timidity (as suggested on #9 ) there is no audio output for background music.
I've tested timidity functionality with simple midi track file, and that seems to work.

Camera not moving down when Claw crouching

After several seconds, the camera should show what's below Claw. It's important for the gameplay because it may provide additional knowledge of the level.

Now, Claw just crouches.

Resource not found

Hi, I have compiled on ubuntu without error.
I put the file CLAW.REZ in to Build_Release, but when I run out the binary, I have this message :
ERROR: [VGetRawResourceSize] Could not locate: /states/menu/sounds/menubed.wav in rezArchive: CLAW.REZ
ERROR: [Load] Resource size return -1 => Resource not found. Resource: /states/menu/sounds/menubed.wav
Segmentation fault (core dumped)
Thanks for your works, and sorry for my english.

Level 2 Score screen is not implemented

When Claw kills LaRaux and picks the first gem, there should be a score screen, instead there is a failed assertion.

TODO: Implement Leve 2 score screen XML description and possibly modify score screen source files to accomodate gem cutscenes.

Not building on Linux anymore [Ubuntu 16.04]

Hello, I am getting compilation errors during building:
It started happening 2 merges ago.

[ 84%] Building CXX object CMakeFiles/captainclaw.dir/CaptainClaw/Engine/Resource/Loaders/AniLoader.cpp.o
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp: In member function ‘bool ZipFile::Init(const string&)’:
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:122:48: error: ‘fopen_s’ was not declared in this scope
fopen_s(&m_pFile, resFileName.c_str(), "rb");
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:172:27: error: ‘_MAX_PATH’ was not declared in this scope
char fileName[_MAX_PATH];
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:173:20: error: ‘fileName’ was not declared in this scope
memcpy(fileName, pfh, fh.fnameLen);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:175:42: error: ‘_strlwr_s’ was not declared in this scope
_strlwr_s(fileName, _MAX_PATH);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp: In member function ‘std::__cxx11::string ZipFile::GetFilename(int) const’:
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:270:22: error: ‘_MAX_PATH’ was not declared in this scope
char pszDest[_MAX_PATH];
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:271:16: error: ‘pszDest’ was not declared in this scope
memcpy(pszDest, m_papDir[i]->GetName(), m_papDir[i]->fnameLen);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp: In member function ‘bool ZipFile::Init(const string&)’:
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:133:39: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(&dh, sizeof(dh), 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:147:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(m_pDirData, dh.dirSize, 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp: In member function ‘bool ZipFile::ReadFile(int, void*)’:
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:310:37: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(&h, sizeof(h), 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:320:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(pBuf, h.cSize, 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:332:39: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(pcData, h.cSize, 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp: In member function ‘bool ZipFile::ReadLargeFile(int, void*, void ()(int, bool&))’:
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:384:37: warning: ignoring return value of ‘size_t fread(void
, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(&h, sizeof(h), 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:394:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(pBuf, h.cSize, 1, m_pFile);
^
/home/rtheren/Games/Claw/CaptainClaw/CaptainClaw/Engine/Resource/ZipFile.cpp:406:39: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread(pcData, h.cSize, 1, m_pFile);
^
CMakeFiles/captainclaw.dir/build.make:1598: recipe for target 'CMakeFiles/captainclaw.dir/CaptainClaw/Engine/Resource/ZipFile.cpp.o' failed
make[2]: *** [CMakeFiles/captainclaw.dir/CaptainClaw/Engine/Resource/ZipFile.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/captainclaw.dir/all' failed
make[1]: *** [CMakeFiles/captainclaw.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Level 2 - Cannon Rats have no logic

In Level 2, rats operating cannons have no logic, therefore do not do anything. They should stay on top cannon and fire the cannon once Claw gets to its agro range.

Weird Power Up bug

When Claw is powered up (cat nip, magic swords or other thing) if when pick up a new power up game crashes, but when I use Kazam screenrecorder, game works fine
image

Boss fight music

After boss death the music stop, I don't remeber exactly but I think in original game when boss is defetead the music continues to play

Unit tests?

Hi guys, I really appreciate your work here. However I noticed that there are no unit tests. Have you considered writing them? Do you have some thoughts about it? I don't have much experience with writing games, so maybe by any reason it's fine not to write them, but generally unit tests are invaluable e.g. as a safety net - they help to prevent regressions.

Level 2 Boss - La Raux - has no logic

Level 2 End boss La Raux does not have any logic. He should be a tough opponent for Claw with 100 hp. He should be immune to all projectiles (he should parry them). He should be able to leap away from Claw attacks. After his death he should spawn one own the 9 gems.

[Level 3] Implement Rope logic

Claw should be able to attach to existing ropes. Ropes should dangle back and forth left-right-left-right with predefined speed.

[Level 3] Implement PathElevator's logic

There are elevators which do not have one-way path but predefined, multi-way path., e.g. Top->Left->Down->Right, or it can be triangle-like way: Up->Down->Left

Roadmap: What's next

Okay, so today I finished making first level fully functional (atleast to my liking), though there are some little things that should be fixed / implemented in the future, mainly:

  • Sound attentuations - all sounds have the same origin, there is no mechanism to attentuate sounds ti fit its direction's origin
  • Slowly falling on the edges because of capsule shape - in original game when Claw went too close to the edge of platform / ground, he did not fall but he went into that ridiculous state where he was wawing his hands as to stop from falling down. I will surely implement this in the future but not now.

Besides this, I am pretty happy with the current result. So I will now focus on making other levels accessible ! I am especially looking forward to implementing boss fights - for that I intend to implement some simple LUA scripting hooks.

How I see the project going:

1.5: Completely working level 2 with its bossfight
1.6.: Levels 3 and 4 - for that I will need to implement some new behaviours, such as ropes (I am getting sick thoughts about how to hack it together like the rest of my physics) and the plant which shoots Claw upwards into the air (for this I will also need to hack my physics system)

After these levels are done, pretty much all mandatory ingame logics will be inplace. After finishing level 4 I intend to focus on optimizing the game for Android (mainly its controls, but also FPS could be higher).

Enemy attack AI states are not flexible

Right now enemy needs to have a new subclass for each possible attack state (stand-attack, stand-shoot, duck-attack, duck-shoot) just because of different agro fixtures attached to these states.

The code itself is almost exactly the same for each *AttackStateAIComponent, so to avoid code repetition, refactor the approach. Solution:

  1. Have only 1 class of attack state - AttackStateAIComponent
  2. In BaseAIStateComponent add m_StatePriority property - for example, stand-shooting should have higher priority than duck-shooting. Enemy should then duck-shoot only when enemy is also ducking, not when he is standing
  3. In BaseAIStateComponent create a pure virtual method - bool VCanEnterState() - use this for determining whether enemy can enter requested state or not. For example, for attack state enemy can only enter the state if there are enemies in his agro range. For patrol state, enemy can always enter patrol state (if he is not dying).
  4. When picking the next state, just loop through all BaseAIStateComponents and cann VCanEnter state and from that, pick the state with highest priority.
  5. Enemy agro fixtures have to be embedded into the AttackAIComponents themselves.
  6. I will probably need some kind of observer again for observing the actors (Claw) who will enter the agro range

Right now I will probably not implement it and stick with the rather more inflexible design as it is right now (I will just add 2 more states for duck-attack and duck-shoot and handle the state transition). But I want this to be visible for me here as a reminder as something I will need to fix in a future.

Enemies see through walls

It's easiest to reproduce it in Level 2, when climbing the first ladder. Stay on the ladder, about one of Claw's length from the top. The dog will see you and keep shooting.

After level ends, there should be score screen

After any level ends, either by killing boss or picking a map piece, screen with picked up treasures should be presented. After this screen is left (by pressing Enter or Escape), next level should be loaded.

BossWarp is not working

BossWarp, which should teleport Claw to the boss-fight area and trigger boss-dialogue and then boss-fight itself is not working.

Picking powerup should change background music for the duration

When Claw picks any powerup (Catnip, Fire Sword, invisibility...) the background music should change to /GAME/MUSIC/POWERUP.XMI.

When powerup runs out, the music should the return back to the original level music, but not to the beginning - to the time when it was when powerup music interrupted it

Actor's XML definitions are partially hardcoded in C++

Create a prototype map with pre-generated XML elements for actors.

e.g.:

Actor in level 1 - "Soldier" - have his prototype XML definition stored someplace (in game logic) and when he is instantiated, just replace appropriate values (Position, patrol area).

Throwing knives

The dogs with throwing knives are very fast, is possible to slow down little bit?

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.