Nikolai
Хотя они тогда вроде никого не искали активно, я просто для души пособеседовался. На писаря может требований и поменьше
0xSU
Первый минус, это бедная на примеры дока. Второй минус - сильно много специфичного. Но пока интересно и не сложно
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
all know what i mind ?
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
@fhello_world
Hello, World! 🎄
:\
Nikolai
all know what i mind ?
I think I got you
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
the game also have time for running. how if we also life on the game ?
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
i make gameboy 😁😁😁
Hello, World! 🎄
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
emulator?
no i m just make for my own game i will remake some game and put in this
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
i can remake with same design 😆 like supermario
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
@fhello_world can you check darcoloader that very good but not working I m check before.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
testing
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
I make the enemy attack if it is close, and make him understand about impenetrable walls, lives will be absorbed if you are near the enemy, but the most interesting thing is that I can randomly generate boxes and automatically have coliders. seems to be able to make more levels just by randomizing the box.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
well I ask for advice is it good to make the enemy return to the starting place after taking our lives, or make it stand still and not move?
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
https://codepen.io/vk100/pen/rNvoOOe
usernameak
I think I got you
good for him
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
https://codepen.io/vk100/pen/rNvoOOe
play this 😅 just until level 5 but very easy to add new level
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
good morning @Snusmumriken
Snusmumriken
Snusmumriken
good morning @Snusmumriken
More to the point.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
in javascript have const , let , and var which one good?
Sergey
Use let
Sergey
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
for game i m using var 😆
Snusmumriken
in javascript have const , let , and var which one good?
Const is const, let is local, var is global.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
i found this from codebrust why do not use var.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
when i made game with webworker , only var can passing value from a function. but this site tell me do not use var. so i can't make game with webworker then.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
You always can post messages between workers
i mind sir when i make enemy with webworker , i can make the enemy is walking inside canvas but need use var to make enemy attack and giving damage. webworker passing value to my table after some statement.
Sergey
i found this from codebrust why do not use var.
In the early days of JavaScript, there was only one way of declaring variables and that was using the var keyword. A variable declared with var is defined throughout the program. One of the issues with using the var keyword was redeclaring a variable inside a block will also redeclare the variable outside the block. With the introduction of ES6 in 2015 two more keywords, let and const came into the picture. var and let are both used for variable declaration in javascript but the difference between them is that var is function scoped and let is block scoped. Variable declared by let cannot be redeclared and must be declared before use whereas variables declared with var keyword are hoisted.
Sergey
Quote
Sergey
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
thank you serga
Sergey
Sergey
Var is just unstable
Sergey
Not safe to use*
Sergey
One more tip for you If you do: foo() function foo() { body } It will work, since functions are first defined no matter what, but if you do: foo() let foo = function() { body } It will cause error since foo is not defined
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
i love when generate enemy like totalEnemy=10; speed=5; gravity=true; size=2; skin=form[0]; colider=true; and etc 😁
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
when we approach the enemy then he will chase but a little difficult if there is a wall I can't make the enemy understand how to pass through the wall it just sticks and doesn't move 😶
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
@Snusmumriken sorry to ask how many years have you worked in programming because I see you easy to understand every problem and of course it takes a lot of flying hours and experience
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
I admire you even from your language difference when understanding every problem
Snusmumriken
This is first solution. Second: how do your enemies see the player? Do they have a sense of living through walls? Do you want all opponents to immediately go to the player through the entire maze?
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
Snusmumriken
Omg
Snusmumriken
Pacman have easiest pathfinding.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
but there are some enemies that can penetrate the wall like every enemy is different in skill and strength
Snusmumriken
Snusmumriken
Look, enemies (almost) no give a fuck about player.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
how does the enemy understand our position and understand the position of the wall because it is difficult to combine the two sir
Snusmumriken
Start with that. AI that don't cares about player. Just walk to direction and move another direction on wall touch.
Snusmumriken
Second AI: If the enemy is touching the wall, try to turn towards the player. Start moving down if the player is below. Start moving to the right if the player is to the right. Move in a random direction if moving towards the player was the previous direction.
Snusmumriken
Third AI: check up-down-left-right free space while moving each square, move to player if space in player direction is free, move random otherwise.
Snusmumriken
Etc
Snusmumriken
No pathfinding, no "wall stick" etc
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
what if the player's position is like this, I want the enemy to find the nearest shortcut
Snusmumriken
You don't want to play this game :)
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
Snusmumriken
When everyone is chasing you at once and pinching you in the corridor.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
Snusmumriken
You still don't want to.
Snusmumriken
As a last resort, use simple triggers. The player enters the territory - the enemy goes along the given path, blocking the path to the player. It's the same every time, but make the levels look natural.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
Snusmumriken
Program some paths.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
what if the player's position is like this, I want the enemy to find the nearest shortcut
there are even enemies flying, over the wall, jump over the wall it's next level. this level 1.
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
and enemies that can change walls and remove walls are another level with different skills
Snusmumriken
Too many ambitions :)
Snusmumriken
Make some simpler stuff at start
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
I love castlevania sir
Snusmumriken
So what?
Snusmumriken
Castlevania-like games don't need AI and pathfinding at all. Just move on path and attack if player is near.
Snusmumriken
Do you understand why I'm sending you to other destinations?
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
So what?
I will try if it is difficult I will back off and when everything is ready I will try again