Jump to content
FelixNemis

Puzzle Game Engine WIP (like CC but not)

Recommended Posts

So here's a thing I've been working on lately.

EDIT: new video

https://www.youtube.com/watch?v=GzUHMf7wNeM

 

old video:



I know it looks like yet another CC clone, but my goal for the project is not to recreate CC (well, kind of).
The idea is to make a CC-like puzzle game engine where I could make tiles and objects as easily as I could make levels.  So, while I could make a chip's challenge level with it, I could also make a different game entirely. 
Or maybe something like chip's challenge, but with different objects or rules, for example a block that enemies could push, or enemies that only move when you move.

Currently there's not much to it, but it already works like I want it to. Every element (and it's behavior) in the video is defined outside of the game itself (currently in a json file, need some sort of editor eventually).
The map is also a json file, made with the Tiled map editor.
The only exception to this currently is the keyboard controls and the camera.

There's still a ton of work to do though, I'm implementing CC elements right now as a way of seeing what features need to be available to create elements, and to see what works good and what doesn't.
I also need to make stuff like the controls and camera also configurable, as well as make a way to define UI elements (like a timer and inventory).
Then I'll also need a way to handle multiple levels, moving between them and all that goes along with that.

If you're actually interested in how things are defined, here's the definition of the green block shown in the video (multiple green blocks can be pushed in a row which I show at the very end)

 

    "1": {
      "name": "greenery-block",
      "moveTime": 200,
      "properties": {
          "presence": true
      },
      "onMoveAttempt": {
          "response": {
              "action-result": {
                  "default": "allow",
                  "cases": [
                      {"ids": ["move"], "mode": "all-false", "result": "deny"}
                  ]
              }
          },
          "actions": [
              {
                  "actionName": "moveEntity",
                  "actionParams": {"target": "self", "direction": "context"},
                  "id": "move"
              }
          ]
      },
      "onEnterTile": {
          "conditions": [
              {
                  "id": 1,
                  "conditionFunction": "checkForTile",
                  "conditionParams": {"tileName": "water", "offset": {"x":0, "y":0}}
              }
          ],
          "actions": [
              {
                  "ifCondition": 1,
                  "actionName": "changeTile",
                  "actionParams": {"type": "single", "changeTo": "greenery", "offset":  {"x":0, "y":0}}
              },
              {
                  "ifCondition": 1,
                  "actionName": "killEntity",
                  "actionParams": {"target": "self"}
              }
          ]
      }
    }

 



Anyway, just thought I'd share this here as somebody might be interested, and it helps to write out my progress on it anyways.
This is just a thing I'm doing in my spare time atm, but I'm quite enjoying it so I'll probably be posting more progress updates on it, if not I've either died or lost interest (or, more likely, I'm just too busy with "real" life to make much progress)

  • Upvote 4

Share this post


Link to post
Share on other sites

I made a lot more progress on this it's now possible to implement most of the elements from CC1, here's a video of me playing a copy of Nuts & Bolts
https://www.youtube.com/watch?v=GzUHMf7wNeM

 

I think the next thing I will work on is support for animated entities and tiles, and sound effects. I also need to make some sort of UI so you can see things like a timer and inventoryetc.

  • Upvote 1

Share this post


Link to post
Share on other sites

That is absolutely awesome.

 

Do you have any plans to make this open source?

Definitely, it's still in too early state for that, but once I've figured out how I want it to work I'll be open sourcing it.

The current version is made using javascript with Phaser (a javascript game engine that handles all the low-level stuff), but I think I'm going to have to eventually remake it in C++ (for performance reasons, mainly).  If I do that one will be open source as well.

Share this post


Link to post
Share on other sites

Another new video:

https://www.youtube.com/watch?v=UASiaMkX_GY

Featuring a new item: the cherry, and also featuring me failing at my own level.

 

Sound effects and inventory display are working, also loading new levels is working (not shown in the video), though no support for multiple level sets yet.
Animated tiles and entities still needs to be implemented, also dynamic handling of levels/levelsets and all of the assets they depend on.

  • Upvote 1

Share this post


Link to post
Share on other sites

very cool! I like this a lot! I like the graphics so far even if they're unfinished. I'm excited for a game that's similar to CC but different.

I have a ton of ideas for new tiles if you want to hear them. :P

 

How does that green monster work? At first it looked like a teeth but then it wasn't just following you because it went to collect that thing (cherries?). What does the cherry do?

Share this post


Link to post
Share on other sites

very cool! I like this a lot! I like the graphics so far even if they're unfinished. I'm excited for a game that's similar to CC but different.

I have a ton of ideas for new tiles if you want to hear them. :P

 

How does that green monster work? At first it looked like a teeth but then it wasn't just following you because it went to collect that thing (cherries?). What does the cherry do?

Sure, ideas for tiles are good, since it should be pretty easy to implement them and it will help me find things that need to be added to make them easier to implement.

 

The green monster uses almost exactly the same rule as the teeth monster, but they have the ability to have more than one target, so they'll go for the closest one, the cherry is basically just an entity that they target, just like the player.

 

On the subject of new tile ideas I've been working on an editor to make it easier for me (and eventually, other people) to add tweak tiles and entities, here's a screenshot:

OSUjcBe.png

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×