-
Posts
339 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Paul Thomas
-
-
The example from MSDN works pretty good. At the moment I'm just struggling working with TCHAR* so I've changed it around to use CHAR* instead. Anyone know how to use TCHAR*? For example, to print the results of a TCHAR* to a file and/or to try and compare it with a string? I haven't tried to compare it with a string yet since I couldn't even get it to print correctly.
-
I spent all day working on this, rewrote the code a few times, a couple methods weren't reliable enough, and this is basically my last chance (before reverting to the best method so far). I'm using a named pipe from BlitzMax to my DLL. The message is sent but once I send another message it crashes the DLL loaded application (I can't specifically say what that application is, but this application loads/binds the DLL).
I need to this to be a continuous evaluation for sent messages only to stop once I manually close the handle. If what I'm doing isn't doing that, please let me know how to fix it. I'm not very good with C++ and I haven't had much practice having BMax use Win32 external functions, although I got this to work on the first try, I brush it up on hair pulling luck.
C++/DLL side:
void BeginPipe() { _beginthread(BeginPipeThread, 0, NULL); } void BeginPipeThread(void* pParams) { LPTSTR _PIPE_NAME = L"\\\\.\\pipe\\RhysPipe"; char Received_Buffer[256]; DWORD BytesRead = 0; HANDLE hPIPE = CreateNamedPipe(_PIPE_NAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, 256, 256, 10000, 0x00000000); if(hPIPE != INVALID_HANDLE_VALUE) { int Connected = 0; while(!(GetAsyncKeyState(VK_F8))) { Connected = ConnectNamedPipe(hPIPE, NULL); if(Connected == 1) { BOOL bRead = ReadFile(hPIPE, Received_Buffer, 256, &BytesRead, NULL); if(bRead != 0) { // write message for testing ofstream myfile; myfile.open("WriteTest.txt", ios::app); myfile << Received_Buffer << "\n"; myfile.close(); } } else { CloseHandle(hPIPE); } } } DisconnectNamedPipe(hPIPE); CloseHandle(hPIPE); }
I execute "BeginPipe()" as this needs to be on a second thread to not freeze the application waiting for a message.
And the BMax side:
Const GENERIC_WRITE:Int = $40000000 Const OPEN_EXISTING:Int = 3 Const INVALID_HANDLE_VALUE:Int = -1 Extern "Win32" Function CreateFileA(lpFileName$z, dwDesiredAccess:Int, dwShareMode:Int, lpSecurityAttributes:Byte Ptr, dwCreationDisposition:Int, dwFlagsAndAttributes:Int, hTemplateFile:Int) Function WriteFile(hFile:Int, lpBuffer:Byte Ptr, nNumberOfBytesToWrite:Int, lpNumberOfBytesWritten:Int, lpOverlapped:OVERLAPPED) Function CloseHandle:Int(hObject:Int) Function CreateEventA:Int(lpEventAttributes:Int, bManualReset:Int, bInitialState:Int,lpName$z) EndExtern ' OVERLAPPED ' Type OVERLAPPED Field internal:Int Field internalHeight:Int Field offset:Int Field offsetHeight:Int Field hEvent:Int = CreateEventA(0, 0, 0, Null) Method Delete() If hEvent CloseHandle(hEvent) EndMethod EndType Global hFile:Int = CreateFileA("\\.\pipe\RhysPipe", GENERIC_WRITE, 0, Null, OPEN_EXISTING, 0, Null); Local buffer:Byte Ptr Local bytesWritten:Int Local MyString:String = "THIS IS A TEST FROM BMAX" buffer = MyString.ToCString() If hFile WriteFile(hFile, buffer, 256, bytesWritten, Null) EndIf
Again, it works, but when sending a second message, it prints, and then crashes. Not exactly sure why but I'm too novice in C++.
Any help would be appreciated.
-
It wasn't a complaint it was an observation. An observation of the future of mobile game sales due to the markets current structure. If Valve kept filling their store with a ton of low quality games how long do you think people will use Steam? Same observation, except Steam has requirements, and mobile markets don't - so it will fill up with low quality games because people think they will make the next Angry Birds.
Wording it the way you did makes it sound like indie developers shouldn't work hard on a game that meets a standard and/or that indie developers don't have the ability to meet those standards. That would be fine for free games but that isn't ideal for any game expecting a decent profit or reputation.
That's the next problem, who would spend money marketing a game that costs $2-5? You basically wouldn't or you would severally limit the amount of funding going into marketing. However, there is one part that has potential, and that's in-game advertising. If the game was popular enough it could raise a very healthy monthly income.
-
Yeah but there is one difference. You can try to saturate the console market all you want, it started/starts at $60-50 per game, and it would be a slow decline due to license fees and the work involved. However, everyone and their mom can make, release, and sell a mobile game. When the mobile market becomes saturated, which it most likely has already begun, the average price of a mobile game being at $2.00; soon games will be 10-50 cents or stuck at $1.00 but will be five million different games in the store. Ten to a hundred of them will be similar to a game you release, all competing over $1.00, and that makes it a diluted market. No longer would it be worth it to release for that platform since PC/Mac/Linux/console are still an average $40-60 per game.
That, or the opposite, the big name studios step in, the markets increase fees, tightening game quality requirements, and then mobile games are $20+. Sure, now you can sell them for $20, but sale amounts will decrease (again, you have played a mobile game?) and the market is once again dominated by the big name studios. But I doubt that would ever happen, because, again.. have you played a mobile game? lol
Big name studios have always had that problem. They rely completely on graphics and tech to be a selling point to their games. When Battlefield 3 was coming out, ALL I heard was how great the graphics are, and not one person who mentioned the upcoming release of BF3 to me mentioned what the game-play was like, or the storyline, or anything else besides the look of the game. Then it's hilarious to me to watch the same people playing BF3 on Steam for a few days and STOP playing. Why? Because it's the same game in a new dress. Can those studios NOT concentrate on an interesting storyline? Interesting mechanics? A single-player mode that doesn't take two hours to complete? Lmao.
Anyways, it will definitely be interesting to look back at this thread within a few years.
-
I just kept going past this thread, not replying, because it involves studying the subject in-depth before actually knowing what's all going on to have a real informed opinion. However, has anyone here played a game on a Droid X or similar device? It's stupid. The most awkward way of playing a game ever. I see this 'high rise' in mobile game sales all due to being the latest tech fad. It's still new so people are going to go crazy over it. What were the sales like for PSP when it came out? Nintendo DS?
Taking a look at that chart, those are sales amounts, not profit amounts correct? I've looked around randomly at mobile games for sale, it seems the average price for a mobile game is, what, $2.00? 1.2 million sales of mobile games pulling in 2.4 million in profit but 1.2 million sales of console games pulling in 50.2 million. Not really a margin I would care about. The only part I would care about is making a game, even a dumb game, would be fun to make for a mobile device. Really only because it's new.
Also, I can believe mobile game sales are increasing faster than console games, why? Not only because it's new, but people are lazy. It takes only a couple of minutes and $2.00 to buy a game on the mobile market but it actually takes effort to go to your local store and purchase a console game. That or order it online and wait a few days. If you break the laziness you get the dollar. And in the case of mobile games, only a couple dollars per sale.
Overall, if you want the longest reach possible, you build for all platforms, but that takes a lot of work. Sure, you can compile code for all platforms usually with a bit of a different setup and engines have made that possible with different button clicks. However, the art side is much more difficult than that. You cannot use the same quality meshes that are standard for console/PC for mobile. Therefore, a game directly designed specifically for a PC, or console, most likely won't work the same for mobile; you might as well pick one or the other.
I personally would like to see LE3 on all platforms in the future but support PC/console over mobile.
-
if roll < 0.02 then roll = 0.02 end
Otherwise wouldn't it just disappear if roll was below 0.02?
-
I think you're looking for is "last insert id" and for CPP I believe its:
sqlite3_last_insert_rowid(DATABASE)
That's for when you just insert and you want the row created for the insert. Otherwise, you would use the integer primary key as identification, or the shortcut "rowid".
-
That is awesome MG, great job.
-
Sweet because I already have everything else
You never made my request a while back for extremely tall grass similar to Far Cry 2. I'm sure someone like you could whip it up within minutes
-
Seems like you had beaten around the bush () on that question. Does this pack include new assets or are they just assets you've already had on the store stuffed into a new pack?
-
Is this still going? Coupon code isn't working, don't know if it's over, or just not working for me.
-
That sound effect pack is great, especially for random standard sounds. Would be great to find more that is just like that pack.
-
Curious if anyone knows of any sound effects libraries that can be purchased? Looking for a vast amount of sound effects, for commercial use, and for various topics (from weapons to impact sounds).
Thanks.
-
Hate to bring up this dead horse of a thread, but I've had to revert to Macklebee's suggestion since "DottedIP(HostIp(HostName(localhost)))" returns the routers IP when the real IP is required.
-
Thanks. Not sure how you found it but glad you found it, lol. It's the project that went to E3 2011 I mentioned in a status (that I was preparing for at the time) I wrote a little while ago. We've also acquired our UE3 license.
-
Yeah, they bundled it as standard for the IRC protocol. When going to an IRC address though it'll ask if you want to use Mibbit or a program.
-
Or type in the IRC address in Firefox since Mibbit comes bundled with Firefox (since version 3.5).
-
Nice work, Pixel. Was waiting for another progress update from you.
-
Curious what your overall objective is, as sometimes the answer to the problem is actually a different plan/solution. I should probably read your other posts too before posting this.
-
lol
-
How is this going, Cole?
-
I was enlightened LOL
-
Nope, but sounds like an interesting walk.
-
lol
You can make entire structures collapse with Apex. You sell the whole thing short by judging only what you see in a few videos. You can fracture the whole wall, the whole pillar, the whole floor, and so on. What people decided to do with Apex and show on their videos is only a fraction of what can be accomplished.
Named Pipe
in Programming
Posted
Yeah, I've read that during my long extensive search trying to convert TCHAR* to std::string or std::wstring but it never prints anything.