GithubHelp home page GithubHelp logo

adamnemecek / cocoshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrew0/cocoshop

0.0 1.0 0.0 17.59 MB

Visual editor for cocos2d

License: Other

Objective-C 92.20% C 7.15% Csound Document 0.64%

cocoshop's Introduction

NOTE: Cocoshop is no longer being maintained, as it has been superseded by SceneDesigner ( https://github.com/andrew0/SceneDesigner ).

Cocoshop - Open Source Visual Editor for Cocos2D

Cocoshop is a tiny, easy to use visual editor for Cocos2D-iPhone Engine, that can be used for designing menus, game scenes and even levels.

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
   
    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.
   
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
 

Philosophy

Cocoshop idea is to have minimum can't-live-without features, that will let developers easily create graphics part of cocos2d projects.
If some feature of Cocos2D can be supported only by CSDReader - it shouldn't be included in Cocoshop.
I.E. spriteSheets - a lot of work needed to add & debug CCSpriteBatchNode support to Cocoshop Editor.
It's much easier just to load sprites with CSDReader using spriteBatchNode in your project.
(Example: https://github.com/andrew0/cocoshop/blob/release-0.1/CSExamples/Classes/CSDTests.m#L211 )

Features

In cocoshop you edit a node. Currently it supports background and sprites.
You can change the size of the node, change it's background color & opacity.
You can add sprites by drag&drop them to the main window, or by clicking 'Add Sprite' toolbar item.

Sprites have unique names, that you will use to distinguish individual sprites in your application code.
Sprites can be positioned/scaled/rotated with mouse, keyboard shortcuts, trackpad gestures and the Sprite Info Window.

How to use Cocoshop

  1. Prepare your sprites images. It's better to have csd and sprites in one folder.
  2. Launch cocoshop, set stage size, background color & opacity in Info Window.
  3. Drag&Drop your sprites to the Cocoshop's main window.
  4. After editing - save csd file and import folder with csd & sprites to your project.
  5. Import CSDReader.h, CSDReader.m, CSDElement.h, CSDElement.m to your project (located in 'CSDReader' folder)
  6. Load csd file & setup your node with CSDReader
    CSDReader *csd = [CSDReader readerWithFile:@"example1.csd"];
    CCNode *aNode = [csd newNode];  
    [self addChild: aNode];  

Note: Take a look at CSExample1.xcodeproj in this repo's root for more info about using CSDReader & CSDElement's

Keyboard Shortcuts

File

  • CMD + N - New Project (Warning: no changes will be saved, save your work before creating new one)
  • CMD + O - Open existing CSD project
  • CMD + S - Save Project
  • CMD + SHIFT + S - Save As

View

  • CMD + F - Toggle Fullscreen
  • CMD + B - Toggle Workspace Borders
  • CMD + 0 - Reset Zoom (you can zoom with CMD + MouseScroll)

Windows

All cocoshop windows can be used in both fullscreen & windowed mode.
The only fullscreen issue is that if your project is bigger than your screen - you cannot scroll the node in fullscreen.
But you always can scroll it in windowed mode. (Issue #30 )

  • CMD + M - Main Editor Window
  • CMD + I - Sprite Info
  • CMD + L - Sprites List

Editing Sprites

To use these combinations you need to select some sprite.

  • Arrows - move sprite by one point in any direction.
  • SHIFT + Arrows - move sprite faster.
  • ALT + Arrows - move sprite's anchorPoint
  • ALT + SHIFT + Arrows - move sprite's anchorPoint faster
  • CTRL + Left/Right Arrows - rotate sprite left/right
  • CTRL + SHIFT + Left/Right Arrows - rotate sprite faster.
  • Backspace or Delete - Remove Selected Sprite.
  • CMD+C - Copy Selected Sprite
  • CMD+V - Paste Sprite
  • CMD+X - Cut Selected Sprite

Mouse

In cocoshop you can move and select sprites with mouse.
Currently to rotate sprites with mouse you need to use sprite info window.

Trackpad Gestures

Cocoshop supports these trackpad gestures:

  • Pinch - Scale Selected Sprite
  • Rotate - Rotate Selected Sprite

Repo Contents

  • cocoshop.xcodeproj - Cocoshop Project
  • CSExample1.xcodeproj - Cocos2d-iOS Cocoshop Examples
  • Files to inlcude to your Project
    1. CSDReader - CSD File Support.
    2. Cocos2DExtensions - Different Handy Classes, used in CSExamples. Makes your life easier.
  • libs - Cocos2d Engine 1.0.0-rc2 from Mac Template used in cocoshop.xcodeproj.
  • CSExamples/libs - Cocos2d Engine 1.0.0-rc2 from iOS Template used in CSExample1.xcodeproj

Contributing

Feel free to fork, modify & send pull requests as usual ;)
There's always some issues to solve here: https://github.com/andrew0/cocoshop/issues
You can also use them to see, what's on cocoshop's roadmap.

cocoshop's People

Contributors

andrew0 avatar psineur avatar unitedworx avatar

Watchers

 avatar

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.