Author Topic: [Wireframe] Block Scroller  (Read 9603 times)

0 Members and 1 Guest are viewing this topic.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
[Wireframe] Block Scroller
« on: May 29, 2011 »
Here's my entry for the Wireframe compo.  Not quite managed what I'd hoped to achieve but at least I got something out the door before the deadline ;)

The scroller is created using cubes to represent pixels from a 1 bit bitmap font. It's coded in C++ and uses iq's RGBA 64k framework. The music is by LizardKing (awesome musician imho).  I had a few issues due to being really rusty with C++ and WinAPI stuff, but hopefully the demo will run for most people.

I'll upload a video soon too.  The sourcecode is quite a mess at the moment, but if anyone wants it, I'll tidy it up and release it.

There seems to be an issue with slight jerking of the scroller sometimes, I think this is due to stepping in the sinus but I don't have time to dig into it :(

Thanks for reading and hopefully watching :)

Raizor
« Last Edit: November 06, 2011 by Raizor »
raizor

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: [Wireframe] Block Scroller
« Reply #1 on: May 29, 2011 »
Well it runs on my machine, but the scroller is so fast I cant read it and everything looks a blur, probably could do with some delta timing unless you were going for super fast  ;)

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1289
  • Karma: 466
    • View Profile
    • my stuff
Re: [Wireframe] Block Scroller
« Reply #2 on: May 29, 2011 »
Looks nice and runs at constant 60 fps on my machine.
So TinDragon probably has VSync disabled?
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #3 on: May 29, 2011 »
Thanks Hellfire and TinDragon.

Yeah, doesn't go over 60 fps here either. I think Hellfire is probably right TinDragon. Have you disabled VSync on your vid card?
raizor

Challenge Trophies Won:

Offline padman

  • Senior Member
  • Pentium
  • ********
  • Posts: 977
  • Karma: 258
    • View Profile
Re: [Wireframe] Block Scroller
« Reply #4 on: May 29, 2011 »
Just x words, hang on i gotta count. It's six words: This is one bloody cool scroller!  :clap:

The widescreen detection is one neat feature too & it's nice to see a "newcomer" entry! Well done!  :)

Btw: I get 75fps here. And I have VSync enabled.
Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: [Wireframe] Block Scroller
« Reply #5 on: May 29, 2011 »
Looks pretty neat!
Ran a bit fast on my machine too, (around 300-600 frames per second).
I was able to view it by clicking my mouse on the window and freezing it in place ever second or so.
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #6 on: May 29, 2011 »
300-600 fps, a bit fast?? Oh dear. Sounds like something is amiss.

Thanks for the feedback :)

Will try and see if I can quickly limit the speed.
raizor

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1198
  • Karma: 229
    • View Profile
    • Homepage
Re: [Wireframe] Block Scroller
« Reply #7 on: May 29, 2011 »
200 fps here, single frames look cool though using Pixel_Outlaw's trick. :)
www.kirl.nl
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #8 on: May 29, 2011 »
I've attached a version with some forced vsync code. If the frame is rendering in under 16ms, it will block until the 16ms limit is hit.  It's a bit of a clunky fudge, but should hopefully stop the scroller flying along so far on certain machines. It might get a bit skippy though, due to the nature of the implementation.

If you don't need this version, I'd suggest using the other one. I've included both exe files in the attached zip.

Thanks for all the feedback so far, very useful and much appreciated :)
raizor

Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: [Wireframe] Block Scroller
« Reply #9 on: May 29, 2011 »
Much better speed now.  :goodpost:
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1198
  • Karma: 229
    • View Profile
    • Homepage
Re: [Wireframe] Block Scroller
« Reply #10 on: May 30, 2011 »
Yep, good speed now. Loved it, awesomely colorful and blocky scroller. Happy to fry my retina's on this! ;)
www.kirl.nl
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #11 on: May 30, 2011 »
Thank you Kirl and Pixel Outlaw :D
raizor

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17374
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: [Wireframe] Block Scroller
« Reply #12 on: May 30, 2011 »
I have a soft spot for scrolls!  Nice job Raizor, good luck in the voting.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [Wireframe] Block Scroller
« Reply #13 on: May 30, 2011 »
Welldone Dude!
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: [Wireframe] Block Scroller
« Reply #14 on: May 30, 2011 »
New version runs at a readable speed, looks really nice as well. On the vsync front, I dont have it forced off but it is set to off/application controlled, so unless an app. puts it on its off. But I havent ever changed that setting that i know of  ???

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #15 on: May 30, 2011 »
New version runs at a readable speed, looks really nice as well. On the vsync front, I dont have it forced off but it is set to off/application controlled, so unless an app. puts it on its off. But I havent ever changed that setting that i know of  ???

I'm not aware of a way to control vsync with OpenGL, so it looks like it's defaulting to whatever you card is set to. In your case this is 'disabled', so it races along.  Not sure of the workaround for this at the moment.  Thanks for the info though, it helps :)
raizor

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1289
  • Karma: 466
    • View Profile
    • my stuff
Re: [Wireframe] Block Scroller
« Reply #16 on: May 30, 2011 »
I'm not aware of a way to control vsync with OpenGL
There's an extension to set the swap-interval:
Code: [Select]
typedef BOOL (WINAPI *PFNWGLSWAPINTERVALEXTPROC)(int);
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT =
   (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
if (wglSwapIntervalEXT)
   wglSwapIntervalEXT(1);
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #17 on: May 30, 2011 »
Many thanks Hellfire :)
raizor

Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4379
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: [Wireframe] Block Scroller
« Reply #18 on: May 30, 2011 »
I really enjoyed this one. This scroll is one of the best scrolls I saw lately. Very well executed, mate.
It's cool to see you are back in C++ programming. Keep it up!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [Wireframe] Block Scroller
« Reply #19 on: May 30, 2011 »
Thank you Benny. It was good fun and I'm looking forward to doing bigger and better things in C++

I implemented you suggestions for my iPhone game by the way, single life etc.  Thanks again for those :)
raizor

Challenge Trophies Won: