p1ckl3

hacker
@p1ckl3 (7)
I love coding games in Python, Html, and Kaboom. Formerly named okalisl
p1ckl3
p1ckl3
shared a Post
5 months ago
2
How do you print in a different font in python?
Ask
I have been trying to work on printing in different ways in python. I have accomplished italics, bold text, colored text, and more. But I have never f
Read full post
mechtank
mechtank you can use other ide's like thonny if you want to have a different font5 months ago
ch1ck3n
ch1ck3n https://lingojam.com/DiscordFonts you can try and use this5 months ago
xfinnbar
xfinnbar You can't print to other fonts, unfortunately. The font is decided by the operating system or terminal the script is running on.5 months ago
p1ckl3
p1ckl3
shared a Post
3 months ago
1
Why isn't this isTouch function working?
Ask
I am working on a weird game like thing and I need to collect what the user clicks. I know how to do kaboom but its been a while so I don't remember h
PixelPet
Kaboom
SixBeeps
SixBeeps SpriteComp objects don't have events on them. Instead, you give them a tag and register a global event handler using one of the built-in functions. Looks like you need clicks()3 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
Shooting not working JavaScript
Ask
I asked a question similar to this a while ago with the same game about shooting. @sixbeeps replied with an awesome answer that worked. But after time
The Dungeon
kaboom
p1ckl3
p1ckl3 Wait -- It seems like the issue is that when the program is run, it deletes itself. Thats so wierd5 months ago
ch1ck3n
ch1ck3n look closely at line 176 in index.html5 months ago
SixBeeps
SixBeeps Line 105 of your code, you forgot to close the ( for pos.5 months ago
p1ckl3
p1ckl3
shared a Post
3 months ago
1
Why does the sprite not load?
Ask
I am working on a kaboom game. It may be more complicated than a normal kaboom repl because I made it into Flask. Thanks to @coder100, I could incorpo
footballjs
Python
MrVoo
MrVoo Put your sprites folder in a folder named static3 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
What are some fun rpg like games I can code in kaboom?
Ask
I am bored and want to code something but don't know what to do. Anybody have some suggestions on a really fun game that is worth coding?
ch1ck3n
ch1ck3n Wednesday night funkin5 months ago
Chocolate16
Chocolate16 tic tac toe, rock paper scisors, adventure game, fox hunting...5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
Kaboom sprite change
Ask
In kaboom, replit provides pixel art characters and it appears you can make different versions of the character.(Example below) Screen Shot 2021-08-2
SixBeeps
SixBeeps Those are actually different frames for making animations. There are a few examples on the docs about how to use those.5 months ago
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa what do you mean by 'differnt version'5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
How can I change the clock to AM and PM
Ask
I have been working on a kaboom game recently and have been trying to get a clock working. I have the clock and all I need is a system to say AM or PM
Disenchantment RPG
kaboom
OldWizard209
OldWizard209 Here is literally all the code you need to make a working clock in JS: const date = new Date(); let hr = date.getHours(); let min = date.getMinutes(); let sec = date.getSeconds(); let period = "AM"; if(hr >= 12){ period = "PM"; hr -= 12; } This checks if time is greater than 12 (because javascript's Date class displays time in 24 hr format) we change the period to PM, and subtract the new time by 12 so you get the Om time :)5 months ago
AmoghTheCool
AmoghTheCool @okalisl to get whether it is AM or PM you can use a ternary operator: (hour >= 12 ? "PM" : "AM") I don't really know HOW you are getting the time but that ternary operator should work.5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
Why isn't the game showing up?
Ask
I have been working on a game in Kaboom and have had this issue for a while. I have looked at every line in search for an error, But none were found.
Disenchantment RPG
kaboom
Coder100
Coder100 the kaboomjs language makes it so you don't have to type scene('game', start, etc. If you want to type those things, you are better off creating the game in something like HTML manually. Instead, all you have to do is layers(...) const maps = [...] in your main.js instead. No need for scene, no need for start, just code!5 months ago
p1ckl3
p1ckl3
shared a Post
3 months ago
1
Can a person go to a private repl's domain?
Ask
So let's say I'm working on a project called 'example' in html. Can someone else go to example.p1ckl3.repl.co ? If so, is there a way to prevent this?
CodingElf66
CodingElf66 Actually, there is a way to prevent this. For example, if you are doing this in Python, follow the following code: from flask import Flask import os app = Flask('app') @app.route('/') def render_html(): if os.environ['REPL_OWNER'] == 'Coder100': # lol just for example raise Warning("YOU CAN'T VIEW THIS") # Just another joke, poor cookie else: return "Hi, you're not Cookie!" app.run(host="0.0.0.0", port=8080) By the way, can you mark this as answered? That way, people know that 3 months ago
Coder100
Coder100 yes. They can. You can't prevent it. The code is 'hidden' but that's it. Just name your repl something that is very very hard to guess because the name won't be public so the website can't be exactly found.3 months ago
p1ckl3
p1ckl3
shared a Post
4 months ago
1
How can I make an input in python so stuff is printed after the input
Ask
How can I make an input in python so info will be printed AFTER the input before a value is returned? I am thinking of something along the lines of th
Geocube101
Geocube101 You could use the threading module to print to the console while the main thread waits for input() import threading import time def printSomethingFunction(): # Function to multi-thread time.sleep(0.01) # Wait a little to print after the "input" call print('Some more info') # Print some info threading.Thread(target=printSomethingFunction).start() # Start function in new thread res = input('Some question') # Call input to get answer `4 months ago
Coder100
Coder100 You can't. You could try using curses library: https://docs.python.org/3/howto/curses.html4 months ago
MrVoo
MrVoo Can you be a bit more descriptive? What's stopping you from printing right before you take an input?4 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
How do you add something to a replit db?
Ask
So lets say I created a replit db like this: db['example_db'] = { 'Exampletitle' : examplevalue } How do I append a value to this db?
IMayBeMe
IMayBeMe You can do, db‘example-db’ = ‘example_value2’. This should add another item within the dictionary.5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
How can I make flask and replit db compatible
Ask
I have been working on a login system and have recently been having issues with making the db work without having an error. What am I doing wrong? (li
Flask game
Python
CosmicBear
CosmicBear Line 10 should be @app.route('/signup',methods=["GET","POST"]) Right now, it is only accepting GET requests but you need to be able to handle both GET & POST as you want to return templates.5 months ago
SixBeeps
SixBeeps Looks like you've set the /signup route to be for GETting, but at the same time, you're trying to get some form data. This is not possible, since form data must go through a POST request. Also, you don't have a form set up in your Sign Up page. To send data to your server, you actually need to declare a tag with s. Then, you'll submit the data to one of your server's endpoints, preferably separate from the endpoint that's serving the sign up page itself.5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
How do you encrypt ENV files in python?
Ask
Is there any way to write to a file and have it encrypted in an env file?
VulcanWM
VulcanWM You have to manually add values to the env files if that’s what you mean5 months ago
SamDev7
SamDev7 I guess you can save it in an enviromental variable, then run it with exec()5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
How do I get the bullet to come out of the player and twords the direction of the clicked area JS
Ask
I have been working on a game and have been trying to get shooting working. It has been all working except for making a bullet shoot in the direction
The Dungeon
kaboom
SixBeeps
SixBeeps Yay I get to talk about math for once. Here we have a (B)ullet, and a (C)ursor. image We can make a right triangle out of this. Lets name the important sides X and Y. image If we want the bullet to move to the cursor, we can just move it by (X, Y). But that's not what we want. Instead, we can move it in the same direction as the hypotenuse, but make the actual distance it travels smaller. Then, we can keep doing that every frame, and it'll look like it's moving towards the cursor! But how d5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
Clock not working
Ask
I am making a game and just started to make a clock. I got it so it was a little slower and all, but I couldn't find a way to get the if statement wor
Disenchantment RPG
kaboom
AmoghTheCool
AmoghTheCool @okalisl, can you reply with the if code? I can't see where - you have a ton of files :)5 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
How to find line with error Javascript
Ask
I have been working on Kaboom lately and I get lots LOTS of errors and have to search the whole code code and that takes a longgggg time. its not that
Coder100
Coder100 The repl console does not provide it unfortunately, you will have to open up the output in a new tab, press ctrl + shift + j (cmd + shift + j on mac) and then debug away!5 months ago
p1ckl3
p1ckl3
shared a Post
3 months ago
1
Can I possibly do Kaboom Js in Flask?
Ask
So I want to code a game... that requires Kaboom JS and python. I do not know any other ways to connect python to kaboom so does anybody now any way I
footballjs
Python
Coder100
Coder100 anyways you forgot to import kaboom, please read the getting started: https://kaboomjs.com/doc/setup3 months ago
Coder100
Coder100 you can, because kaboom is frontend. You can communicate with python through posts requests, but kaboom is more js, as is in the name, the template is in js because its just easier to do3 months ago
p1ckl3
p1ckl3
shared a Post
4 months ago
1
Broken Program
Ask
I was making a kaboom game peacefully until I decided to change the name of the main file. I forgot that you needed a main.js file, so I changed the n
Loki Game
kaboom
ch1ck3n
ch1ck3n ah i found the error you're trying to run the scene main but the name of the scene has been changed to hq. line 87 btw image4 months ago
p1ckl3
p1ckl3
shared a Post
4 months ago
1
How to get a url like "okalisl.repl.co"
Ask
How do I get a url that does not have a name and pretty much like a profile repl that has a name like: examplename.repl.co . Anyone know?
jimmyneesham
jimmyneesham "facebook":https://www.facebook.com/ facebook [link:https://facebook.com/]facebook[/link] https://facebook.com/ facebook] [[https://facebook.com/ facebook]] facebook:https://facebook.com/ [facebook->https://facebook.com/]2 months ago
jimmyneesham
jimmyneesham [url=https://facebook.com/]facebook[/url] FaceBook2 months ago
MrVoo
MrVoo Just name the repl okalisl, and the link will be okalisl.repl.co4 months ago
p1ckl3
p1ckl3
shared a Post
5 months ago
1
Errors do not show up in my console
Ask
I am building a super simple repl db chat(I know not the best) and encounter no errors whatsoever. When I go on antother device, I get an error. What
Chitter Chatter!
Python
CosmicBear
CosmicBear The error is that db["chat"] doesn't exist. Add db["chat"] = whatever But also, remove lines 14,15, and 16. There is no reason for them to be there except to make things more complicated. There is a good chance that I am wrong though.5 months ago