scroll source code while playing

Help center. Members helping members
Forum rules
This topic is 14 years and 1 month old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
squeaks182
Member
Posts: 5
Joined: February 27th, 2010
Reputation: 0

scroll source code while playing

Postby squeaks182 » Sat Feb 27, 2010 6:10 pm

hi, i was wondering if there was any way of showing the source code while playing the game? i'm trying to get a bunch of high school kids into computers/coding/information systems, and i think showing them the game would be a great way to get their attention, but i think displaying the source code would really help push the idea that there's just a bunch of code behind this thing. i've tried searching around, but couldn't find any answers. any help would really be appreciated!

great community, btw! keep up the good work.
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: scroll source code while playing

Postby lordhardware » Sat Feb 27, 2010 8:09 pm

squeaks182 wrote:hi, i was wondering if there was any way of showing the source code while playing the game? i'm trying to get a bunch of high school kids into computers/coding/information systems, and i think showing them the game would be a great way to get their attention, but i think displaying the source code would really help push the idea that there's just a bunch of code behind this thing. i've tried searching around, but couldn't find any answers. any help would really be appreciated!

great community, btw! keep up the good work.


you could copy and paste most of it into Windows Movie Maker as a "Credits title" then export it as a movie and convert it to a supported video file... then use that as a background
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10
squeaks182
Member
Posts: 5
Joined: February 27th, 2010
Reputation: 0

Re: scroll source code while playing

Postby squeaks182 » Sat Feb 27, 2010 11:17 pm

yeah, i was thinking about doing that, but i'd like to do some sort of dual monitor setup where as their playing on one screen, it has another monitor on the side scrolling the text. i want to make them disoriented :smile:
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: scroll source code while playing

Postby lordhardware » Sat Feb 27, 2010 11:57 pm

well the source isnt accessed in that kind of fashion, once all the calls are made and the files loaded their arnt many checks being made while the songs are playing so the video option will be the most viable i think.
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10
Bridged To The Sun.
User avatar
acrox999
Member
Posts: 3597
Joined: March 22nd, 2008
Location: /opt/bin/fretsonfire
Reputation: 1
Contact:

Re: scroll source code while playing

Postby acrox999 » Sat Feb 27, 2010 11:58 pm

I'm not sure if this helps but try this:
Toggling the Debug Layer

In FoFiX's main menu, pressing ALT + D will toggle the Debug Layer on and off. This layer provides real-time information on the inner workings of FoFiX, and could be of use to some advanced developers.
This should be togglable anywhere; except that further layers of menus and UIs have their own keyListeners and the ALT-D doesn't seem to make it all the way out to the FretsOnFire.py code. It does, however, work during gameplay (if you are not using "D" for any gameplay key) - you can toggle the debug layer on and off while playing the game.
Although this is probably simple to fix (passing ALT-Ds back to the main keyListener, for example), it is not necessary... toggle it on in the Main Menu and then go play and watch it. Restart the game or exit out to the main menu if you've seen enough.
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: scroll source code while playing

Postby lordhardware » Sun Feb 28, 2010 12:05 am

acrox999 wrote:I'm not sure if this helps but try this: Toggling the Debug Layer


I thought of that but i think he wants the WHOLE code, not just access calls, the debug wouldnt show much while the song was playing
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10
FoFiX Dev/Mod Squad
User avatar
jstump91
Member
Posts: 837
Joined: September 21st, 2008
Location: Baltimore, MD (US)
Reputation: 0
Contact:

Re: scroll source code while playing

Postby jstump91 » Sun Feb 28, 2010 12:14 am

acrox999 wrote:I'm not sure if this helps but try this:
Toggling the Debug Layer

In FoFiX's main menu, pressing ALT + D will toggle the Debug Layer on and off. This layer provides real-time information on the inner workings of FoFiX, and could be of use to some advanced developers.
This should be togglable anywhere; except that further layers of menus and UIs have their own keyListeners and the ALT-D doesn't seem to make it all the way out to the FretsOnFire.py code. It does, however, work during gameplay (if you are not using "D" for any gameplay key) - you can toggle the debug layer on and off while playing the game.
Although this is probably simple to fix (passing ALT-Ds back to the main keyListener, for example), it is not necessary... toggle it on in the Main Menu and then go play and watch it. Restart the game or exit out to the main menu if you've seen enough.


That's not quite what the OP wanted, but that is an invaluable way to see what is going on at a given moment - what classes to look in for the appropriate code, etc.

OP: Like in any big program, the flow of control is of course all over the place, but for showing that everything corresponds to specific chunks of code, picking out representative snippets of, say, the rendering methods will probably do the right thing.

(Note that in anything but vanilla FoF there do exist some places where the code quality is atrocious, though, and not something that you would want your students to see, lest they then write some of their own code in a similar way. One of our goals for the next major stable release of FoFiX is to iron out these areas and impose decent standards on how we code in the future.)
jstump91, a.k.a. john.stumpo, a.k.a. stump
jstump.com | stump's blog | FoFiX development | My own code
Can't find a Windows build of the Python module you need? Try my mediafire!
Don't say "Python can't do [insert task here]." Python can do anything with the right modules - said modules may just not have been written yet.
"Python - why settle for snake oil when you can have the whole snake?" --Mark Jackson
Did you search before you posted? Did you read the rules for the subforum you are posting in?
squeaks182
Member
Posts: 5
Joined: February 27th, 2010
Reputation: 0

Re: scroll source code while playing

Postby squeaks182 » Sun Feb 28, 2010 12:44 am

you guys are awesome! lots of great info here. if i have time, i think what i'm going to do is pop the code into final cut studio, animate it the way it would be called, then camtasia studio some game play. i'll split screen / re-size the two windows next to each other, and loop the playback. i'll display that on a separate monitor while they're playing on another PC... that should still do that trick :2thumbsup:

thanks again!
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: scroll source code while playing

Postby lordhardware » Sun Feb 28, 2010 11:11 pm

No problem :)
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10

Return to “Tech Support”

Who is online

Users browsing this forum: No registered users and 28 guests