Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
This question is actually a theoretical one, not about specific coding, but of the approach.
In my video game, there are a lot of phrases that protagonist is supposed to say. Now, I want to add a voiceover, so that someone will read those phrases aloud, so I can add them as sounds, not just plain text.
There are many different phrases.
So, the main question is, what's better, to have each phrase as separate sound file, or to have those phrases divided by sections (like game areas, or game actions or whatever), where each large file will contain a number of phrases. Then, in code, I'll order to play the large file not completely, but from specific time, to specific time (is it possible in WPF?).
What is important:
Time - which approach is easier to do?
Resources - which approach is easier for computer and\or visual studio compiler?
Copyright - I want to limit the possibility of end users stealing sound files.
I personally think that having a thousand of files is crazy, so it's better to use larger files that contain smaller ones. However, my friend highly recommended against it, claiming that playing large files from the middle is harder for computer and will cause problems, maybe slow down the game.
What option will you recommend? Or maybe there is another approach I didn't think of?
Thank you in advance,
Evgenie
I would imagine that using seperate sound files would be easier. Then within c#, add them all to a list.
From that I think it should just be possible to call the index of each sound file, which would be easy if you keep them organised, and labeled well.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to start coding on a holiday-project that recognizes enemies by analyzing screenshots in lifetime. In my research I read about computer-vision and machine learning. Up until now I only wrote a program that finds a green dot on the screen and moves the pointer towards it. However I'm struggling to figure out how to calculate in distance-based body sizes, shadowing, different player models, only small parts (arms, legs, heads etc.) showing up, finding the difference of dead and alive enemies and wayyy more. For the understanding of my problem I'll add some screenshots.
Thanks for answering!
http://prntscr.com/fwudav
http://prntscr.com/fwudxm
I'll first give a heads up: This is not a "holiday project". People make 6-7 digit USD salaries researching this.
Instead, I'll answer this with more of an education on how to break up and think about a complex problem like this.
Think about it as a human. If you, as a human, can't look at an image and determine what it is you are looking at, then neither can a computer you are trying to teach. Determine what it is that makes the "enemy" an enemy on sight, and then determine what needs to be visible in the image to be able to determine it. Looking for a "person" is difficult, and it won't necessarily make them an "enemy". Find something simpler about them, a logo, a type of hat, etc.
Once you know what to look for in the image, the first step is looking at 3d space and perspective. If you know how the image you are looking for can change, you can check for the changes.
Apply the same to other changes in a 3d space. Lighting, depth of field, etc.
The way to make this faster and easier for a computer is having a lot of just-different-enough sample data to check against.
The technology itself is comparatively new, and finding freely available algorithms and code to work with is not reasonable, but some information about its concepts and the problem can be found.
Some links to learn about what the technology is. Browse and go through the terms on these pages:
https://en.wikipedia.org/wiki/Reverse_image_search
https://en.wikipedia.org/wiki/Perspective_distortion_(photography)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Referring to this question that's already been answer:
"What is the best local-database solution for WPF applications?"
What is currently my best choice of local database for my program? Currently I am using XML that is automatically created on the computer when the user run my executable for the first time or when the XML is missing.
I am perfectly fine on using XMLs, users of my application would not be required to install any software other than my application and I can do exactly with it, but my problem is with searching.
My application includes a database (the XML) of all their songs in their music library, and of course each track has its own information and search through each track is really slow! since it's a music library, one user can have at least 1000 tracks or more and searching through it is really really terrible.
I am familiar on using SQL database, (i don't know the proper term for it) but one for online database, I use XAMPP and read the database on a website on PHP. And i really like it. So..
Basically, I am looking for a good local-database solution, where user's won't to download and install any other software (but I am okay, if i would have to include a certain dll to my exe in other to run), and also one that is lightweight and fast in terms of searching.
Yes, i've read the included related question as many times as i could for me to understand it myself but i hope someone can explain the advantages and disad of each of them.
No, i am not looking for one that needs to have a server or something in order for it to work
Previous suggestion is correct SQLite will be your best option because WPF operates .NET Framework. It also supports ODBC driver as i recall
I was going to just comment but can't quite yet.
I wouldn't say there's necessarily a 'best' in most cases. In general whatever you go with is unlikely to be that bad of a choice..
Having said that, I could suggest SQLite as an option for you. Lightweight, very fast, certainly good for strictly local-database options.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a game in C# and XNA and will be porting it using MonoGame. I would like to know which is a better option for performance.
Should I write and type out my maps in the code of the game itself, or should I create an XML file and store it in their?
By map I mean the layout of the tile-map. It looks like this if I type it in the code:
map.Generate(new int[,]{
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,},
}, 64);
I am new as a programmer and any advice should help?
Thanks, BlazeCrate
There will be neglagable performance difference between the two as no matter which you use they both will end up being stored as some kind of in memory object. The only potential difference in "performance" is how long it will take to make that in memory object once at the start of the level loading (for something that simple it would only take a few ms extra to load, likely unnoticeable)
Do whatever is easier for you to implement and develop for.
Doing it in XML would allow you to design an editor, so that you can use your own GUI to design your content, allowing you to more easily generate much more complex content. It also allows you to modify your content without recompiling your game.
That said, it depends on the scale of your project, and your goals. You should choose the simpler approach if possible, if you want to eventually release it. If you choose the more complex yet more scalable approach, you run the risk of making the project too complex to finish. If your goal is to eventually release, then stay as simple as possible, but if your goal is more along the lines of learning to be a good software engineer, then choosing the more complex approach could be the way to go.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I asked about this Q format on meta, and the they said that worded correctly, this should be appropriate. This being said, sorry if I still butchered the wording and just in case I'd like to get this across (as was recommended): I'm not looking for opinions on certain things or how they work, rather just the ways it's possible. I don't mean to sound ignorant and I'm truly sorry if I do, it was just suggested to me to say on Meta.
Now for the Q; What just general language at all would be capable of gathering information from public online websites, then putting it in the program where it could be further processed as just any old variable? I'm new to coding and wanted to do this as a little 'introductory' program, to teach myself some new stuff. Problem being, with my idea, I don't even know where to start. Again, I'm not asking for specific ways to do this, I was just curious what languages are capable of doing this at all? I'd prefer to do it in a Visual Studio's language (no preference of which ones), if that's possible.
In short: Are either Visual C#/C++ capable of gathering information online to be further handled within the program? If not, what languages are?
I agree with the comment that this is a complicated first programming task. However, you'll undoubtedly learn something trying it.
If you already had some experience programming in Python, I'd suggest you took a look at http://scrapy.org/doc/ which is a framework (that is, a bunch of classes and other useful tools) which let you write programs to extract information from web pages. Scrapy does let you concentrate on programming by taking care of some of the nasty details involved in parsing web pages.
Another option is to use a javascript framework, maybe something like node.js.
I've done a fair amount of web scraping, and I usually end up using a combination of utilities which clean up web pages and a variety of XSLT processors. I personally find that combination of technology to be easier to deal with; I don't try to use C-family languages until I've basically wrestled the data into shape. But everyone has their own style.
Good luck!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am starting to make my own apps and publishing them. The problem I face is that my apps are mainly for my purposes. What are some problems that you face while in windows? I need some desktop application ideas that are simple but helpful.
Rather than giving you a fish, I will humbly try and teach you how to fish:
Take a blank sheet of paper and write out as clearly as you can the problem that you want to tackle. Clarity is key because clarity of purpose gets your mind focused on what you are really trying to accomplish.
Think of at least 20 ideas and write them down on that once blank paper. Let your mind really flow and give up worrying about whether your ideas are practical or what other people will think about them.
Read over your list and determine which ones actually are good ideas. You might want to put the list away for a while and then take it out the next day to see if you still think those ideas pass whatever test you have for your ideas.
Lather, rinse, repeat.
Note that I don't necessarily know that I have a problem until you show me that I have a problem, and then show me how to fix it. Personally I think computers are still too hard to use, and I'm a programmer. Because my work life is so complex I like software and gadgets that are simple and elegant. MP3 players existed long before the iPod came out, but the iPod was able to get the mix right.
http://hubpages.com/hub/How-to-Come-Up-with-Good-Ideas