Jordan Bonser
  • Home
  • CV
  • University Work
    • Second Year Work >
      • Top-Down Shooter
    • Third Year Work >
      • Terrain Analysis Project >
        • Terrain Analysis Tool
        • Game Demonstration
      • Post Processing
      • Android Application - Sports Centre
  • Projects
    • Unity Development >
      • Lerpz Tutorial
      • Dare to be Digital Entry - "Lit"
      • Unity Game
    • Geometry Instancing
    • Road to Eldorado
    • Level Editor
    • OpenGL Work
    • JBEngine
  • Blog
  • Tutorials
    • Flask Session Timeout

Development Blog

Cocos2d-x 3.1: Sheep Shenanigans

11/6/2014

0 Comments

 
So I've been working on this little application in Cocos2d-x 3.1 and I've got the idea fleshed out a little and started developing a few things. 

There were a few issues with getting the code to compile perfectly each time on different devices. The first of which is that when you add any new classes to the project you need to add them to the visual studio solution if you want to compile for Win32, you also have to add the new cpp files to the Android.mk file under LOCAL_SRC_FILES: for it to compile properly for android. 

Another thing to remember is making sure that the images that you use are stored in the Resources folder so that they can be found when compiling for the different platforms. 

After figuring out these little things I have now got a fairly streamlined development cycle. Initially developing for iOS when on my Mac and then testing on android fairly often.

Here is what the game looks like so far ( mind the poor graphics ):

Picture
Picture
So there isn't really much to the game right now but the main purpose is to round up some sheep into a specified area on each level. I am at a crossroads with the design at the moment as I am stuck on how I want the dog to be controlled, I have two ideas:
  1. Have the dog be controlled by dragging him towards the sheep in real time. The dog will have an energy bar which runs down as you move him and all the sheep need to be in the specified area before the energy runs out.
  2. You draw a path for the dog to take but again you only have so far you can make him go and then you let him run and see if all the sheep are rounded up. If they weren't then you have to start again and draw a new path. 

Both these ideas will potentially work but finding the one that is most fun will be a challenge so I'm going to play with both and choose the one I feel is best.

Currently there is a flocking algorithm implemented with the predator avoidance added in so that they always run away from the dog. This algorithm will need tweaking quite a bit to get right but it's hopefully not too far off.

Next thing to be done is adding some obstacle avoidance, i.e. making sure they don't wander off the screen or bump into each other. With the flocking algorithm, they shouldn't bump into each other at all but there may be a point when I want to put fences or rocks or other obstacles in the scene to make it more challenging. Cocos2d-x comes with Box2D and Chipmunk but I'm not too sure which to use yet, or whether to roll my own as the collision detection stuff really isn't too complex for this game. 

Anyway Development is going well :)
0 Comments



Leave a Reply.

    Archives

    May 2020
    April 2020
    January 2020
    November 2019
    October 2019
    September 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    August 2018
    July 2018
    June 2018
    March 2018
    January 2018
    June 2017
    February 2017
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    February 2016
    January 2016
    December 2015
    November 2015
    September 2015
    August 2015
    July 2015
    June 2015
    March 2015
    January 2015
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012

    Categories

    All
    2D
    3rd Year Project
    Agile
    Android
    Angular
    Animation
    API
    Apple
    Apps
    Arden
    Async
    Awesomium
    C#
    CI/CD
    Clean Code
    CMake
    Cocos2d-x
    Colour Match
    Compilers
    Cross Compiling
    Cross-Compiling
    Databases
    Design
    Development Tools
    Docker
    Electronics
    Examples
    Flask
    Flask-Login
    Fmod
    Game Development
    Godot
    GUI
    Hackathon
    Hacktoberfest
    Hardware
    Home Life
    IBM
    Inspired Gaming
    Instancing
    Ios
    Javascript
    Jbengine
    Kata
    Level Editor
    Linux
    Microsoft
    Mobile Development
    Monogame
    Moodster
    Motivation
    Networking
    Objective C
    Opengl
    Open Source
    Organisation
    Physics
    Physx
    Pi
    Planning
    Post Mortem
    PyGame
    Python
    Quart
    Quasar
    RakNet
    React
    Road To Eldoarado
    Scripting
    Scrum Master
    Sessions
    Session Timeout
    Social
    Sound
    Space Invaders
    Squash Game
    Squash Game
    Streaming
    TDD
    Team Leading
    Test
    Test Driven Development
    Travis
    Unity
    Unity Development
    VSCode
    Vulkan
    Web Applications
    Worklife
    WSL
    XML
    XNA / C#

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • CV
  • University Work
    • Second Year Work >
      • Top-Down Shooter
    • Third Year Work >
      • Terrain Analysis Project >
        • Terrain Analysis Tool
        • Game Demonstration
      • Post Processing
      • Android Application - Sports Centre
  • Projects
    • Unity Development >
      • Lerpz Tutorial
      • Dare to be Digital Entry - "Lit"
      • Unity Game
    • Geometry Instancing
    • Road to Eldorado
    • Level Editor
    • OpenGL Work
    • JBEngine
  • Blog
  • Tutorials
    • Flask Session Timeout