[QUOTE=nullsquared;16550712]Starting work on an HDR renderer:
[img]http://imgkk.com/i/MhY2Ho.png[/img]
Looks right to me so far...[/QUOTE]
yeah that looks.. great.
It's all working except for some reason when I move the player ship to the right it fills the old position with black just fine, but it doesn't work when moving left. :geno:
Is that really faster? What if you got like 100 bullets?
I'm assuming whoever thinks I'm being funny has no idea whatsoever how HDR rendering works.
[QUOTE=nullsquared;16551018]I'm assuming whoever thinks I'm being funny has no idea whatsoever how HDR rendering works.[/QUOTE]
I feel curious.. How does HDR rendering work?
[QUOTE=bigdoggie;16551034]I feel curious.. How does HDR rendering work?[/QUOTE]
You render high dynamic range (HDR) lighting into a texture that supports such information, then compute the average luminance of the scene (which is what you see in my screenshot), and use that to compute the final lighting colour which needs to be displayed on the monitor (because the monitor is low dynamic range, or LDR).
[QUOTE=ZomBuster;16551006]Is that really faster? What if you got like 100 bullets?[/QUOTE]
It should be faster. I'm still testing it.
I want to make a compiler/interpreter. Something like my own programming language, but my idea is extremely vague right now and I don't know where to begin.
[QUOTE=PvtCupcakes;16550968]I'm working on optimizing my blitting for my space shooter.[/QUOTE]
Why are you optimizing something that's not slow?
[QUOTE=nullsquared;16549109]... pandora.
For 40 hours a month.
Fuck.[/QUOTE]
[url]http://thirteen23.com/experiences/desktop/echo/[/url]
I'll just sort of leave this here.
[QUOTE=nullsquared;16551179]Why are you optimizing something that's not slow?[/QUOTE]
So it runs better on slower PCs.
And it's a software renderer, so it's really CPU dependant.
And I just realized I'm doing it wrong.
I'm still using pygame.display.flip() which draws the whole screen anyway.
I need to supply pygame.display.update() with a list of rectangles that need to be drawn.
It needs to be like this:
1. Blit a piece of the background over the sprite's current location, erasing it.
2. Append the sprite's current location rectangle to a list called dirty_rects.
3. Move the sprite.
4. Draw the sprite at it's new location.
5. Append the sprite's new location to my dirty_rects list.
6. Call display.update(dirty_rects)
This will make it so it only draws certain parts of the screen instead of updating the entire screen.
I'm close at least.
[QUOTE=Chandler;16548617]Or you could just use Echo :v:[/QUOTE]
Note: This application is in beta and may not work outside of the US.
lol :V
[QUOTE=SteveUK;16551711]Note: This application is in beta and may not work outside of the US.[/QUOTE]
Wait there are people who live outside the US? :v: Plus if you live outside the US you should be using spotify.
[QUOTE=Chandler;16551243][url]http://thirteen23.com/experiences/desktop/echo/[/url]
I'll just sort of leave this here.[/QUOTE]
Windows Vista only
:(
[QUOTE=PvtCupcakes;16551314]So it runs better on slower PCs.
And it's a software renderer, so it's really CPU dependant.
And I just realized I'm doing it wrong.
I'm still using pygame.display.flip() which draws the whole screen anyway.
I need to supply pygame.display.update() with a list of rectangles that need to be drawn.
It needs to be like this:
1. Blit a piece of the background over the sprite's current location, erasing it.
2. Append the sprite's current location rectangle to a list called dirty_rects.
3. Move the sprite.
4. Draw the sprite at it's new location.
5. Append the sprite's new location to my dirty_rects list.
6. Call display.update(dirty_rects)
This will make it so it only draws certain parts of the screen instead of updating the entire screen.
I'm close at least.[/QUOTE]
I doubt that blitting multiple times in smaller sections will be any faster, infact it might even be slower depending on how many things are on the screen...but good luck. And it pretty much limits you to a static background.
[QUOTE=r4nk_;16552967]I doubt that blitting multiple times in smaller sections will be any faster, infact it might even be slower depending on how many things are on the screen...but good luck. And it pretty much limits you to a static background.[/QUOTE]
Holy crap it's blazing fast.
I'm averaging 0.2 milliseconds per frame.
I have my movement set up to be faster or slower based on the rendering time, so faster machines will move objects at a lower pixels/frame, and slower machines will move objects at a higher pixels/frame. The render time is so low that nothing moves. >_>
[QUOTE=PvtCupcakes;16553159]Holy crap it's blazing fast.
I'm averaging 0.2 milliseconds per frame.
I have my movement set up to be faster or slower based on the rendering time, so faster machines will move objects at a lower pixels/frame, and slower machines will move objects at a higher pixels/frame. The render time is so low that nothing moves. >_>[/QUOTE]
Then you multiply the render time by a number
Oh my god. Pygame can't move an object less than one pixel at a time. That was the problem.
Basically what I'm doing now is forcing the game to sleep if the render time was less than 4 milliseconds. So the render time is always going to be 4 milliseconds on my computer.
Well, uh, how exactly is it supposed to move it half a pixel?
[QUOTE=compwhizii;16554085]Well, uh, how exactly is it supposed to move it half a pixel?[/QUOTE]
Good idea, I'll just keep track of that, and when its >1 I'll move the object...
Seems less hacky than sleeping until I can get the render time back up.
[editline]12:33AM[/editline]
Actually, I like having it sleep for 3.8ms every frame. Cuts my CPU usage from 100% on one core to 10%, and it still runs fast enough to not notice.
[QUOTE=PvtCupcakes;16554237]Good idea, I'll just keep track of that, and when its >1 I'll move the object...
Seems less hacky than sleeping until I can get the render time back up.
[editline]12:33AM[/editline]
Actually, I like having it sleep for 3.8ms every frame. Cuts my CPU usage from 100% on one core to 10%, and it still runs fast enough to not notice.[/QUOTE]
games are supposed to use 100%!
see: [url]http://www.facepunch.com/showpost.php?p=16462500&postcount=706[/url]
[QUOTE=PvtCupcakes;16554237]Good idea, I'll just keep track of that, and when its >1 I'll move the object...
Seems less hacky than sleeping until I can get the render time back up.
[editline]12:33AM[/editline]
Actually, I like having it sleep for 3.8ms every frame. Cuts my CPU usage from 100% on one core to 10%, and it still runs fast enough to not notice.[/QUOTE]
Everyone has different views on that, but I think it would be best to limit the framerate to 60Hz by sleeping (17-rendertime) every frame if the rendertime is smaller than 17ms.
Why would you want to have over 60FPS?
+ doesn't eat as much battery life if you play on a notebook
+ maybe the player is doing something in the background like installing, rendering or encoding something
- ?
[QUOTE=Robbert;16557133]Everyone has different views on that, but I think it would be best to limit the framerate to 60Hz by sleeping (17-rendertime) every frame if the rendertime is smaller than 17ms.
Why would you want to have over 60FPS?
+ doesn't eat as much battery life if you play on a notebook
+ maybe the player is doing something in the background like installing, rendering or encoding something
- ?[/QUOTE]
To add to this list, even though it really doesn't apply much to cupcakes, if you are reading from a video file ( an AVI, or ogg theora, or what have you) you do need some processing power to convert it to a series of images, and then switch those images out, possibly to a texture (videos, within videos!)
Here is the current version of the Spotify Notifier, that is good enough to be released. Thanks to Kamern for the amazing logo's, they fit perfectly.
[img]http://jakelprice.com/Untitled-2.png[/img]
[URL=http://filesmelt.com/downloader/Spotify_Notifier.exe]Spotify_Notifier[/URL]
* Beware, its just an EXE file. No fancy zip files, sorry guys.
If anyone has any bugs, could you be a gentlemen and point then to me? Also, if you want the source, shoot me a PM.
I have a question about XNA. I just started using it, and to have multiple "ball" sprites I created a List<sprite>. The "sprite" class also contains a list to see with what other sprites collision was checked.
Now, to check collisions with multiple balls I created this algorithm:
[code]Random random = new Random();
foreach (clsSprite mySprite in mySprites)
{
mySprite.Move();
mySprite.Checked.Clear();
}
foreach (clsSprite mySprite2 in mySprites)
{
foreach (clsSprite myOtherSprite in mySprites)
{
if (mySprite2.Overlap_Circle(myOtherSprite) && mySprite2 != myOtherSprite && !mySprite2.Checked.Contains(myOtherSprite) && !myOtherSprite.Checked.Contains(mySprite2))
{
mySprite2.Checked.Add(myOtherSprite);
Vector2 tempVelocity = myOtherSprite.Velocity;
myOtherSprite.Velocity = mySprite2.Velocity;
mySprite2.Velocity = tempVelocity;
}
}
}
[/code]
The problem is that the code is very slow with more than 20-30 balls.
For some reason I have never heard a single ad in Spotify and I've got the free version.
Hard drive clicked and died, went on a lark and decided to teach myself assembly + cdecl (you get the Linux ABI for free!).
[img]http://www.cubeupload.com/files/f58000untitled.png[/img]
[QUOTE=JDream;16557848]Here is the current version of the Spotify Notifier, that is good enough to be released. Thanks to Kamern for the amazing logo's, they fit perfectly.
[img]http://jakelprice.com/Untitled-2.png[/img]
[URL=http://filesmelt.com/downloader/Spotify_Notifier.exe]Spotify_Notifier[/URL]
* Beware, its just an EXE file. No fancy zip files, sorry guys.
If anyone has any bugs, could you be a gentlemen and point then to me? Also, if you want the source, shoot me a PM.[/QUOTE]
Could use some anti-aliasing if you really want me to :P
I see the problem, there's no way you can use the 32x32 one as the desktop icon, is there? It'd look far better, trust me :)
But yeah, it doesn't seem to work for me, do you need to place it in the spotify directory?
What needs anti-aliasing? Looks good to me.
Sorry, you need to Log In to post a reply to this thread.