Objects appearing in order and place defined by the user

video

(MAANEMANN) #1

Hi all! I’m building a presentation that’s supposed to look like a Windows-like OS. So when a new application is opened, an icon representing it appears to the left in the bottom task bar (like it does in Windows). And when you open another application, an icon should appear to the right of the one that was already there.

The tricky part here is that the applications can be opened in any order and therefore don’t have a given place on the task bar – any of them could be opened and should place itself to the left in the task bar, but to the right of the ones already opened, if any.

This mechanic would be quite useful in many situations, I think – in short: having the first activated object appear at a certain place and the next one to the right of, left of, above or below the one(s) already there, instead of at a locked x/y coordinate as normal.

I’m fairly new to Hype, but have a pretty good understanding of most of the interface and love it already, truly! I don’t have any skills in JavaScript (or any other coding language), except for having copied and pasted a few times, and have a limited understanding of the logic in it. I have a feeling that JavaScript is necessary for this task, but if there’s another way, it’s even better (maybe it can be done with physics? I haven’t worked with that yet).

Attached is a file in which I fake this function (I just made two scenes, one if you click the first object, another one if you click the other one). So if you make a preview of it and click the blue circle first, it will be placed to the left and the green to the right, when you click that, and vice versa if you click the green one first (refresh to restart). Hopefully this gives you an idea of what I want to do. There are only two objects here, but there could be several, possibly spread over multiple scenes, and in such complicated scenarios doing what I just did would be a massive work load and would quickly become very messy.

In another scenario one might want to always add the newest object to a fixed location in the beginning of the row (to the left), replace the second newest one and push it and the other ones (if any) a place to the right. I was considering this method for an inventory in a game, but it could be used in many ways. There might also be multiple rows, so when an object reaches the right edge, it jumps down to the left of the row below (this could also be the case in the first mentioned example). I haven’t made an example of a scenario where new objects push old ones ahead, I think you can imagine it, but tell me if you want me to. However, this is probably more advanced and is less important.

I hope I made myself clear, otherwise please tell me what I need to add. I don’t have any idea of how to achieve this, so I’ll be grateful for any inputs, if you do :slight_smile:

PS: If you were wondering: I wanted to add tags, but no matter what I write, it says “No matches found” and won’t let me add it. It must be a bug.

User specified object order.hype.zip (27.7 KB)


#2

From what you’re describing, it seems like JavaScript is required. The main reason is that you want to have app icons appear – IN ORDER – of they way they were launched. That’s cake with JavaScript. It’s just an array and then elements are updated accordingly. I don’t know how that would be managed in Hype without JavaScript.

It reminds me of the old point-and-click games, where you would pick up items and then they would appear in inventory at the bottom of the screen.

So, get past that cut-and-paste mode and learn to code!

I don’t think the creation of tags is permitted.


#3

True. The tags are controlled by Admin. You can only choose what is already there. I always thought there should be more though :slight_smile:

Harsh but true :smiley:


#4

I didn’t mean it to be harsh. I was the cut-and-paste guy, looking at Hotscripts.com for code. That’s very limiting. That’s one of the reasons I started using Hype. I didn’t want to code. I just wanted to use software, where I could drag-and-drop code blocks. I used GameSalad and Stencyl because I wasn’t strong enough at coding to make my own games. (I was also a big fan of Artisteer, as I could just click a few buttons and have a new website.)

It wasn’t totally wasted time, as that process helped me to better understand programming. GameSalad and Stencyl were good for learning programming logic. But, I got tired of hitting the wall, waiting for features that never arrived. I was limited by my inability to code. Also, by creating my own projects from scratch, my projects would be optimized… less code bloat, smaller file size, better optimized for what I was trying to do.

When Hype first showed up. A guy in the Apple Store was super excited about it. I was like, why do I need this? I could make my own websites. The early version of Hype was pretty limited too. I tried it on my web projects, but it didn’t work out.

As the years progressed, Hype got better. And while working with Hype, I was learning JavaScript. I was relying less on the default software features and learning to write my own JavaScript. I think writing “A Book About Hype” really improved my ability to code. It forced me to understand things I would normally avoid. It’s a great feeling, being able to look at a project and just be able to do it.

The learning hasn’t stopped either. I’m currently working on a new project that’s on a whole different level. Instead of waiting for features to be added to Hype, I’m learning how to add them myself. I have to push myself though. It’s not an easy thing to do, but it’s necessary to complete the project.


#5

One more thing…

The video really hits at a critical issue – time wasting. Looking back, the time I spent learning JavaScript probably wasn’t that long. Maybe that video will motivate you.


(MAANEMANN) #6

Thanks guys, that was very inspiring! I didn’t find it harsh at all, I can see how it could look like it, but I caught the motivating tone :slight_smile: I remembered something about arrays being a pretty basic part of JavaScript (and maybe programming in general), and I thought that was probably what I needed, didn’t remember the word though. So I’m glad to have that confirmed. And it’s true that I should start diving a bit more into code, no way around it I guess. There’s just so much to learn and so little time, but using Hype is probably a pretty good way to “breach the bubble”.

You hit the nail on the head there! For now I’m planning to use it for the mentioned OS-like presentation, but later I want to get more into making video games, and it was my thought exactly that Hype might be ideal for point-and-click games (Myst is my all time favourite game). Hype Pro already makes it easy to make inventories with persistent symbols, and with behaviors it’s possible to trigger an action from another screen than the one you’re currently on, so you can make more advanced puzzles – e.g. opening a door with a handle in another room. Have you made any games or game mock-ups in Hype? I would be happy to see it, if you have!

I have stumbled upon w3schools before, it seems like a good place to learn, step by step, with examples and so. Haven’t seen that Mozilla has tutorials as well, thanks for sharing! I also took a look at your book, downloaded the preview, seems like it could be quite helpful for me too, well written, I will consider buying it :+1:

I’ve also been looking at Stencyl for making 2D games, it has a rather attracting UI, I also like the drag-and-drop coding solution that actually teaches you to code. Haven’t looked at GameSalad before, but it seems similar to Stencyl and Construct (which is only for Windows and looks like it’s a part of the MS Office suite). Artisteer seems pretty limited, more template based – can’t compare with Hype! Which of the two game engines do you prefer? Maybe one of them can be a good start for me too. Then I could walk the same path as you, who knows, maybe I end up writing a book as well :stuck_out_tongue:

That was what I felt when starting to work with Hype, only not for making finished applications, but for making animated and interactive mock-ups of pretty much anything I can think of, which is something I’ve been missing a lot. But maybe with added knowledge about JavaScript I could be able to make them for real. Do you make all your coding in Hype? And what is your new project about?

(Okay Steve, haha) The video definitely gave me something to think of – or another angle on something that I’ve been thinking of a lot. I can sometimes be slow at learning, that’s why I’m hyped about Hype, since it’s so simple, doesn’t require coding, and I haven’t even watched tutorials. But it’s probably true what he says, that it’s the procrastination and all the in-betweens that take all the time. I know that I’m personally struggling with a lot of procrastination, because I always feel like there’s something else to do, and it stuffs up my brain. You need be able to focus to learn new things. I’ve found that taking notes of all my thoughts helps a lot and putting them on a to-do list in stead of trying to carry them out at once or being afraid of losing them in the brain void while still trying to hold on to them. I’ve dug up OneNote again, which, with the newest updates, has become a pretty solid application. It allows me to sort my notes in a nice hierarchical structure and include both text with many formating options, pictures videos etc. and not the least drawings – it works really well with Apple Pencil.

Anyways, maybe I got a bit off topic there, but I felt like giving a proper answer and sharing my thoughts. Hope it made sense to you :slight_smile:


#7

Right now, neither. I prefer Hype. I know how to export my Hype projects to apps, so I don’t really need Stencyl or GameSalad. And since I’m mostly focused on Web Development, Hype is better for HTML5 projects.

But if you wanted to try them, I think GameSalad is better for beginners, but you may quickly hit the ceiling of what’s possible. The software was pretty locked down. Stencyl is less restrictive, but more complex. It’s similar to MIT Scratch. So, it’s also good for beginners, but there’s more potential for customization. That involves learning HAXE though.

It’s been years since I used either seriously though. I think JavaScript is a better programming language to learn first. It was designed with beginners in mind, so it’s easier to learn – when compared to other many other languages. Also, since JavaScript is a web language, just about every modern computer can run it. That makes knowing JavaScript really useful. It’s not just websites either. Node.js and JXA also show how ubiquitous the software has become.

Artisteer was great for theming, like if you had a WordPress or Drupal website. Hype isn’t really for creating entire websites. It’s for adding animation and interactivity. You could build a whole website with Hype, but I’m not sure if you should.

I have been thinking about it though, as I was asked to help create a simple website – where static HTML could be good enough. I’ve been wondering, “Should I build this in Hype?” But I keeping coming back with no. It’s not a content management system. I can’t hand off a Hype project to someone for them to maintain – especially if they don’t have a Mac. I’ve been thinking about ways around that limitation though.

No. I primarily work with content management systems. Any modifications related to coding is usually done with a text editor… like TextWrangler or Atom… https://atom.io

I’ve been saying that Hype should…

  • Export to Xcode
  • Optimize Images (Like how ImageOptim does it)
  • Rename main HTML file to… index.html

Apparently, with the new Export Scripts feature, I might be able to make that happen. I have no expertise in this area, but I’ve been trying to learn. I’m making some progress. It was crude, but it seems I was able to optimize the images in an exported Hype project with ImageOptim.


(MAANEMANN) #8

Thanks, you’re really helping me out – not in the way I expected, but probably for the better.

Yeah, I got the best impression of Stencyl too. Both the interface and the pricing, you have to go to GameSalad’s FAQ to get info about the licenses, and there’s only monthly paid versions. Stencyl has a Unity-like license: Free for amateurs and small businesses and paid for those who can pay. I really like that model. And yes, I like the next level Scratch-like visual coding a lot too! It’s nice to be able to start soft and gradually improve, I’ll try learning HAXE when I get to that level eventually. Sounds like JavaScripting in Hype is a good start (and visual coding in Stencyl).

I have been building my portfolio in Adobe Muse and was thinking that I could maybe implement Hype files in a Muse project (not meant as a question, that’s for another thread if so). Muse can be a bit limited too, and maybe Hype could make up for some of that. But using Hype solely would probably be a little weird, yes, I don’t know if it’s different, when you code instead of using the GUI.

I know cms is the most sustainable solution when working with clients. Luckily I’m still a student. Thanks for showing me Atom, it looks very appetizing for a code editor, it actually makes me want to use it… And it’s open source under MIT, awesome!

Those sound like very meaningful additions. Xcode for making DMG’s and iOS apps, I assume. It seems like it names the main HTML file after the project name currently, naming it index.html would save some time. And image optimizing would make a lot of sense too. Thanks for the tip about ImageOptim, nice little tool, a lot of good tips are coming from your way. If it isn’t too much trouble, please tell me when you get your Hype mod ready for sharing :slight_smile: