00:00
00:00
Newgrounds Background Image Theme

Someone gifted MetalSlayer69 supporter status!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

AS3 or HTML5 for scrolling landscape & pop-up windows?

316 Views | 2 Replies
New Topic Respond to this Topic

Hi, I'm currently running a character collab that I plan on turning into a game/showcase.


My plan is to place all of the submitted characters in an infinitely-looping landscape that you can scroll left or right by moving the cursor to the edge of the window, like this project.


When you click on a character, a window will open showing a hi-res version of that character, and the name of the contributor.


Would it be best to build this in AS3 or HTML5?


Also if you know of any relevant tutorials or script, that would be a plus.


Thanks.


What is best is based on what you already know. Both can be used to make what you describe. However, in the interest of compatibility, I'd say HTML5 is better, because pretty much all browsers can support it out of the box, and it's probably easier to make it compatible for phones with touch events.


You'd be restricting yourself to people using the Newgrounds player (for the time being) if you targeted AS3. Even if you use AS2 for Ruffle compatibility, that's still unnecessary overhead for a "simple" project -- overhead which won't be present in the HTML5 version.


I haven't worked much with HTML5 but I imagine one way you could do it is literally to just have one giant picture and then scroll from left to right using an invisible scrollbar, whose scroll speed increases as you move the mouse further away from the center of the screen.


That'd be horrible for performance, but that's an OK starting point. From there, you can decide to try and optimize it more, by having multiple pictures which load in one by one as they approach the browser viewport, for example.


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp

"Sit look rub panda" - Alan Davies

BBS Signature

At 10/5/23 01:11 AM, Gimmick wrote: What is best is based on what you already know. Both can be used to make what you describe. However, in the interest of compatibility, I'd say HTML5 is better, because pretty much all browsers can support it out of the box, and it's probably easier to make it compatible for phones with touch events.

You'd be restricting yourself to people using the Newgrounds player (for the time being) if you targeted AS3. Even if you use AS2 for Ruffle compatibility, that's still unnecessary overhead for a "simple" project -- overhead which won't be present in the HTML5 version.


Sounds like I should probably do it in HTML5.


Forgot to mention in my OP that I plan on uploading it here on NG, so I don't know about mobile compatability.


I haven't worked much with HTML5 but I imagine one way you could do it is literally to just have one giant picture and then scroll from left to right using an invisible scrollbar, whose scroll speed increases as you move the mouse further away from the center of the screen.

That'd be horrible for performance, but that's an OK starting point. From there, you can decide to try and optimize it more, by having multiple pictures which load in one by one as they approach the browser viewport, for example.


The use of an invisible scrollbar sounds interesting.