[ 🏛️ new / 🏖️ lounge ] [ 🔎 Search ] [ 🏠 Home ]

/lounge/ - Lounge

Ultimate Manchildren's Playpen
Name
Option
Subject
Comment
Flag
File
YouTube
Password (For file deletion.)


File: 1734317164856.webm 1.46 MB, 632x482, wrua.webm

 No.95403

what's some alternative method to employ sprite rotation without too much coding? like i can use objects to specific number 1 to 10 as sprite direction but then other object wont work as well like turning directions

 No.95407


 No.95409

>>95407 i said coding.

 No.95410

>>95409
Back to your containment thread schizosperg

 No.95411

>>95410
>sigh
why do you remain so convenient and ever,seeking of free child sex. did you fail to get one after all these? then i guess you need to, go to adress you keep pointing. doctor. your client needs better, whats it, customer service, before your, sugar pills. Fag.

 No.95412

>>95411
You have serious issues, holy shit. Keep spilling the beans, champ.

 No.95416

>>95412 You have serious issues, holy shit. Keep spilling the beans, champ.
> i mean, if you want a friendo, try being actually relatable.
> im not your 5$ punch pillow, bud.
AH FUCK YOU, YOU ARE TOO FUCKING DENSE. TRY GETTING REAL EDUCATION, FAGGOT.

 No.95420

>>95412
i mean i usually start chill but you all yhen had to, be completely hilarious so, seriously, dont wallow so much in your, uh oscars? HEH. try and not be a pdophile. it helps.

man warren sure is correct to be completely bored. or if you all pray, the quick sidesteps is all you all are. hope your gaza show is fun. you even had to come up with youtube...with the anglos

 No.95429

File: 1734365846755.png 125.19 KB, 776x1920, copilot.png

why can't you just use copilot, chatgpt or gemini for these newbie questions?

 No.95431

>>95416
>>95420
You're the one randomly mentioning kids. Fellate a shotgun you autistic nigger.

 No.95442

>>95429 i have, seen, THESE. nice screencap. its just not it. i just... dont wanna see... no wait the sprite is assigned. i use gif. these are obsolete to me. that one that i usually struggle is
where we use angle and ifs and they are just... kinda ugly
or just unoriginal.

and this part can go endless.

>>95431
and you randomly mention mental illness. that goes to children too.

 No.95443

>>95442
Wasn't random at all. You said "why do you remain so convenient and ever,seeking of free child sex". That's fucking unhinged. You need to get killed.

 No.95446

>>95443 it's just an expression, cunt. Now drop it or you can swallow a lot of bullets and defecate them.

 No.95447

>>95446
I am sure it's a popular expression in whatever baby-raping third-world shithole you're from. You should become a stain on the road, ESL faggot. Nothing of value would be lost.

 No.95448

>>95447
>stain
ohwhy hasnt that happened then? surely that would mean something in your self harm no lifers first world hobo community you post your shitty comment in. try better cuz its fucking hilarious. or just retarded.

 No.95449

>>95448
Praying it does soon enough, shitskin slum rat.

 No.95450

>>95449
see? this is why investments is overflowing. how else did slavery happen. surely you saw potential. or those without. no need to act angry, from the internet, you are just like the other guy. at least they named themsleves and its not white. or rrally, who would know what you are, anon. now stick it up or fuck off.

 No.95451

>>95450
You'd look good swinging from a lamppost by a noose made of your entrails, incoherent nonce cockroach.

 No.95452

>>95442
No clue what you're doing with "dx" and "dy". For rotation you need to keep track of the current angle, thrust, turning speed, maximum turning speed and decay. Then you have to apply trigonometric formulas to determine and modify your current angle.

 No.95453

have the direction of the sprite be a vector, multiply it by the rotation matrix when it turns. Apply a sprite to a specific direction or range of directions.

https://mathworld.wolfram.com/RotationMatrix.html

 No.95455

>>95452
He's not doing anything. It's chatgpt slop code.

 No.95464

Copilot made this in less than a minute. Save test.html and script.js in the same directory, then open test.html with your browser.
There are two script.js versions.
I don't know which is more efficient because it's impossible to profile in Javascript but theoretically applying rotation matrix may be more efficient.
It also avoids using the built-in Math.cos() and Math.sin() functions using simplified, less precise implementations for efficiency.
Again can't vouch for that since there's no way to profile that, JavaScript sucks for game dev.

test.html
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Sprite Rotation Demo</title>
	<style>
		#canvas {
			border: 1px solid black;
		}
	</style>
</head>
<body>
	<div>
		<h1>Current Angle: <span id="angle">0</span>°</h1>
		<h2>Current Sprite: <span id="sprite">DOWN</span></h2>
	</div>
	<canvas id="canvas" width="500" height="500"></canvas>
	<script src="script.js"></script>
</body>
</html>


script.js (simple trigonometry version)
const Direction = Object.freeze({
	DOWN: 'DOWN',
	DOWN_LEFT: 'DOWN_LEFT',
	LEFT: 'LEFT',
	UP_LEFT: 'UP_LEFT',
	UP: 'UP',
	UP_RIGHT: 'UP_RIGHT',
	RIGHT: 'RIGHT',
	DOWN_RIGHT: 'DOWN_RIGHT'
});

const spriteDirections = [
	{ angle: 0, sprite: Direction.DOWN },
	{ angle: 45, sprite: Direction.DOWN_LEFT },
	{ angle: 90, sprite: Direction.LEFT },
	{ angle: 135, sprite: Direction.UP_LEFT },
	{ angle: 180, sprite: Direction.UP },
	{ angle: 225, sprite: Direction.UP_RIGHT },
	{ angle: 270, sprite: Direction.RIGHT },
	{ angle: 315, sprite: Direction.DOWN_RIGHT }
];

let cosLUT = [];
let sinLUT = [];
for (let i = 0; i < 360; i++) {
	cosLUT[i] = Math.cos(i * Math.PI / 180);
	sinLUT[i] = Math.sin(i * Math.PI / 180);
}

function fastCos(angle) {
	return cosLUT[Math.floor(angle) % 360];
}

function fastSin(angle) {
	return sinLUT[Math.floor(angle) % 360];
}

let currentAngle = 0;
let thrust = 1;
let turningSpeed = 0;
let maxTurningSpeed = 5;
let decay = 0.95;

document.addEventListener('keydown', (e) => {
	if (e.key === 'ArrowLeft') {
		turningSpeed = Math.max(turningSpeed - thrust, -maxTurningSpeed);
	}
	if (e.key === 'ArrowRight') {
		turningSpeed = Math.min(turningSpeed + thrust, maxTurningSpeed);
	}
});

function getSprite(angle) {
	for (let i = 0; i < spriteDirections.length; i++) {
		if (angle >= spriteDirections[i].angle && angle < spriteDirections[(i + 1) % spriteDirections.length].angle) {
			return spriteDirections[i].sprite;
		}
	}
	return Direction.DOWN;
}

function update() {
	currentAngle += turningSpeed;
	currentAngle = (currentAngle + 360) % 360;
	turningSpeed *= decay;

	document.getElementById('angle').textContent = Math.floor(currentAngle);
	document.getElementById('sprite').textContent = getSprite(currentAngle);

	draw();
	requestAnimationFrame(update);
}

function draw() {
	const canvas = document.getElementById('canvas');
	const ctx = canvas.getContext('2d');
	ctx.clearRect(0, 0, canvas.width, canvas.height);
	
	ctx.save();
	ctx.translate(canvas.width / 2, canvas.height / 2);
	ctx.rotate(currentAngle * Math.PI / 180);
	ctx.fillStyle = 'red';
	ctx.fillRect(-25, -25, 50, 50);
	ctx.restore();
}

update();


script.js (rotation matrix version)
const Direction = Object.freeze({
	DOWN: 'DOWN',
	DOWN_LEFT: 'DOWN_LEFT',
	LEFT: 'LEFT',
	UP_LEFT: 'UP_LEFT',
	UP: 'UP',
	UP_RIGHT: 'UP_RIGHT',
	RIGHT: 'RIGHT',
	DOWN_RIGHT: 'DOWN_RIGHT'
});

const spriteDirections = [
	{ angle: 0, sprite: Direction.DOWN },
	{ angle: 45, sprite: Direction.DOWN_LEFT },
	{ angle: 90, sprite: Direction.LEFT },
	{ angle: 135, sprite: Direction.UP_LEFT },
	{ angle: 180, sprite: Direction.UP },
	{ angle: 225, sprite: Direction.UP_RIGHT },
	{ angle: 270, sprite: Direction.RIGHT },
	{ angle: 315, sprite: Direction.DOWN_RIGHT }
];

let cosLUT = [];
let sinLUT = [];
for (let i = 0; i < 360; i++) {
	cosLUT[i] = Math.cos(i * Math.PI / 180);
	sinLUT[i] = Math.sin(i * Math.PI / 180);
}

function fastCos(angle) {
	return cosLUT[Math.floor(angle) % 360];
}

function fastSin(angle) {
	return sinLUT[Math.floor(angle) % 360];
}

function rotatePoint(x, y, angle) {
	const cosTheta = fastCos(angle);
	const sinTheta = fastSin(angle);

	const xNew = x * cosTheta - y * sinTheta;
	const yNew = x * sinTheta + y * cosTheta;

	return { x: xNew, y: yNew };
}

let currentAngle = 0;
let thrust = 1;
let turningSpeed = 0;
let maxTurningSpeed = 5;
let decay = 0.95;

document.addEventListener('keydown', (e) => {
	if (e.key === 'ArrowLeft') {
		turningSpeed = Math.max(turningSpeed - thrust, -maxTurningSpeed);
	}
	if (e.key === 'ArrowRight') {
		turningSpeed = Math.min(turningSpeed + thrust, maxTurningSpeed);
	}
});

function getSprite(angle) {
	for (let i = 0; i < spriteDirections.length; i++) {
		if (angle >= spriteDirections[i].angle && angle < spriteDirections[(i + 1) % spriteDirections.length].angle) {
			return spriteDirections[i].sprite;
		}
	}
	return Direction.DOWN;
}

function update() {
	currentAngle += turningSpeed;
	currentAngle = (currentAngle + 360) % 360;
	turningSpeed *= decay;

	document.getElementById('angle').textContent = Math.floor(currentAngle);
	document.getElementById('sprite').textContent = getSprite(currentAngle);

	draw();
	requestAnimationFrame(update);
}

function draw() {
	const canvas = document.getElementById('canvas');
	const ctx = canvas.getContext('2d');
	ctx.clearRect(0, 0, canvas.width, canvas.height);
	
	ctx.save();
	ctx.translate(canvas.width / 2, canvas.height / 2);
	
	// Correctly apply the rotation around the center
	ctx.rotate(currentAngle * Math.PI / 180);
	
	ctx.fillStyle = 'red';
	ctx.fillRect(-25, -25, 50, 50);
	ctx.restore();
}

update();

 No.95477

>>95451 yea, you look like a lampost. please squash yourself dirt, reginald fleA-son the fifteenth.

>>95453 tsk, ok i kinda solve the matrix... but i dont know what's or how to "apply". like, sure its angle. but i dont wanna. i use alot of triggers and events.

>>95452 fuck i dont, wanna. the limit for me is. plus, minus, multiplies? no wait, division. i got the einstein-bug, cuz he's legal or something.


>>95464 I only do tululoo. like triggers, objects and shit. i dont even use "onmouse" or "onkeys". lel

 No.95480

>>95477
Choke on your teeth, nigger.

 No.95487

>>95480
i havent even gone out for the suns.

 No.95488


 No.95493

>>95488
Capeshit is for faggots.

 No.95511

>>95493
well. its only batman and i superman i guess. and shazam. thor and vision. anyway its a terribly bad image. like AI. also final fantasy is in cape. so does dragonquest and dtagonball. i dont watch any of those either.

 No.95512

>>95511
>also final fantasy is in cape. so does dragonquest and dtagonball.
Only a fucking retard like you would consider any of those capeshit. The only one that's remotely close is Dragon Ball.

 No.95513

P.S. capeshit means your soyboy superhero comic book shit, not if the character is literally wearing a cape. Hulk is 100% capeshit. ESL retard.

 No.95514

>>95512
Dragon Ball isn't capeshit, it's Wuxia. Chinese martial arts media. Toriyama was a big fan of kung fu movies and he visited hong kong where he got the idea.

 No.95515

HDV stop feeding these word salad spewing retards attention, you're only attracting more of them.

DO NOT FEED THE WILDLIFE.

 No.95516

>>95514
I didn't say it is. Consult the ESL retard from Babyfuckistan for bringing it up in the first place. I only say it's remotely similar because it has constant power level asspull bullshit, death doesn't matter bullshit, etc. (not original Dragon Ball so much as DBZ onward).

 No.95517

>>95516
Why would I want to talk to the ESL retard about anything? He can't even string one solitary sentence together. He's literally a drooling idiot.

People like him destroyed this community, along with those who tolerated their presence.

 No.95518

>>95517
You don't have to, obviously. Just saying I didn't say Dragon Ball is capeshit. I think this website has mostly been spared from the ESL blight. As far as I know, this is the same, weird ESL monkey who has been asking about art tips for years then mostly rejecting them across multiple boards. It's always been a strange faggot, but now I kinda hope it has a miserable death.

 No.95521

File: 1734491354825.jpg 73.28 KB, 495x495, d75.jpg

>>95518
Mhm, I think there's a person on /ic/ who might be the same guy.

https://boards.4chan.org/ic/thread/7219817

This dude. Well, maybe it's a different schizo, I can't tell one set of schizo squiggles from another tbh.

>It's always been a strange faggot, but now I kinda hope it has a miserable death.

I'm so damn sick of these schizos man. I just want to talk about normal shit without feeling like I'm in a zoo. It's not just here either, a lot of other platforms I use have just been inundated with gibbering lunatics.

 No.95522

>>95512 what? it's nihongo. so it's battle royale. also shaman king. also bleach. like, almost a whole arc.
i am agreeing but you are gay nigger.
>>95514 wuxia has no cape. it's gay but not cape.
well, newer ones have more range in fashion
>>95516 fine argument as it kinda kiss ass and done
>>95517 WHAT? and your shitty ass thread group sex porn who got you all groveling at each other kept it? you have Too much imagination on the idea of community. if you want some penis flicking mood, wait for christmas, or lebarans where you start trading saliva today and bang heads tommorow. it's why it's it. or just watch sitcoms where everyone is funny and abandon the gravity of the situation in any realistic setup. as in, go back to facebook, maybe. or friendster.

>>95518 I said, "could you get into details" but you gone planet of apes once i said that. you blow, asswad. take it easy, i didnt ask you "how to draw circle with chalk"
>miserable
>death
and take degree on basic anatomy or just post mortem elementaries, dipshit.
>>95521 cant load the pictures. i dont care. find my thread where its the same shit word by word. then come back and kiss my butt, back being a sperging loonatic.


meanwhile i need windows that floats and rotates cuz webcam just dont cut it...but i guess bill gates didnt do apple and steve jobs didnt program paint even though he arts and only went to quote beatles like its cute and intelligent or even mildly gay so it all fits in, that you are all supposed to stand on podiums and tell everyone to "SUCK IT, IM RICH AND ACCEPT MY COP OUT QUOTES FROM MOVIES I DONT EVEN KNOW EXISTS ON YOUTUBE". and by everyone i mean chairs and tired comittee. as in nurses.

at this point your personality has probably splitted and you are on a level where you cant remember your homework just to look mildly convincing with your "life experience" because theres just, really, NO MORE OIL DOWN THERE, even if mohammed your favorite pardo pal-do-feels says "THERES ALWAYS OIL WHEN THERRES W(O)ILLHAMMED ALI"

 No.95523

>>95522
picture to leverage arguments for simpletons

 No.95525

>>95410
>>95521
you could always just [-] the thread instead of bullying HDV's friend, it exists for a reason

 No.95526

>>95525
I refuse, schizo enabler!

 No.95527

>>95521
Maybe it's the same poster, but what I meant was that I saw a poster asking the same and similar shit on small boards for years. I don't read 4chan much. For a long time, there was some ESL retard asking how to make money off of animation while asking how to git gud at it on various boards, so that's what I am wondering if this is the same. Sadly, I don't have any screenshots to back myself up, but I'm just not the type of person who does that sort of thing.
>>95525
On the flipside, why are you defending some ESL pedophile nigger?

 No.95529

>>95527
>but what I meant was that I saw a poster asking the same and similar shit on small boards for years.

I see. I haven't noticed this but I don't really pay attention to small imageboards anymore, other than this one (mostly for nostalgia in this case).

I wonder if other schizos are streaming in from alt-chans as well. Sometimes I wonder where they spawn from. I know dog is from krautchan but who the fuck knows with people like avid. I think if I had seen someone so massively, flamboyantly gay on old 4chon I would have noticed.

 No.95541

>>95527
I don't think it's this particular /ic/ guy, but yes I know this character from both /ic/ and [redacted art board] where he was making lots of threads asking how to draw a motorcycle. Don't worry, I won't let it get much worse than it already has, I was just feeling generous for nostalgia's sake-but we deserve some modicum of peace in our retirement home don't we? heh

 No.95561

>>95527
>>95541
>modicum
>peace
>git gud
maybe use google translate to reinterpret my sentence see if you can, use multiply on it and see how much letters a match.
and as for expecting modicum of peace. if schizophrenia doesnt get you all, per science or properness in whatever moohammed moo witness you gay for, you should have quitted your tracing art job long time ago so you can engage in this, these, sultry board activity more selfishly. but i guess you just like the dumb way since you are all dumb and simple in the head for actually complicated problems with clear cut path already.

 No.95563

File: 1734566704484.gif 2.96 MB, 320x180, u r brown.gif

>>95561
Learn English.

 No.95575

File: 1734569419228.mp4 504.72 KB, 412x232, ezgif-4-d350c0e174.mp4

>>95563
FIXED

 No.95676


 No.95677

File: 1734676843441.png 225.42 KB, 509x342, BROWN_(2).png

>>95676
Can't really call others dumb when you can't even form a coherent sentence in the primary language of the board, turd-world monkey.

 No.95688

>>95677
retard zogwhale is mad their shitpost didn't get a more detailed reply

if you left the house you'd not care about your online reputation so much

 No.95697

File: 1734700498645.png 771.89 KB, 1024x599, alt-zog.png

>>95688
>retard zogwhale is mad their shitpost didn't get a more detailed reply
>if you left the house you'd not care about your online reputation so much
>t.

 No.95699

>>95677 i just yawned man.
>>95688 how do you know i have a house? hahahahah piss off

 No.95700

>>95688
also you do not have"moredetailed" or whatever its bullshit. you dont know shit. you are on 4chon. you should just kill yourself by complexity alone. then again you sounded like you just swallowed a rat poo

 No.95714

>>95677
man I love spongebob square pants

 No.95717

>>95700
>you should just kill yourself by complexity alone

shut the fuck up man

 No.95741

>>95717
you should. kill. yourself. according. to chatgpt.

 No.95756

>>95741
I'm not going to commit suicide spergoid, youre overestimating grossly your influence on me

 No.95777

>>95756
your acting has been terrible and you didnt get oscar or emy in accordance so i might as well be your grandparents who ve lived with you since you placed that soda can under their brakes.

 No.95779

>>95777
wordsalad

 No.95819

https://zzzchan.xyz/b/thread/229358.html
Found the monkey pedophile's crossposting spam lol

 No.95820

>>95779 try google translate to Plebenese. it passes.
>>95819 this is the third time now. you should give up yourself...to your dad i mean. cuz he's a police. right? yea that sounds wrong. why are you only wrong, retarded, or just completely undetailed.

 No.95821

>>95688
>>95700

HA!, i got it! SO YOU ADMIT YOU DIDNT DETAIL SHIT! HAH! moron! now detail it then if you actually Detail! HAH! EAT THAT, Sauron!

 No.95822

>>95820
Even an autistic nigger understands English better than you do. That's hilarious. Love the fact posters from multiple websites shit on your stupidity.

 No.95826

>>95819
Never even heard of zzzchan before.

 No.95827

>>95826
If you're a different person from the ESL scribble-monkey ITT, then don't worry about it.

 No.95831

File: 1734755332544.png 747.09 KB, 1024x724, fren_autonomous_zone.png

>>95827
They actually have quite a few posts surprisingly.

 No.95841

>>95822 you dont even consider nigger other than autistic.
>shit
clearly you didnt got to a toilet so maybe slim down alot, demeo.
>hilarious
oh stop it, retardo

 No.95845

>>95822
>love
of course. given little protofolio of magnifence actually influencing correctness in anything related here, i d say it is easier for you to just project somewhat retarded fantasy of another's complications despite your lack of a proper detailed, functioning brain, and then have at it that you somehow exacted success upon yourself. i mean, these are just insults. thereve been no details written in it either. please swallow the largest cock theres ever been so maybe your brain will squash a little more and give yourself more room to actually think in the fluid since your solid material has no purpose either.

 No.95848

>>95841
>>95845
>blablabla
You clearly didn't pay attention in Indonesian sharia faggot class, so I'm not going to waste my time deciphering your retarded brown scribbles. Learn English or kill yourself, preferably the latter.

 No.95858

>>95848
Whats a sharia? Are you some, uh, dates? Kurma? Bad valentine? That explains a lot.
This is boring. Please hug a c4 maybe. It's my only suggestion.

 No.95861

>>95858
>incoherent monkey shrieking
Your country should be bombed to dust and a parking lot should be paved above a mass grave with your remains in it.

 No.95863

>>95861
it's really not that deep, why are so invested and subsequently angered this much by posts here?

 No.95865

>>95863
It's not normal to casually mention fucking kids in a White nation. I'm sure that comes as a shock to a shitskin pedophile like you. You should be tortured to death.



[Return] [Catalog] [Top][Post a Reply]
Delete Post [ ]