# ccuccherini

Member

44

352 Neutral

• Rank
Member

• Interests
Art
Design
DevOps
Education
Programming

## Recent Profile Visitors

2428 profile views

1. ## Random Number Generator

I would rather do it as a class too, but I was just messing around with some code to get a better hang of the random number generators. Thank you for the help and I will definitely give this a try and look further into the other features the standard library has. I'll have to look into those alternatives. Thanks for the suggestion! TheChubu - Thanks for the suggestion! I tried it out and that worked. Now I'm going to look into the other suggestions to see if I can make this more reusable and viable in a game!
2. ## Random Number Generator

Okay thanks. I'll give that a try in the morning.
3. ## Random Number Generator

I'm running to some issues with a random number generator that I am trying to create to test what type of attack an enemy will use (weapon or magic) and whether or not they land a hit with the attack. What I want it to do is generate a random number number for the type of attack, then generate a separate random number for if the hit lands or not. What actually happens is it is generating a different number each iteration, but the same number for each item. So for instance, if the random number is a 6, both attack type and if it hit is a 6, if it's a 7 both are 7, etc. I'm almost certain the issue is within how I'm using time in conjunction with this, but everything else I've found hasn't been helpful. I've tried doing one function, but had the same issue and switched to two functions in the hopes that would help, but it didn't and now I'm not quite sure what to try next. Here is the code I have so far: // Example program #include <iostream> #include <string> #include <stdlib.h> #include <ctime> using namespace std; int getRandAttack(); int getRandHit(); int main() { int randomAttack; int randomHit; randomAttack = getRandAttack(); cout<<randomAttack<<endl; //used to ensure same number isn't given every time //decides what happens based on what number was given if (randomAttack <= 5) { cout<<"Enemy used a weapon!"<<endl; }else if (randomAttack > 5) { cout<<"Enemy used magic!"<<endl; } randomHit = getRandHit(); cout<<randomHit<<endl; //used to ensure same number isn't given every time //decides what happens based on what number was given if (randomHit <= 5) { cout<<"The attack missed!"; }else if (randomHit > 5) { cout<<"The attack hit!"; } } //gets random number to determine enemy attack type int getRandAttack () { int random; srand (time(NULL)); random = rand() % 10 + 1; return random; } //gets random number to determine if enemy attack lands a hit int getRandHit () { int random; srand (time(NULL)); random = rand() % 10 + 1; return random; } I know there is an easier way to do this that involves classes, but the online compiler I'm messing around with right now doesn't seem to support extra files, so I'm making functions work instead. Any help and lead in the right direction would be greatly appreciated.
4. ## Combat is important in rpgs

Great start! One thing I've noticed that has made similar games such as the early Final Fantasy games and Pokemon keep combat interesting and challenging is the how there are some enemies that are resistant to certain attacks, but weak against others (fire is weak against water, but ground is immune to electricity). After you get the basic combat down this may be something you'll want to play around with to see if it works for your game.
5. ## Change of Plans

It's been awhile since I've posted anything here and a lot has changed in reference to what I'm doing with my game. After some setbacks, to include having no idea where to start after drawing out some levels, I decided to put my maze came on hold until I've gotten some more experience under my belt . So for now I have moved away from using Unity to RPG Maker MV, which seems to be more user friendly. Before moving to this new engine I watched several tutorials for it to get an idea about how easy it would be to use, how much scripting is required, and what is required of me in terms of actually using it and getting it do anything at all. After having dealt with Unity I was pleasantly surprised that in terms of map creation it functions similarly to MS Paint and Sim City 2000 mashed together: Choose your tile, click where you want it, Rinse, and Repeat. Well that seemed easy enough, and I'm happy to say it was. After drawing out my world map on grid paper I moved over to the computer to make one of the island in the program. From start to finish the whole process up until this point, which only included placing water and land with a few cities and towers on the map took me all in around 2 hours and left me feeling rather accomplished. My next steps will be to start building the maps for the main cities, then the towers, something I hope to get done within the next 2 weeks or so while I continue world building on paper. Concept art for one of the characters has already begun, as have details for how many islands I'll have and what the overall story will be. I've already decided this will likely be a rather "big" game in terms of my ability, but to help cut it down to size I intend on just focusing on one island at a time, essentially making each island it's own chapter that could be it's own stand along game. I'm not making any promises about what will be up next week, if anything at all, but I hope to have some pictures/screenshots or a more fleshed out post about the theme, story, and gameplay by the end of next week. Until then, I wish all of you in Canada a happy Canada Day and all of you in the U.S.A. happy Independence Day!
6. ## Free Open Source Collaborative Fantasy Card Game - join us

This is awesome! I love playing the Pokemon TGC game and can help by playing and offering feedback on my days off from work at least until the new semester starts.
7. ## Just starting to get back into it...

I see what you mean about the reflection that's strange I'll try to reposition it so it reflects better. And that's an amazing idea I never even though about putting vines and ivy on the wall I'll definitely try that out once I revisit the scene! Thanks for your feedback it was awesome hearing from you!   No problem!  I look forward to seeing what ever else you choose to share with us!
8. ## Just starting to get back into it...

The screenshots look amazing and overall the use of lighting adds a lot of depth.  I do have a critique though..There are a few areas in the water where the reflection doesn't feel like it likes up with the items that are there (ex.  in the second picture, towards the center of the water there are trees as the reflection under the rock where my mind was expecting the rock to be reflected).  With the last one I get the feeling of a ruined civilization that may be rebuilding or is no longer there, and if that is the case it would be interesting to see the back wall with ivy or overgrown brush climbing up it. I feel like you are a very talented artist who produces work that is worth paying for and I encourage you to keep at it since you seem to enjoy it so much.  I wish you the best of luck with any projects you take on in the future!
9. ## Devlog #6: Beginnings of the battle system

You've made tons of progress!  Congrats!  Everything is looking great so far!
10. ## Long launch reflections

My theme in life has always been persistence. "I'm going to do this, no matter what." I was once bad at programming. But I kept at it. I got better. I was once bad at mathematics. But that wasn't enough to stop me either. I got better. etc. etc.  When people say, "I can't do X because of Y", then fix Y! "I can't make games because nobody will hire me." Don't let anything get in the way between you and your dreams :) It sounds like you're well on your way, so be persistent with your efforts. And don't... be on a one track mindset either. Round yourself out by exposing yourself to many different adventures, experiences, opportunities, and areas of knowledge. You never know when you'll use that as a part of making a game :)     I completely agree! :)  I do plan on tackling Java and HTML again in the future after I get a better grip on C++ (and C# now) as I know they will be extremely useful!  I've already started on the design side of things by designing levels for my own casual game and I hope to have at least the MVP done by the end of the year once I learn how to make Tile Maps in Unity (working on this now).
11. ## Long launch reflections

Thank you for sharing your story!  It gives me a lot of hope for my endeavours.  I learned some simple HTLM when I was in elementary school but lost it since I never used it after that.  Then I did poorly with Java when I learned it in high school, but now I'm doing great with C++ and have even joined a game dev club at my university!  My biggest hope right now is to reach the point you are at with your game with my own and I know to get there I have a lot of hard work ahead of me . :)
12. ## Beginnings

Thank you!  I look forward to sharing my projects with you all!
13. ## C++ Going Beyond Basics

Maybe try a simple text based RPG?  It's something you could start now and keep it simple (just input, output) and eventually add things such as arrays and file input and output and use it as a basis for GUI and classes once you get there.   I had started something like this (and regrettably don't have access to the code at the moment) over the summer since I am pretty much a beginner too, but I haven't really touched it in a while so I haven't gotten very far