Screen-Smash - Test My Game!!!

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Screen-Smash - Test My Game!!!

Post by thetoddfather » October 26th, 2012, 4:33 am

Need input from you guys if this works or not. Tested it myself now on 5 computers, all running Windows 7, both 32 and 64 bit OS. All my computers run it great, but Asimov tested it and got a white screen.

Need input from you guys on what you think and if it works, hope you like it!

Toddfather.

Lorth
Posts: 139
Joined: July 19th, 2012, 4:12 pm

Re: Screen-Smash - Test My Game!!!

Post by Lorth » October 26th, 2012, 8:20 am

Not much of a game but kinda awsome :D

first i didn't know what is was intill i readed the titel of this post again :P

But i got a little bug as it only overlaps halv of my Start meny...( don't know the proper name)
as a axample, as my window is 1280x800. The game appears in i would think 1280x780 or something so it cuts my start meny in half at the bottom of the screen.

anyway a nice effekt :P

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Screen-Smash - Test My Game!!!

Post by LuX » October 26th, 2012, 10:45 am

As I posted earlier, this too crashes but manages to create the screenshot image. How exactly does your screen creation code look like? Since it doesn't seem like "true" fullscreen more like a streched form.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Screen-Smash - Test My Game!!!

Post by chili » October 26th, 2012, 11:02 am

Works for me, mostly. There is a window border visible at the bottom of the screen though.
Chili

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Screen-Smash - Test My Game!!!

Post by Asimov » October 26th, 2012, 1:58 pm

Hi TodFather,

This one doesn't crash, but it doesn't open the window in the centre of the screen. I could only see the bottom part of the screen offset to the left. About an inch of the bottom I could see.

I do not think this is a true full screen. It looks like a windowed screen.
However the smash sound worked when I clicked on it.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Re: Screen-Smash - Test My Game!!!

Post by thetoddfather » October 26th, 2012, 4:11 pm

Hi everyone,

Thanks for the input. Sounds like I am getting somewhere anyway.

Lorth, no it's not much of a game, yet. I have plans for this little project :) If you ever tried the 'Desktop Destroyer'/'Stress Relief' program, done by a guy named Peter with his 'Peter Tools', it was something a spent a lot of time messing around with. Loved that program/game. He had features that allowed you to put termites the eat your screen, and burn it and such. Good fun, and started to be at least game-like. Glad you enjoyed! Yes, this is an issue I posted on another forum I need help with. I have ZERO windows programming experience. I messed around with the windows.cpp and managed to increase the window dimensions and at least 'hide' the bar at the top, but I do not have a clue how to make this a "true" fullscreen program.

Lux, sorry, I missed your earlier post. I believe all of these crash issues revolve around my inability to understand what is happening in the windows.cpp file. Any help you or Chili, Asimov, Lorth or anyone else can offer on how to start a program in fullscreen would be very much appreciated. Here is my code for the window creation:

Code: Select all

RECT wr;
	wr.left = 0;
	wr.right = screenWidth;
	wr.top = 0 ;
	wr.bottom = screenHeight;
	AdjustWindowRect( &wr,WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU,FALSE);
    HWND hWnd = CreateWindowW( L"SmashScreen",L"SmashScreen",
                              WS_CAPTION | WS_MINIMIZEBOX |WS_SYSMENU,wr.left,wr.top,wr.right-wr.left,wr.bottom-wr.top,
                              NULL,NULL,wc.hInstance,NULL );
	ShowWindow( hWnd,SW_SHOWDEFAULT );
	UpdateWindow( hWnd );
screenWidth/screenHeight are globals that are set at runtime by the screen capture function. The function uses your printscreen/clipboard to create the bmp, then uses that bmp's info for the program's screen dimensions.

Later, I call: SetWindowPos( hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
to ensure it is on top, no movement or tampering. Could be redundant, but I don't think it's harming anything.

Chili, sweet, you have my exact result. Just can't get those last stubborn pixels at the bottom to leave.

Asimov, I think once I get this properly coded to go fullscreen it SHOULD fix your issues too :)

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Screen-Smash - Test My Game!!!

Post by LuX » October 26th, 2012, 6:03 pm

The code you gave doesn't tell too much...
ʕ •ᴥ•ʔ

User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Re: Screen-Smash - Test My Game!!!

Post by thetoddfather » October 26th, 2012, 8:14 pm

OK! I think we are up and running.

Anyone that had issues, try the new version :)

HOPEFULLY there are no new issues and the old ones are now gone.

This SHOULD create a near flawless replica of your desktop for you to destroy at will. If it's up and running nicely I can start adding some new funtionality. Let me know what you think, and if it's running smoothly for you now.

Disregard the messed up icons. I am having a little less success with my attempts to operate the resource editor.

Thanks again!
Toddfather.

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Screen-Smash - Test My Game!!!

Post by Asimov » October 26th, 2012, 8:40 pm

Hi Todfather,

Good news is this. It worked without crashing, and it worked well. It worked so well I thought it hadn't worked until I clicked the left mouse button and my screen smashed.

Ok the bad news. When I moved my mouse pointer to the bottom of the screen the fake screen got pushed up about an inch, and that ruined the illusion.

Now once you have that prob sorted I think you should have more than one smash shape and they would be random.

Also when you have so many smashed they start to disapear.
I think a great way to end it would be that there would be so many smashes that the whole screen would fall apart revealing the real screen.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Re: Screen-Smash - Test My Game!!!

Post by thetoddfather » October 26th, 2012, 9:01 pm

Asimov, thanks for the quick reply. I KNOW, it's almost scary how perfect it loads. If it works as well as mine you literally almost cant tell when the program is running or not.

DAMN! new issues hey? Ran the program again and I do not get this problem... I almost hate it more when I don't cause I have no clue how to address it now. Maybe someone else can point us in the right direction.

Yes, currently the maximum 'smashes' is 15 I think. It's easy to up that as it's just a #define for now. That would be a fun way to end the program though. The animation for that would pobs be way beyond my abilities though.

I am going to start by randomizing the current image's placement. So it will have four different states, each one inverting x,y or both so one image 'appears' four different ways. After that I will probably add some others as well.

The goal is having many tools with which to get your revenge on your computer for causing you frustration lol. The original that gave me the inspiration for this had a chainsaw, flamethrower, hammer (Currently my only Tool), laser, machine gun, termites and some color blob thingy). I'll be following this somewhat, with the mouse rightclick opening a menu from which you choose new stuff to smash with, but probably not the color one or laser. And the termites will probably be the smiley face eating your desktop to the sound of "NOM NOM NOM")

So, I have LOTS planned for this, but I don't want to dive in until I have it working nicely on MOST systems.

Post Reply