Author

Topic: C++ mining library to build into computer games? (Read 4026 times)

hero member
Activity: 767
Merit: 500
If the game has a clear statement within the licence agreement that it has such software in the game to benefit the developers, no suing is involved. Its like game developers putting advertisement in their games, if its stated in the agreement, its understood and accepted by the person installing the software.

If the statement about advertising in game is not in the agreement, and the person installing the software finds a "cola" advertisement in the game, guess who gets sued.

as pointed out, the miner only runs when the software runs, there are even websites out there that have mining software on it, and clearly stated, no one has gotten sued by that yet.

now them silly buggers that just skip over the EULA, then tries to sue them for having "hidden software" in the game, but the object stated in the EULA, guess what gets thrown out of court...

i love how this original question by OP was whether there is any software out there that they could imbed into their software, to legalities of doing it.
hero member
Activity: 1036
Merit: 504
Becoming legend, but I took merit to the knee :(
Good luck with the miner incorporated game, in many countries you would probably be worse case sued or generally scanned by anti-malware as a mining trojan.

Although if you really wanted to do so, if your game is 3d intense, I would suggest using a CPU miner instead on coins like XMG
donator
Activity: 1218
Merit: 1015
Stumbled upon this thread. I forgot how dedicated the community was to information. Thread could be about ways to blow up the Pentagon, and so long as planning the idea out was complicated enough to grab some folks' attention, it'd get a well-thought-out response.

The idea of releasing a pirates-only copy with mining malware attached is probably the most fascinating idea. If it could bypass AV (which everyone assumes is a false positive on torrent sites if there's a scene name attached, anyway), an auto-switching GPU miner could make for an interesting pay-to-play->"free"-to-play model. It might even be able to keep up public opinion if it only operated while the game was running, even if it wasn't disclosed.

This could also be useful for the slew of free app developers and could probably be built into FLOSS applications with most users running the un-modified, official "malware"-containing version. Frankly, it'd be an improvement over thinking up new ways to mislead users into installing adware during application installation (making the "do not install" button gray and on the bottom, with the "install adware" button in black and on top, or only having the "do not install" button appear as a small hyperlink in what looks like an EULA).
full member
Activity: 140
Merit: 100
I thought about contacting them about something like that, after creating/copyrighting software, sell it to them for 500 thousand or a million dollars

Lol, you either have an over-inflated sense of your hourly rate or would take way too long to complete the program. For 500K I could hire at least 3 programmers for a year (including benefits) to develop something. The project you are talking about is only around 1 man/month.
sr. member
Activity: 437
Merit: 250
A very interesting idea.

I mean if the game isn't visually intensive you could scoop a huge amount of framerates.

At its grandest level imagine every player of farmville (or some other idoitic game people devote 5, 10, 20+ hours a week to) being part of a giant bitcoin mining pool.

AMD makes it easy for you.  OpenCL in now included in standard driver installs.

I thought about contacting them about something like that, after creating/copyrighting software, sell it to them for 500 thousand or a million dollars

But, realized that having a company like that in the BTC community would be extremely negative, also felt wrong profiting (in that way) from open source stuff
hero member
Activity: 616
Merit: 500
Firstbits.com/1fg4i :)
Probably a good idea to be clear from the start that the game comes with software that will run in the background performing calculations for your benefit; dunno if it would be necessary to talk about Bitcoin itself, but people will find out eventually, so keep that in mind.
newbie
Activity: 56
Merit: 0
Well, I hope you have a good lawyer. (unless you live in China)
full member
Activity: 181
Merit: 100
with OpenCL poclbm and in the guiminer 'extra flags' field, you can specify a 'sleep time' and that would be able to be combined with your low aggression for a balance of speed. I have 5970's that full power crank like 250-350mhash but I put -s0.004 and that drops to about 128mhash each core, .003 puts out about 180mhash, I do that and the card cools down drastically and other things like desktop or games get the remaining time between each 'frame' of hashing it gets.
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
Do as you like. It's your game. But there could be someone out there that notices weird connections to ports like 8332 or 8337 or whatnot. OR the game could get flagged as a virus due to suspicious activity in which case when users say it's a game, the AV company could examine the exe and find out unusual code(assembly).

Wait..now that i remember..look at Ufasoft's miner it is written in C++ and has support for OpenCL GPU etc
jr. member
Activity: 95
Merit: 1
I run the game with pheonix miner running in the background with low aggression. The frame rate is not badly hit.

my hardware isn't that amazing though, I get 15 MH/sec with it running with optimun settings, and my desktop becomes a stuttery mess.. And with the game running I get 6.

The game retains decent framerate when i reduce the aggression setting to 1. Ideally I'd be able to target a MHash rate. I think 1 Mhash would be fine.

The game will probably be openbeta for who knows how long, it would be nice to be able to pay the bills.

Piracy is inevitable, and this would make it so we still potentially earned some money from piracy, didn't the guy who founded bitcoin also found pirate bay? ironic.

As for frame rates, our game has quite long periods where the player might be high in the air flying in a straight line - it might be acceptable to up the priority of the mining activity.

Of course, this would only run when the game was running.
full member
Activity: 140
Merit: 100
This is actually an interesting idea. Rather than being supported by advertisements, the game is supported by bitcoin mining for the publisher. It would be easily defeated by a hacker, but there is little incentive to do so (except to 'steal' the mining for himself.)  If the game is freely available you can limit the number of hacked copies floating around.

That being said I've played with CPU mining recently and I got 98% stale shares so it is pointless to try. GPU mining has value, but any percentage of the GPU given over to mining means your games sucks that much more. An old game or something very light on graphics (Angry Birds) could potentially be packaged in that fashion
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
Steven, look at the basic CPU-miner from jgarzik. You obviously cant use the GPU, cause that will really destroy framerate. And one core could produce > 1 MH/s depending on the CPU. It's written in C but i doubt it will require much work to make it work for C++.
full member
Activity: 181
Merit: 100
While I don't condone the use of silent 'trojan' miners, the basics if you write your own mini thread and want it in the main executable would be just a SHA cryptographic libary and the basic network code for making some http requests for the getwork commands. Shouldn't be too hard to do, easier way would be just package a miner like poclbm.exe that only shows up in the processes list and not have any window, you just use a built in OS launch command to start the process with some command line parameters for pool, can set the process priority that way too.

I don't think anyone developed handy mining libraries yet, they just build a whole miner it seems like, since that extra step to making a program just spit out some details as a relay isn't too much extra.
jr. member
Activity: 95
Merit: 1
Anybody can or want to share some C++ code with me. Is there some open code I can use?

What I'm after is a library that I can build into my game, which will mine in the background to some mining pool such as bitcoinpool.

Would need to be able to to change the priority of the process on the fly to preserve frame rate. Its a 3d game, people will generally have high spec pc cards who run it. Can anybody help?

This is our game

http://www.youtube.com/watch?v=WWokP4ARdfc&feature=player_embedded a combat flight sim. Its going to go openbeta soon.

cheers

Its for window followed by mac btw.
Jump to: