Code Monkey home page Code Monkey logo

octopuskit's People

Contributors

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

octopuskit's Issues

Contact Detection

First, let me say this is one hell of a useful library, and thank you for the hard work! I've ported most of my app (which used a homegrown ECS) to OctopusKit and everything is so much cleaner, and will probably be more performant when all is said and done.

The only thing I'm stuck on is getting contact events. Are PhysicsEventComponent and PhysicsContactHandlerComponent supposed to be added to the scene's entity or to the individual "monster" entities?

Thanks for any info!
Rob

[Help] Clarity on OKContainerView, OKGameCoordinator, OKViewController

Hi,

Reading over the documentation and I would like some help on the ContainerView, GameCoordinator, and the ViewController.

From the QuickStart Guide, I can see and understand how to use the project that is entirely SwiftUI.

I created a sample SwiftUI project that follows your Universal code.
I also have a project that is entirely UIKit and UIViewControllers (not using the storyboard, mostly generating buttons and labels in code).

I want to combine these two projects together. I cannot change the UIViewController project, however, I can change the SwiftUI OctopusKit project.

In your opinion, what is the best way to integrate these two projects together?

Thank you.

Compile target error

Category: 'Compilation'

Describe the bug
When I try to archive my iOS App, just after including this repo as a swift package dependency I get this error several time:

error: error reading dependency file '/Users/alberto/Library/Developer/Xcode/DerivedData/OctopusKitPoC-efudzfgceuckifblpxhfvqbvjsuy/Build/Intermediates.noindex/ArchiveIntermediates/OctopusKitPoC/IntermediateBuildFilesPath/OctopusKit.build/Release-iphoneos/OctopusKit.build/Objects-normal/arm64/OctopusKit-master.d': unexpected character in prerequisites at position 14049458 (in target 'OctopusKit' from project 'OctopusKit')

Then the archive generated is under the "other items" category inside the Organizer.

To Reproduce
Steps to reproduce the behavior:

  1. Start with a new 'iOS App SwiftUI' project
  2. Add this project as swift package dependency (development branch)
  3. In Xcode, Product->Archive
  4. Check the build process output

Expected behavior
Have a valid archive to distribute under the "iOS Apps" category in the Organizer.

Screenshots

Captura de pantalla 2020-09-25 a las 17 20 34

Captura de pantalla 2020-09-25 a las 17 20 17

Build Environment (what you're developing on)
- OctopusKit Version: '4.0.0.beta3 - development branch'
- macOS Version: '10.15.6 (19G2021)'
- Xcode Version: '12.0 (12A7209)'
- Swift Version: '5'

Target Device (what you're compiling for)
- Device: 'iPhone, iPad'
- Target OS Version: 'iOS14.0'

Focus not initially set in OKScene

Category: 'Behavior'

Describe the bug
I wouldn't categorize this as a bug, but I cannot for the life of me figure out how to set the focus (first responder) to the main window containing the OKScene without clicking inside it first. The result is that key commands are not being picked up until you click anywhere in the scene. I'm sure it's something simple I'm missing.

To Reproduce
Steps to reproduce the behavior:

  1. Pull my app's codebase: https://github.com/chessboy/biots
  2. Build and run the app (marvel at the nerd-beauty :) )
  3. Try to use the arrow keys to pan around the world
  4. Note the arrow keys do nothing and the Mac actually plays a beep tone to let you know you're typing into the void
  5. Click anywhere in the main window
  6. Use the arrow keys to pan around the world
  7. Now you can now pan around

Expected behavior
OKScene should be first responder when the scene is shown (I think)

Build Environment (what you're developing on)
- OctopusKit Version: '3.2.0'
- macOS Version: '10.15.7 (build)'
- Xcode Version: '12.0.1 (12A7300)'
- Swift Version: 'Apple Swift version 5.2.4'

Target Device (what you're compiling for)
- Device: 'macOS app'
- Target OS Version: 'macOS 10.15'

Additional context
Loving this framework... hope you like my app which builds heavily on OK!

GamePadDirectionEvent

Hello,

I find this project very interesting,. I checked the TODO and it said you were planning to work on Gamepad as Inputs. Is this something you are already working on. If not, I would be happy to contribute. But would like some discussion to make sure I do it the proper way as per the conventions set out for other input sources. Can we catch-up on gitter https://gitter.im/ or elsewhere?

  • P

Unable to add OctopusKit as dependency from develop branch.

Category: 'Import Failure'

Describe the bug
When following the instructions in the QuickStart README here -> https://github.com/InvadingOctopus/octopuskit/blob/master/QuickStart/README%20QuickStart.md the 2nd step fails when adding a dependency to the develop branch

To Reproduce
Steps to reproduce the behavior:

  1. Start with a new 'SwiftUI' single page application project as suggested in the README.
  2. Add a swift package dependency and specify this repository. https://github.com/InvadingOctopus/octopuskit
  3. Click next and select 'Develop' branch for version.
  4. Click next
  5. See error

Expected behavior
Proceed to add OctopusKit dependency to project.

Screenshots
Screenshot 2020-09-08 at 17 24 44

Build Environment (what you're developing on)
- OctopusKit Version: 'develop'
- macOS Version: '10.15.6'
- Xcode Version: 'Xcode-12 beta 6 (12A8189n)'
- Swift Version: '5.3'

Target Device (what you're compiling for)
- Device: 'AppleTV Simulator'
- Target OS Version: 'tvOS'

Additional context
The issue appears to be the deprecated MacOS flag in the manifest now that BigSur has been released.

How to get contact events triggered?

Category: 'Behavior'

Describe the bug
didBegin and didEnd of PhysicsContactComponent not getting called.

To Reproduce
Steps to reproduce the behavior:

  1. Start with a new 'SwiftUI/tvOS' project
  2. Follow instructions in https://invadingoctopus.io/octopuskit/documentation/guide.html#physics-collisions to setup two components to collide/contact with each other.
  3. Add the following code:
final class BunnyContactComponent: PhysicsContactComponent {

     func didBegin(_ contact: SKPhysicsContact) {
        print("hungry bunny")
    }
    
    override func didEnd(_ contact: SKPhysicsContact, entityBody: SKPhysicsBody, opposingBody: SKPhysicsBody, scene: OKScene?) {
        print("hungry bunny")
    }
}
  1. Build for 'tvOS'
  2. Run and perform these actions: Try to move the bunny around with a PointerControlledPositioningComponent and let it collide with a collectible component ( a carrot sprite with a physics body)
  3. Bunny pushes the carrot around without triggering the contact event

Expected behavior
didBegin/didEnd Contact event in BunnyContactComponent should be called

Screenshots
ezgif-2-5f05a32234ce

Build Environment (what you're developing on)

  • OctopusKit Version: 'develop'
  • macOS Version: '10.15.6'
  • Xcode Version: 'Xcode-12 beta 6 (12A8189n)'
  • Swift Version: '5.3'

Target Device (what you're compiling for)

  • Device: 'AppleTV Simulator'
  • Target OS Version: 'tvOS'

Additional context
The scene has the following setup in createContents

self.entity?.addComponents([sharedMouseOrTouchEventComponent, sharedPointerEventComponent, PhysicsWorldComponent(), PhysicsComponent(physicsBody: SKPhysicsBody(edgeLoopFrom: self.frame))])
        
        
self.componentSystems.createSystem(forClass: BunnyContactComponent.self)

OK v3.2.x Migration Guide

  • Category: Documentation
  • Target Platform: macOS

I'm excited about OK v4.0 and just wondering if there will be a migration guide... my project is fairly big. I will poke around now on a new branch and see if I can figure it out, but a guide would be super awesome! BTW, I am now supporting you on Patreon โ€“ Code Collaborator level. Hoping to make great things with you, ShinryakuTako, if that is your real name ;)

Swift Tools Version Error using SPM

Category: 'Package Import'

Describe the bug
Trying to import my favorite library :) into a new project and getting this error:

package at 'https://github.com/invadingoctopus/octopuskit' @ 4115ff2 is using Swift tools version 5.3.0 but the installed version is 5.2.0

I've updated to Xcode Version 11.6... do I need to upgrade to Swift 5.3 outside of Xcode's normal install?

Thanks for any help!
Rob

To Reproduce
Steps to reproduce the behavior:

  1. Start with a new 'SwiftUI' macOS project
  2. See error:
package at 'https://github.com/invadingoctopus/octopuskit' @ 4115ff2a63b0df684eca20367d59ffc22906faae is using Swift tools version 5.3.0 but the installed version is 5.2.0

Expected behavior
The package should import without error.

Screenshots

Screen Shot 2020-07-26 at 2 08 38 AM

Screen Shot 2020-07-26 at 2 03 43 AM

Build Environment (what you're developing on)
- OctopusKit Version: 'develop'
- macOS Version: '10.15.15'
- Xcode Version: '11.6 (11E708)'
- Swift Version:

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.5.0

Target Device (what you're compiling for)
- Device: 'macOS app'
- Target OS Version: 'e.g. macOS 10.x'

Additional context
Add any other context about the problem here.

'KeyboardEventComponent' is unavailable in iOS

Describe the bug
After trying to run the Quick Start guide steps I'm presented with a build error of 'KeyboardEventComponent' is unavailable in iOS - This seems to be in the source of the package rather than in the Quick Start files.

To Reproduce
Steps to reproduce the behavior:

  1. Follow Quick Start steps
  2. Build to iOS device
  3. See error

Expected behavior
Build to complete without errors

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Safari
  • Version: 10.15.3 (19D76)

Smartphone (please complete the following information):

  • Device: iPhone 11 Pro (12,3)
  • OS: iOS
  • Browser: Safari
  • Version: 13.3.1

[Help] Turning Debug Statements off

Hi,

I followed the instructions for adding this project to mine, however, I don't see a way to turn off the debug statements to the console.

Thanks.

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.