Dark Bit Factory & Gravity
PROGRAMMING => C / C++ /C# => Topic started by: da_fatstuff on August 27, 2007
-
Hi,
Just in case it's of any use/interest to anyone I thought I'd post the source to a putrid 4k scroller I've done largely based on stuff I've found here at DBF...it's just something I've used for tinkering with OpenGL in my spare time, so it's not great/clean as I'm new to it, but it might be useful/interesting to someone else also learning.
It started with a port of a Freebasic 2D Shockwave scroller, then Slippy cleaned it for me (forum link :http://dbfinteractive.com/index.php?topic=2267.0 (http://dbfinteractive.com/index.php?topic=2267.0)) and put into the RBraz's 4K framework...I then found/used Jim's copper-bars routines and changed them and added some boxes and more colour to make as much of a headache in <4k (when linked with Crinkler http://www.crinkler.net/ (http://www.crinkler.net/))as I could...I had a few bytes left but couldn't think what to add as it's already cluttered ;)
Runs well on my desktop/laptop machines here, but they're pretty good so you might see it in slow-motion if yours aren't...anyway, hope you can run it, and hope you like it.
-
I am temporarilly gutted :P
I ran the exe and to me the colours looked just like the sort of colours I love. Unfortunately for me though it ran really really fast, too fast to see what was going on in fact so I disabled hardware acceleration on my gfx card and then everything ran really too slow.
What I am asking is could you possibly make a version that synchs to 60 hz or something similar? :)
I'd really like to see this as it looks really promising.
-
Psychedelic man!
Jim
-
Yes, it looks a wee bit Jeff Minter inspired ;)
Re timing: when Slippy kindly optimised it I think the version he downloaded didn't have the timer in, but for me it seemed to work quite well across my PCs so I assumed there was some alternative magic under the covers working that I didn't know about...
...I've quickly attached the code & exe to run at 70Hz (a little bit manic, but I liked this best) - I hope it runs ok on yours, adjusting the FPS var near the top of Main.cpp will set it to whatever FPS you like (if you have VC++2005 to rebuild it...and it should build fine in debug mode if you don't have Crinkler).
[Edit] Jim found bug in native.h's ftol/ftol2 methods - corrected version now here instead, just in case
-
Looks like the KillTimer has cleaned up the exit :)
Jim
-
It's awesome...
Thanks a lot for the source as well, think I can learn a lot from it. I like the effects, and I hope I some day can be just as creative by myself :)
-
Im sure this is really cool, but I cant get the exe to run under Vista.
-
What happens for you Clyde? It works for me OK on Vista.
Jim
-
It takes ages to launch and freezes up. I need to run Task Manager to end the process.
-
I cant get the exe to run under Vista.
Possibly irrelevant, but I have a PCTools firewall which will BSOD with any Crinkler application - I assume whatever it takes exception to, something else can and Vista is (probably) better built to prevent such crashes but may hang the app instead...so just in case it is relevant I've attached the debug (non-crinkled) version here.
-
Dude, that is diamond works a charm.
And further - Very impressive indeed, welldone all that in 4K! :)
Cheers,
Clyde.
-
I don't get problems with crinkler, UPX, or kkrunchy, but all the 'dropper' ones fail on Vista and I had a problem with a UPACK exe the other day. I use Windows Firewall and AVG. Perhaps some virus checkers get very upset with crinkler exes too?
Jim
-
first one did nothing besides allocating around 500mb's of ram before i terminated it with the taskmanager. the uncrinkled one worked though :) not really my cup of tea with the colors and such but the scroller itself was pretty cool :)
-
I don't get problems with crinkler, UPX, or kkrunchy, but all the 'dropper' ones fail on Vista and I had a problem with a UPACK exe the other day. I use Windows Firewall and AVG. Perhaps some virus checkers get very upset with crinkler exes too?
Jim,
Probably the problem with droppers is that they use C: by default which is blocked under Vista. Dropper itself allows you to specify the current directory but its a few more bytes so most 1k/4k .coms dont have it.
Crinkler 1.0 had problems with Vista but 1.0a fixes them so sometimes a crinkler compressed exe can blow up under Vista. There is a /fix flag in 1.0a to fix such exes if anyone encounters them.
Most virus checkers somehow patterm match the PE header to see if it conforms to a standard form but crinkler and maybe the other exe packers use the 0 bytes in the PE header for data which of course then shows up as a virus.
Chris
-
Runs well for me!
Call me old fashioned, but I love coder colours and this really appeals to me.
Also I appreciate the way that you included the whole project for people to learn from your code, as you said in the same spirit that you learned. :)
That's worth some good Karma, thanks for posting it.
-
Cheers for all feedback, I'll try something more tasteful next time...not sure I'm capable though ;)
-
I'm sure that you are :)
-
However, tasteless seems to be in right now :D
Jim
-
Nice stuff, keep it up dude!
-
Yup. Nice one. Like the scrolly. Keep it up!
-
Nice one!