Show us yer programming projects!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
korruptor
Baaaaaa!
Baaaaaa!
Posts: 4291
Joined: Sun Sep 22, 2002 10:35 am 0
Location: Under The Northern Lights
Contact:

Re: Show us yer programming projects!

Post by korruptor »

I do that on the Amiga as well :D
"Don't go into a trance boys..." :: DJ Mixes
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Re: Show us yer programming projects!

Post by piku »

Right, I see. So it's a kind of bar graph of which routines get called the most during each frame, combined with how much 'spare' processing time you've got left each frame?
return (0);
User avatar
t0ne
Baaaaaa!
Baaaaaa!
Posts: 3134
Joined: Wed Sep 11, 2002 8:48 am 0
Location: Bristol

Re: Show us yer programming projects!

Post by t0ne »

Hahaha I'd forgotten all about that, I used to do that on the Amiga too :D
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: Show us yer programming projects!

Post by Dio »

piku wrote:Right, I see. So it's a kind of bar graph of which routines get called the most during each frame, combined with how much 'spare' processing time you've got left each frame?
Yep, exactly. Also lets you know when in the frame you're doing various bits, if you have stuff that needs to be in sync with the video controller somehow.
User avatar
super charlie
Baaaaa!
Baaaaa!
Posts: 1809
Joined: Wed Mar 31, 2004 7:53 pm 0
Location: Ipswich, suffolk
Contact:

Re: Show us yer programming projects!

Post by super charlie »

Ker-blammo! Getting there now :)



Cheers
Charlie
Visit my website here to have a look at my game.
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Re: Show us yer programming projects!

Post by gravy »

Muttley wrote:Pre-ST too. I used to do that on the C64. :D
Same here :) and use a easy wipe off marker on the TV to keep a record of how long this took :D
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: Show us yer programming projects!

Post by Dio »

Ahahaha, that's right! I used to use bits of blu-tack.
User avatar
korruptor
Baaaaaa!
Baaaaaa!
Posts: 4291
Joined: Sun Sep 22, 2002 10:35 am 0
Location: Under The Northern Lights
Contact:

Re: Show us yer programming projects!

Post by korruptor »

Screenshots, innit. I'm all modern now :D
"Don't go into a trance boys..." :: DJ Mixes
User avatar
evilpaul
Baaaa!
Baaaa!
Posts: 811
Joined: Wed Sep 29, 2004 2:01 pm 0
Location: #ukscene, helsinki branch
Contact:

Re: Show us yer programming projects!

Post by evilpaul »

gravy wrote:
Muttley wrote:Pre-ST too. I used to do that on the C64. :D
Same here :) and use a easy wipe off marker on the TV to keep a record of how long this took :D
Hahaha! Bits of post-it notes for me. That was proper profiling that was. Thaks for the reminder =)

Oh.. and another use for border colouring is for showing error codes, especially during initialisation. Set border red, set up memory, set border blue, set up audio, and so on. If the prog then crashes with a solid border colour you know where it went. Still do this in my Speccy demo engne. Is it the Amiga OS that did something like this too?
User avatar
sdetoni
Baaaaa!
Baaaaa!
Posts: 1368
Joined: Tue Jun 18, 2002 4:14 am 0
Location: New Sheepland

Re: Show us yer programming projects!

Post by sdetoni »

Dio wrote:
sdetoni wrote:* Added a nifty feature which shows me CPU usage per frame, more red shown == bad.
If that's a simple palette switch, you've just reinvented colour bars, the oldest and still best way to profile a frame-per-frame app :D . Use multiple colours for different types of workload and you'll never need anything else.
Yeah, very very simple but effective method to gauge cpu load.

Code: Select all

for(;;) // game loop
{
        ... other Game rendering/obj moving stuff ...


        // restore backdrop (some lines were drawn with another colour to show cpu usage)
        BG_PALETTE_SUB[0] = 13 << 10;
                                        
        // ----- double buffer sprite loading/rendering -----
        swiWaitForVBlank();  
                
        BG_PALETTE_SUB[0] = 31; // set backdrop to show cpu usage

        ... other context switching stuff 


}
User avatar
evilpaul
Baaaa!
Baaaa!
Posts: 811
Joined: Wed Sep 29, 2004 2:01 pm 0
Location: #ukscene, helsinki branch
Contact:

Re: Show us yer programming projects!

Post by evilpaul »

Here you go then... border colour profiling in action! :D

Here's a Speccy sprite engine I started working on this week when I hit a dead-end with my other projects:
Image
Three sprites on the screen, occluded by the green/black squares
Yellow is drawing the sprites
Purple is calulating the sprite
Green is drawing the colours

Two draws per frame, per sprite in case you were wondering. One to erase old, one to draw new

PS: Barney, ZXSpin doesn't save border colours correctly when you do "save current screen". At least not my version :(
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Show us yer programming projects!

Post by Barney »

evilpaul wrote: PS: Barney, ZXSpin doesn't save border colours correctly when you do "save current screen". At least not my version :(
I'll look at it - it'll be broken at the moment because of the new graphics routines. Does yours do the new 64 colour ULA emulation? If not then get this:

http://sites.google.com/site/pauldunn/ZXSpin_07q.zip

Which may well have border saving fixed. Beware about saving GIFs with FLASH support, that will remove the border. Other file formats (including animgif) should be fine.

Edit: Here's a few screengrabs of the 48k Speccy doing C64 hires screens:

Image

The last one is a digitised 24bpp colour image. The algorithm isn't perfect yet, but it's getting close. 64 Colours are really taking off now, with a few people jumping on the bandwagon - should see some games that take advantage of it soon :)
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Re: Show us yer programming projects!

Post by piku »

http://www.vimeo.com/7608931

Finished the oh-so-fun menu code for my game engine. Now it's time for some sprites.
return (0);
User avatar
tufty
Sheepie Whore
Sheepie Whore
Posts: 12525
Joined: Fri Jan 07, 2005 4:52 pm 0
Location: French Alps

Re: Show us yer programming projects!

Post by tufty »

piku wrote:http://www.vimeo.com/7608931

Finished the oh-so-fun menu code for my game engine. Now it's time for some sprites.
Lookin' good.
"massive retard™", "full of shit™", "tiny bitch™", "retarted™", "a bit of a one trick pony™", "petty™", "simple minded idealistic twat™", "miserable humourless fucker™"
User avatar
Devlin
Baaaaa!
Baaaaa!
Posts: 1380
Joined: Tue Aug 02, 2005 10:53 pm 0
XBL Gamertag: Anarkhis
Location: Bradford, Sacred Sod of God's Own County
Contact:

Re: Show us yer programming projects!

Post by Devlin »

piku wrote:http://www.vimeo.com/7608931

Finished the oh-so-fun menu code for my game engine. Now it's time for some sprites.
don't use pcx files, you'll really regret it in the future. eventually you'll reach a stage and realise that it's useless for just about everything.
Post Reply