User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Concrete Jungle and zooming/panning

  1. #1
    Clicker Fusion 2.5 MaciOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Concrete Jungle and zooming/panning

    Is there source code available for Concrete Jungle? Or at least example projects that show how to do zoom and pan/scroll with just positioning and scaling?
    I found some nice extensions (Viewport and Surface) and effects (Looki's lens and Sphax's CS_Zoom effects), but none of them port (I want Windows, Mac, iOS and Android support).
    I've seen a number of posts here and on Steam that say basically "Concrete Jungle handles this nice and smoothly, for a recent example." But they never say where to get the source! And no one asks, as if everyone who sees those posts knows just where to go to see how Concrete Jungle did it... but I don't
    Any help would be greatly appreciated. I can certainly work it out myself with math, position and scaling of everything, but seems a shame to recreate the wheel again on this.

  2. #2
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,309
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    I highly doubt that commercial games that people created are giving away the source.
    I also use zooming for IOS and Android, but i paid for it to have it done, since I couldn't figure it out properly.
    If you search the forum, you will find some basic examples on how to do it. and then it's just a matter to get things right with the touch object.

    Good luck

  3. #3
    Clicker Fusion 2.5 MaciOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well then I don't get why people say "look at Concrete Jungle" as if that's an answer to how to do zoom and scroll. So I thought maybe someone had published the source or at least that part. And yes, some commercial games publish their source.
    Anyway, I take it by that response and the silence that follows that there is no example code to be looked at for this, and the people who say to do so are just teasing us.
    If anyone else knows otherwise, please reply. Thanks!

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I think you'll have to recreate the wheel
    mostly because any project works on his own,
    and each one has its own requirements/peculiarities,
    it can be simple or not so much, depending on your needs.

    The basics would look like:

    1) apply the same qualifier to all objects you want to zoom (this one just for making code sleeker..)
    2) store all these objects positions in their alt. values (values X,Y are perfect for this mean)
    3) use a single value to store the "zoom" ratio (a float number, 1.0 is starting size)
    4) scale these objects accordingly when you zoom in/out (set scale to >> zoom_ratio)
    5) set their X,Y positions to alt. val. X,Y * zoom_ratio

    panning is just a matter of adding an offset to X,Y values of all zoomable objects

    important notice: use floating point values for zoom_ratio and for X,Y values

    this will get you up and running,
    then you'd better also "move" your objects directly by their alt. values X,Y, so you'll need a custom movement for this
    and you'll (probably) have to figure out how to properly center the content on screen,
    and perhaps you'll need to think carefully when to scale (when player hits "zoom") and when to pan (when player drags),
    as doing it "always" could slow down your project (depending on number of objects / graphics size..)
    scrolling might complicate things still further as you might need to code additional offsets for that..
    and you might have to overcome some "rounding" issue when scaling adjacent objects
    and you'll need to think your starting graphics size to have the crisp result you need but without overloading the system
    and you might need to code your own zooming UI with apt +/- coefficients and/or touch code like Perry said
    etc. ect.

    you see there's much going on and very different situations so it's hard making a simple all-round framework for this
    (if not only covering the basics, like first 5 steps above)

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,036
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    who is this mystery person appeared out of nowhere with no products? perhaps you dont have access to what you may need

  6. #6
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,309
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fleisl View Post
    Well then I don't get why people say "look at Concrete Jungle" as if that's an answer to how to do zoom and scroll. So I thought maybe someone had published the source or at least that part. And yes, some commercial games publish their source.
    Anyway, I take it by that response and the silence that follows that there is no example code to be looked at for this, and the people who say to do so are just teasing us.
    If anyone else knows otherwise, please reply. Thanks!
    Where do you get "Why people say Look at Concrete Jungle" ? You are new to the forum, and I did a "Concrete Jungle" and you are the only one who asked about it.
    Do a search for "zoom" and you get 3 pages full of it and there are even examples for IOS and for Windows look in the Examples folder.. there is one as well.

    And please register the product(s) so we all know about what platform you are talking about.

    Concrete Jungle is for Windows / IOS / Android.. and they are all different for Zooming

  7. #7
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    766
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    I havent tried this myself, but i think the easiest way to do zoom like concrete jungle is to use Ultimate fullscreen object. With UFO you can scale things (2x, 3x etc) in the commands and I wouldnt be surprised if thats actually what CJ use since it's instant scaling instead of zooming in and out (from what i remember).

  8. #8
    Clicker Fusion 2.5 MaciOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thanks for all the great responses! TLDR: I've written my own zoom+pan and it's working great!
    Schrodinger, thanks for the detailed outline of how to do so. Fortunately I ended up doing pretty much what you said. And your additional considerations will be very helpful as I go along.

    Quote Originally Posted by danjo View Post
    who is this mystery person appeared out of nowhere with no products? perhaps you dont have access to what you may need
    Very fair question! I'm about a year away from a first product, I estimate. So that's why you see nothing. It will be a computer version of a board wargame, which I'm developing in joint venture with the company that publishes the physical game. My aim is to have it run on Windows, OS X, iOS, and Android. To that end I'm ending up having to code many things myself, like zoom, so that it uses only core features and cross-platform extensions. So far, so good, just some extra work. Fortunately I have 40 years programming experience

    Quote Originally Posted by Perry View Post
    Where do you get "Why people say Look at Concrete Jungle" ? You are new to the forum, and I did a "Concrete Jungle" and you are the only one who asked about it.
    Hmm, sorry, maybe that was only on the Steam forum. I saw at least two such posts; here's one: <https://steamcommunity.com/app/248170/discussions/0/530646080843907658/>. I've been reading so many posts on both forums on so many topics, I lose track of where I saw what!

    Quote Originally Posted by Perry View Post
    Do a search for "zoom" and you get 3 pages full of it and there are even examples for IOS and for Windows look in the Examples folder.. there is one as well.
    I have done, and all the ones I've seen use extensions that only work on some platforms. I'll go look through the Examples folder again, though. Thanks for the tip.

    Quote Originally Posted by Perry View Post
    And please register the product(s) so we all know about what platform you are talking about.
    I'm figuring out how to register my Fusion products now. When I first read this I thought you meant register the product I'm working on

    Quote Originally Posted by zip2kx View Post
    I havent tried this myself, but i think the easiest way to do zoom like concrete jungle is to use Ultimate fullscreen object.
    Sadly, Ultimate Fullscreen is only for Windows. Thanks for the suggestion, though.
    You all are great!

  9. #9
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi there, I'm the dev!

    Schrodinger is right- I made a custom zooming engine for the game. It was the only reliable solution I could find at the time. Basically there's a custom positioning system with it's x and y recorded in the objects alterable values. Then when an object or the camera is moved, the engine converts those values to Fusion's positioning, along with scale. It's pretty much exactly what Shrodinger outlined.

    I was going to release the source code for it but I simply haven't had the time to seperate it from the rest of the code and clean it up yet. Since I've had a few messages about this I'll try and find the time to do so.

  10. #10
    Clicker Fusion 2.5 MaciOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    colej_uk, thank you so much! What you describe was what I ended up doing, and it does me a world of good to hear that I'm on track
    Great game, by the way.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Android Jungle Arcade Game
    By Vetmora in forum WIP & Released Games & Apps
    Replies: 7
    Last Post: 16th October 2016, 01:45 AM
  2. App Screen Panning Widget
    By JimJam in forum Widgets
    Replies: 2
    Last Post: 17th August 2011, 05:29 PM
  3. Zooming shader? (Layer zooming)
    By The_Alee in forum Hardware Accelerated Runtime
    Replies: 7
    Last Post: 6th November 2009, 03:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •