Skip to content
Profile icon

Repl's Waifu

hacker
@LoveFromSkyy (38)
https://github.com/SkyyCivilK Finding cool things to code in C++ Doing BIG LegEnd of Thieves project
Repls
Posts
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
6
Legend (Incomplete)
Free upvote chance! Here is what I have on my game right now. I want you guys to play it and tell me what your high score was! (Format as How many le
Legend Attempt #4
C++
EpicGamer007
EpicGamer007 ur login password thing wont work but this seems pretty cool1 year ago
IntellectualGuy
IntellectualGuy Noice, this is good1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
3
LGTBT WARNING! IF YOU ARE HOMOPHOBIC, DO NOT CONTINUE! I was working on a website for History Fair with some group members for a while now, we were d
RhinoRunner
RhinoRunner this is cool! I like the animations1 year ago
WILLIAMBAEWER
WILLIAMBAEWER I dont think you need the warning tbh1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
3
This program was made as a demo for going through a registration process. The purpose of this was for me to practice using while loops. There is ONE b
Login System
C++
JBloves27
JBloves27 Nice job!1 year ago
JacobMcPherson1
JacobMcPherson1 cool1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
Good morning! My function consists of 2 global variables coins and XP In case you are wondering what this function does, I'll explain. The function
xxpertHacker
xxpertHacker Oh, I missed the > How can I change this to be random between a certain amount of numbers? for that, you might be interested in std::random: https://en.cppreference.com/w/cpp/header/random There's a lot to random number generation, so it can quickly get complicated if you attempt to dive in, so I'd recommend honestly, just ignoring it, and picking a generator. Here ya go: https://en.cppreference.com/w/cpp/numeric/random/random_device Check the example at the end, or the quick one I put up he1 year ago
xxpertHacker
xxpertHacker Currently, you are using C++'s comma operator, which is... practicially useless. (x, y) evaluates to y, therefore, (XP, coins) == coins; you're just returning coins, not XP. Also, XP and coins are only mutated within the scope of the function, maybe you wanted to pass by reference? I'd suggest using a std::pair to return XP and coins at once. Example: // If player wins the Level auto LvlWin(int const experience, int const coins) { return std::make_pair(experience + 100, coins + 100); } voi1 year ago
Coder100
Coder100 also here's a headache for ya: https://en.cppreference.com/w/cpp/utility/tuple it's the 'python-to-cpp' answer (if you know what i mean)1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
9 months ago
2
Hallo everyone It's been a while since I used repl talk but I've been working on a pretty bad game for a while now (Because I'm a bad C++ programmer s
Legend of Thieves [BETA]
C++
ch1ck3n
ch1ck3n you can use any language you want to make a server! (as long it has a networking ability) i typically use python but you can use c++ if you want. try looking at repl db.9 months ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
2
Here I am again. Asking another question about my program. My goal right now is to make it so that the player's XP clears after they level up Here is
KENNETHTRIPP
KENNETHTRIPP If I had to guess, I would say that you are returning the wrong variable. I don't know much C++, but when you call the function you could say `XP = XpClear(XP, Lvl);` assuming you named both of those variables XP and Lvl.1 year ago
Coder100
Coder100 what part isn't working? It appears you are already making it clear image also why are you using the address to see if the user has leveled up? And why not send repl lol1 year ago
WILLIAMBAEWER
WILLIAMBAEWER you could do this: if (XP >= 100){ //im going to assume 100 xp is needed to LVL up /* if you want it set back to 0 */ XP -= XP; /* if you want the left over XP to carry over to the next LVL */ XP -= 100; LVL++; } hope this helps1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I want to make a system where after the player levels up, the amount of XP required to level up goes up. How could I do this? Any example helps!
Coder100
Coder100 easy, use an assignment operator. Do you need to take a c++ tutorial? int xp = 0; xp += 10; as you can see the xp will increase by 101 year ago
RYANTADIPARTHI
RYANTADIPARTHI use ++ in front of the var1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
2
I coded my own calculator! Nothing so great or big about this one. I have made one change which would be the function that can return true or false.
Calculator[BETA]
C++
epicbros123
epicbros123 Maybe make a loop so people don't have to run multiple times for multiple equations?1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I'm trying to make XP go to 0 after the player levels up but I don't know how to do that. Here is what I have: int XpClear(int XP, int Lvl){ int Xp
Legend Attempt #3
C++
Coder100
Coder100 why not send repl1 year ago
Baconman321
Baconman321 Maybe store the last level that the player achieved and check if that is less than the current level. If so, then clear the XP.1 year ago
InvisibleOne
InvisibleOne You should just XP = 0;1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I'm working on the first level of my game and I want to know how I can make the monster use a random attack on the player AND use the correct number o
19wintersp
19wintersp Do you want to pick a random attack? You can generate a random number using rand from cstdlib, and use that to choose. Here's a function which generates a random integer from min to max inclusive: #include int randomInteger(int min, int max) { int mod = max - min + 1; return (rand() % mod) + min; } int randomInteger(int max) { return randomInteger(0, max); } `1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
Which is better? Information from sources: Java is Object-oriented - In Java, everything is an Object. Java can be facilely elongated since it is pr
MultiLangCoder
MultiLangCoder Java8 months ago
programmeruser
programmeruser In my opinion JS, C/C++ and Rust are superior to both of them.1 year ago
EpicGamer007
EpicGamer007 In my opinion, Java is better and I will list why. Python: Cons: Not good dynamic typing in my opinion. Sometimes, you wont be able to tell if you declare a variable or edit a variable, and if you make a small spelling mistake, you may end up with a broken program. Whitespace based, some people like this, but personally, it kind of infuriates me, it makes me unable to do code in one line, etc. whitespace based code can also go wrong really fast. amazingly slow Pros: Easy package manager compar1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I need some help with learning Python. One question before I continue. Are you able to make web servers with Python? Anyways, if you can invite me to
RYANTADIPARTHI
RYANTADIPARTHI Here are some tutorials for python: https://www.w3schools.com/python/ https://realpython.com/ https://www.programiz.com/python-programming/tutorial Django, and flask are good python webservers. you can learn them online1 year ago
JBloves27
JBloves27 Well, I could teach you a bit. And yes, you can use Django or you can use flask. Yes, sure, I could invite you1 year ago
ObiVibKenobi
ObiVibKenobi Yes, you can make web servers. There are some helpful packages like flask And Django. Also, I would advise using online courses. You can just Google basics of python and find some pretty helpful stuff. You could also use courses on coursera or other websites like that. If none of these are working, I can invite you to a repl and teach you a bit, but I’m no master...1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I have seen the statement, "Using namespace std is bad practice". But every time I try to find out I get really confusing answers that make no sense t
programmeruser
programmeruser Let's say you have two namespaces, foo and bar. Let's say foo has function named qux and bar has a function with the same name. Now let's say you do this: using namespace foo; using namespace bar; Now you have a naming conflict and the compiler complains about it. using namespace pretty much goes against the meaning of namespaces.1 year ago
RYANTADIPARTHI
RYANTADIPARTHI it gets confusing sometimes.1 year ago
19wintersp
19wintersp Clutter, pretty much. Namespaces are useful for organising stuff, so if you pull everything out of their namespaces (with the using namespace directive) into the global namespace, it becomes cluttered, and you lose your organisation. In addition, if two namespaces have members with the same name (like foo::Baz() and bar::Baz()), using the using namespace directive causes them to break each other in the same way as calling two functions the same name would.1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I was working on a project and I came across repl again so I can script it. I noticed a change in the domain name while programming. Apparently, repl
EpicGamer007
EpicGamer007 https://replit.com/talk/ask/what-happened-to-replit/121581 I was the first person to ask lol1 year ago
OldWizard209
OldWizard209 Long story short, the .com domain is easier for the team to handle than the .it domain. And also because they want everyone to call them as 'REPLIT' as they start to become more popular (with almost 7 million users).1 year ago
brokentoken
brokentoken @LoveFromSkyy you can read about it at the replit blog (https://blog.replit.com/dotcom)1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
2 years ago
1
Im wondering if feedback posts after a share post is allowed on repl (or if it is illegal here)
LoveFromSkyy
LoveFromSkyy Also, this is my first post on this account, this is my alt. 2 years ago
Coder100
Coder100 It's looked down upon, just merge them together :)2 years ago
SixBeeps
SixBeeps You mean like a post asking for feedback on a Repl? You'd be better off just merging the two (asking for feedback on the Share post) because otherwise you're just posting the same Repl twice, which could be considered spam.2 years ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I want the player's XP to go up by 100 when they beat the level (When the monster's health reaches 0 or below). How do I do that?
Legend Attempt #3
C++
Highwayman
Highwayman I think the problem is just a little bit deeper here. Let me ask you a question: Should the level really be creating the player, or should it just be affecting the player? It should be affecting the player! The problem here is that you are creating the character inside of the level, instead of inside of the game. So ultimately, your program should look more like Hero playLevel(Hero player) { // use player... player.xp += 100; return player; } void playGame() { struct Hero player; 1 year ago
Coder100
Coder100 the easiest way is to have a global var this way both functions can access it int xp; void fight() { xp++; } int main() { // you have xp health } `1 year ago
Andy_4sberg
Andy_4sberg I don't really know C/C++/C#, but hope this helps! if (VARIABLESTORINGMONSTER_HEALTH<1) { VARIABLESTORINGXP += 100; } `1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
How can I fix this error so that the user is sent to the GameMenu function/screen?
Legend Attempt #3
C++
EpicGamer007
EpicGamer007 on line 248, you need to provide intXP and int Lvl, You do not have a function called GameMenu() which takes in no parameters. pog, mha pfp1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I have been working on this for a while but I cannot seem to fix the error in the code. I want to send the user back to the game menu but I keep getti
Legend Attempt #3
C++
Coder100
Coder100 works for me most commonly the mistake is that you forgot to add a forward reference. You will need that if you want to use a function before you define it.1 year ago
Baconman321
Baconman321 What's the error? 1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
Say I have an update 1.1.0 I want to know if it changes constantly so if in the next update I make the same amount of changes would it be update 2.2.0
tussiez
tussiez You can change the number as much or as little as you want, as it is only a number. I would recommend increasing the version more if you make more changes, and vice versa.1 year ago
LoveFromSkyy
LoveFromSkyy
shared a Post
1 year ago
1
I want the monster of the level to become stronger in terms of hp and attack damage ONLY. I don't want to change the player's stats yet, that's going
Legend Attempt #4
C++
Baconman321
Baconman321 I actually had to do this too. I finally settled around getters and setters. Basically I have a class or an object that has a setter. Instead of changing the value directly, you fire the setter (by changing the setter's value it will do stuff with that value) and then the setter changes the variables you want to change. Of course, this isn't efficient in your scenario. I recommend sixbeep's answer for this one.1 year ago
SixBeeps
SixBeeps I don't have much time to look over your code, but from the sounds of it, I think what you want is to set those two variables to be based on LvlCount. You can do something like this: monster.monsterHealth = 20 + LvlCount * 2; monster.monsterAttacks = 1 + LvlCount; Of course, you'd adjust these parameters to your liking, but something like that should work.1 year ago