46 Forum Posts by "BelgarionRiva"
At 7/30/14 10:14 PM, Scintillating wrote:At 7/30/14 09:24 PM, BelgarionRiva wrote:Lol ain't nobody give a shit about your stupid canuck laws. What are they going to do, extradite Tom Fulp to maple-land? HAHAt 7/30/14 09:22 PM, SCTE3 wrote: You do know the emails are optional, right?I don't see it requesting a physical signature anywhere. It seems a little draconian to me. I guess I'm writing this here because newgrounds is the only thing I get newsletters from (and want them).
Well I heard the fine for individuals is 1million dollar and the fine for companies is 10 million dollars. Don't know if it goes across borders.
At 7/30/14 09:22 PM, SCTE3 wrote: You do know the emails are optional, right?
I don't see it requesting a physical signature anywhere. It seems a little draconian to me. I guess I'm writing this here because newgrounds is the only thing I get newsletters from (and want them).
It seems to me newgrounds didn't read the fine print on this one. Businesses aren't allowed to email people with newsletters anymore unless they have their explicit consent every 6 months. Explicit consent is defined as a paper and pen signature. Since a newsletter can't be sent without the signature in the first place, it has to be physically mailed to newgrounds before they are allowed to send to a canadian a 'weekly top 10' email.
http://business.financialpost.com/2014/07/24/canadas-anti-spam-slashes-companys-email-lists/
Most companies lost 90% of their email advertisment base. Seems that I still get newgrounds newsletter.
Someone suggested that I offset based on updated mouse position, rather than map position. Worked wonderfully, since the object's position was constantly being updated. Thanks MSGhero!
Yeah no... Tempx is rarely 0, sometimes something really small negative, sometimes a little smaller negative, but never entirely 0. This is causing an offset for the other objects...
With a screen size of 800x800 px, and an island picture of 1500x1000, how would you code this in a non-complicated way that doesn't yield negatives? (I'm trying to scroll the map when the mouse moves).
Wow this really helped!
For some reason, when I don't move, x should be 0. But it's not, it's: -0.037499999999994316. I'll just offset that value if I can't find what's causing it.
Thank you so much!!
Tried like this instead:
tempx=0.5 * ((mouseX/800 * -700) - island.x);
tempy=0.5 * ((mouseY/800 * -400) - island.y);
island.x +=tempx
island.y += tempy
deviceofpower.x += tempx
deviceofpower.y += tempy
It's still slowly drifting towards the top left corner... Could it have to do with the difference in image sizes?
Yeah, just figured that out. Stupid of me. It looks like this now.
It's tons better, but for some reason, it's slightly drifting to the left... Here's the code now, executing every frame:
tempx=island.x
tempy=island.y
island.x += 0.5 * ((mouseX/800 * -700) - tempx);
island.y += 0.5 * ((mouseY/800 * -400) - tempy);
deviceofpower.x += 0.5 * ((mouseX/800 * -700) - tempx);
deviceofpower.y += 0.5 * ((mouseY/800 * -400) - tempy);
island.x += 0.05 * ((mouseX/800 * -700) - island.x); //
deviceofpower.x+= 0.05 * ((mouseX/800 * -700) - island.x);
These two objects should move the same, since they have the same coefficient and the same speed. However, the object is sorta hovering in place and is always moving a little. It's not 100% "bound" to the island.
I made a vid to show what I mean.
The background is behaving normally, but the buildings are just drifting away in the same direction as the island. If the island doesn't move, the objects are sorta trying to center themselves on god knows what...
I somewhat fixed it like this:
island.x += 0.05 * ((mouseX/800 * -700) - island.x); //-700 +1500 = 800
island.y += 0.05 * ((mouseY/800 * -400) - island.y);
deviceofpower.x+= 0.05 * ((mouseX/800 * -697.5) - island.x);
deviceofpower.y+= 0.05 * ((mouseY/800 * -398.25) - island.y);
The deviceofpower object now 'snaps' to the map, and the map is scrollable. Problem is, the deviceofpower follows the motion of the map veeeery slowly. (like 0.01 inch/sec). Any way to dampen this motion a LOT, or to just make the object fully follow the map and not deviate?
So my island is 1500x1100. My viewable screen is 800x400. When I move my mouse around, the island scrolls left down up and right. I want to place objects that are independant of the map, that move around at the same frequency as the map. However, when I apply the same code to another (much smaller) object, the object behaves erratically. It almost follows my mouse instead of being fixed to the map like it should... Can anyone help my keep my object grounded to the map?
Here's the code, with comments for comprehension:
var speed:Number = .05; //range .01-1
this.addEventListener(Event.ENTER_FRAME,parallax,false,0,true);//happens every frame
function parallax(e:Event):void{
var myPosx = mouseX/800; //width
var myPosy = mouseY/400; //height
movexy(island,myPosx,myPosy);//object island is the main map, behaving normally
movexy(deviceofpower,myPosx,myPosy);//an object on the map, much smaller than the map, almost following my mouse
}
function movexy(me:MovieClip,myPosx:Number, myPosy:Number){//this function affects movement, I don't really understand it.
me.maxwidth = stage.stageWidth - me.width;
var destinationX = myPosx * me.maxwidth;
me.x += speed * (destinationX - me.x); //easing
me.maxheight = stage.stageHeight - me.height;
var destinationY = myPosy * me.maxheight;
me.y += speed * (destinationY - me.y); //easing
}
I've been working for months on a game. However I'm stuck and I don't know what to do. Help is greatly appreciated!
Hey guys, does anyone know any methods against anti-clickers? I was thinking maybe have 4 variables; alternatively assign each variable a timestamp based on when the object was clicked. If there is exactly the same time frame between v1 and v2; v2 and v3; v3 and v4. If the time is the same, force the player to reset the game. I'm afraid that by coincidence, the player actually pressed at exact intervals 3x and is forced to reset his game. Any other methods?
Thank you!
At 2/20/14 02:19 PM, MSGhero wrote:
Use adobe scout to see what's going on in your code. 32 fps is a weird number, you'll get more consistent performance at 30 just by the fact that 30 goes into 60. If you're using movieclips, that'll lag. Moving textfields, lag. Google "as3 optimization" and look at the first few links.
Right, I have a few hundread movie clips with animations... Thanks!
I have over 3000 lines of code running every frame. Game runs at 32 fps (or trying to). I have a gaming pc, and it's starting to be a noticeable time lag between the time when I click something and an action occurs... Any way I can reduce the lag? Does changing the fps to either 24 or 60 help in any way?
Basically, I want to know if I can make a timer independant of framerate. So far, I always do something like: If the framerate is 32 fps, then execute code every frame that increments x. If (x%32=0){second++)
This is flawed because if the player lags, time slows down. Any other way I can do this?
Thank you!
At 1/5/14 11:53 AM, MSGhero wrote: I made a calculator program called "bigmult" that could display precise results bigger than 10^10. It's just a matter of chunking the number you want into multiple strings. Maybe 2 strings: one counts up to 999,999,999, then at 1bil it goes to all zeroes while the second string goes to 1. Then you would concat the strings together in a textfield and display that. You'd need extra logic to fill the first string with zeroes when the 2nd string is greater than 0.
I made one that fits an entire number (10^308), by doing the same method you're talking about by chunking it into an array. My function also separates numbers to get 1,000,000,000 instead of 1000000000. =D
number.toFixed() apparently lets you display as many numbers as you want. I don't really need precision, so it doesn't matter to me if I lose precision after 10^10.
Alright, so for the past few days I have been trying to work around the 32-bit integer limit for uints, when I realized that the Number data type goes all the way to 10e308, which is absolutely massive! The problem is that the dynamic text seems to convert my number to uint before displaying it. At 4.2 billion, the number resets to 0.
Any way to extend the displayed amount? I heard to.precision(); can extend it to 21 digits, but I don't know how or why? Can anyone point me in the right direction?
I decided to use different prefixes, like this:
http://gyazo.com/b55c6951173454b71ce0e8233592f5f4.gif
Thanks!
Apparently "Number" reaches all the way to 1E308, which is more than enough, but when I pass it on to a dynamic text field, it stops being displayed after 4.2 billion. Any way around this?
Hey guys,
I found this *.as file about long integers.
I downloaded the BigInt.as file. I need integers larger than 4.2E9.
I made a *.fla file and put it in the same folder as the *.as file.
I then wrote the following code in my *.fla file:
import BigInt;
var a:BigInt = new BigInt();
a=0
I am getting the error on the last line:
Implicit Coercion of a value of type int to an unrelated type BigInt.
It's basically telling me that I can't do arithmetic on BigInts?
I'm just trying to find a large data type :(
At 1/3/14 01:18 AM, kkots wrote: Forgot http://
... Thank you so much!
this is my non-working code, applied to a button symbol.
myButton.addEventListener(MouseEvent.CLICK,goThere);
function goThere(e:MouseEvent){
var request:URLRequest = new URLRequest("www.youtube.com/insertchannelhere");
navigateToURL(request);
}
How do you make dynamic text call an URL?
I tried some methods but none worked for me. :(
Any ideas?
I need a graphic artist to draw 36 pictures done, 100x200px size. (really 3 objects in 12 positions) Can be drawn by hand or on photoshop. 10% royalty on a flash game I have been working on for the past two months. It's completely finished apart from these drawings.
Contact me if interested.
So I'm making this flash game and I need 60 names for various armors. I'm at 40 armors, aaaand I'm completely out of ideas... Any ideas? Can be goofy/funny, or serious, etc.
The green highlights are my latest lack of inspiration.
http://gyazo.com/39e87e871ef52e829a3e48cd4138098e.png
Any help is appreciated, thanks!
Why do you want to do this? What use could you have for working with the photoshop layers inside flash?
Great job OP! That clip music was awesome!

