[QUOTE=OrYgin;39232992]store it as jpeg, load it and save it back in tga. Then I load it back again (probably gonna make that in one go after) to get the RGBA.[/QUOTE]
You know you can get the RGBA without doing that?
If I had my PC, I'd send you my image loader class that lets you load PNG, BMP, and TGA for the source engine. It's fairly simple.
[QUOTE=Hentie;39233259]You know you can get the RGBA without doing that?
If I had my PC, I'd send you my image loader class that lets you load PNG, BMP, and TGA for the source engine. It's fairly simple.[/QUOTE]
I know, I just know nothing about image formats, so I used what was the easiest solution (It's 2 function I didn't write) so I could get a quick result. But I'd be more than interested in seeing your class :)
I'm fairly certain it's as simple as looping through the data that the jpeg decoder spits out and setting the width, height, and pixels of the image.
I've got code that transform the jpeg scanline to RGB but I need RGBA and as I'm not really smart with pointers magic, I leaned over Tga :p
Alright, I'll man up and try to do it myself then.
[img]http://i.imgur.com/ruEU3.png[/img]
omg stars
[QUOTE=ief014;39233559][img]http://i.imgur.com/ruEU3.png[/img]
omg stars[/QUOTE]
damn, pretty nice except for the giant ones up at the top.
[QUOTE=Duskling;39233964]damn, pretty nice except for the giant ones up at the top.[/QUOTE]
Yeah I'm still tweaking it.
[editline]15th January 2013[/editline]
bonus edge of my mini-universe
[img]http://i.imgur.com/w9HS7.png[/img]
[QUOTE=Jawalt;39233122]wot m8.
I'm not really sure what's happening in that image.[/QUOTE]
He explained it pretty detailed, I don't see how you can't understand what's going on.
Okay, good progress. Today I implemented a working WSAD camera with mouse movement, and just changed a few OpenGL settings to make it look a little nicer (for instance, adding a subtle black fog).
[img]http://i.imgur.com/YYpiJ.jpg[/img]
I still need to fix the odd error with the outlines on boxes, though.
I have unlocked the secret of handling UDP packets. (It was a secret to me at least)
I was trying to handle each packet received the same way I would handle a TCP socket.
Now that I understand and look back to what I was doing I feel like an idiot. :downs:
[B]Edit:[/B]
Alright since this is my first time working with UDP, I need to know if this is a good way to do things.
I have a client-server network structure thing that goes like this:
1. Server starts and listens on a port.
2. Client sends UDP packet where the first byte of the packet contains the packet type. In this case I have two packet types. If the first byte is -1 then it is a connection packet and the bytes that follow are the clients name, if the first byte is -2 then it is a normal packet containing the client ID and what ever data I need to send.
3. Server gets the connection packet and sends a connection packet back, where the second byte contains the client ID the client will use for sending packets to the server.
4. Client and server exchange packets as needed for the program. Client sends a packets with the client ID, server sorts packets using the ID and gives appropriate responses.
So does this sound good or am I doing something horribly wrong?
[QUOTE=OrYgin;39232992](from my server with a simple php script), store it as jpeg[/QUOTE]
Or you could stick a very basic XML parser in (hell I think Source actually has one) and use the Steam XML shit to get the image.
[code]http://steamcommunity.com/id/lavacano201014/?xml=1[/code]
Would normally take you to my profile's XML data, and from there you can grab the image straight from Steam Community. I'd tell you what tag to look for but right now it's throwing 503 errors every time I try.
Picked up "Game Engine Architecture" and "OpenGL SuperBible 5" recently, hopefully I can learn a lot from this in conjunction with arcsynthesis.
See you guys in 6 months :)
oh hey Valve fixed the XML data
OrYgin, the tag you're looking for is <avatarFull>.
[QUOTE=lavacano;39237719]Or you could stick a very basic XML parser in (hell I think Source actually has one) and use the Steam XML shit to get the image.
[code]http://steamcommunity.com/id/lavacano201014/?xml=1[/code]
Would normally take you to my profile's XML data, and from there you can grab the image straight from Steam Community. I'd tell you what tag to look for but right now it's throwing 503 errors every time I try.[/QUOTE]
Except the steam API [b]SUCKS[/b]
Here's some data Benjojo collected.
[img]http://puu.sh/1OkKa[/img]
Soft fail is every time it just gives an error, hard fail is when it gives an error 8 times, consecutively.
[QUOTE=ief014;39233559][img]http://i.imgur.com/ruEU3.png[/img]
omg stars[/QUOTE]
Wow those square stars were damn ugly
[img]http://i.imgur.com/aj5Ap.png[/img]
Honestly that's news to me. Granted, the only thing I actually used it for in the past was an "about us" page for a GMod server, but something like "an avatar at the main menu" should be fine, especially if you cache it.
Last April I posted an issue to love's bit bucket or whatever page about the lack of the ability to change the feeding on text. With normal fonts it's not a big deal, but this makes clean pixely fonts impossible. I included potential solutions and all of the code needed to do it.
Today I got an email from them that my code is included in the newest revision, meaning I've contributed in a meaningful way to my favorite project!
[QUOTE=ief014;39237915]Wow those square stars were damn ugly
[img]http://i.imgur.com/aj5Ap.png[/img][/QUOTE]Make the stars hexagons, like they were photographed a bit unfocused!
[QUOTE=ace13;39231091]Don't you love it when:
$ git commit -a
26 files changed, 3686 insertions(+), 49 deletions(-)
And everything works exactly the same as it did before your changes.
(Though inputs are now not just things that listen for the system events, they now have a manager that pushes the events to them and runs a forced update 33 times per second in case an event slips past the message pump due to focus changes. And they can have both a primary and secondary bind as well, all of which can be serialized and deserialized to/from a JSON file)[/QUOTE]
that should really be multiple commits. don't use git commit -a
[editline]16th January 2013[/editline]
[QUOTE=SiPlus;39229111][code]Draw.Pic(x, y, somesubsystem.somepic);[/code]
and somewhere in subsystem init code:
[code]somesubsystem.somepic = Draw.CachePic('somepicname');
// or
somesubsystem.somepic = Draw.PicFromWad('somepicname');
[/code][/QUOTE]
doing the string lookup once and keeping a pointer to the pic struct would be faster
[QUOTE=wingless;39237828]Except the steam API [b]SUCKS[/b]
Here's some data Benjojo collected.[/QUOTE]
Is that the ?xml=1 API or the proper one? [url=https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0002.29]GetPlayerSummaries[/url] returns the link to the full avatar, it's no effort at all to get an API key.
[QUOTE=SteveUK;39238970]Is that the ?xml=1 API or the proper one? [url=https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0002.29]GetPlayerSummaries[/url] returns the link to the full avatar, it's no effort at all to get an API key.[/QUOTE]
Pretty sure it's the proper API. You'll have to ask Ben when he comes online, though.
[QUOTE=wingless;39238980]Pretty sure it's the proper API. You'll have to ask Ben when he comes online, though.[/QUOTE]
The public XML one is notoriously unreliable, so I'm guessing it's that. [url=http://steamcommunity.com/id/steveuk/?xml=1]This[/url] fails most of the time just loading it from a web browser.
Why do people prefer the XML one over the JSON one anyway?
[QUOTE=Mega1mpact;39239012]Why do people prefer the XML one over the JSON one anyway?[/QUOTE]
You don't need an API key, and I didn't even know there was another API until a month or so ago.
[QUOTE=dije;39238336]Make the stars hexagons, like they were photographed a bit unfocused![/QUOTE]
Mind if I ask you how you did this? I have done stuff like this before but not with the glow. I guess this is using shaders?
I am scared to get into shaders. They look difficult :tinfoil:
[QUOTE=lavacano;39237719]Or you could stick a very basic XML parser in (hell I think Source actually has one) and use the Steam XML shit to get the image.[/QUOTE]
No, Source uses custom format VDF instead of XML.
[QUOTE=wingless;39237828]Except the steam API [b]SUCKS[/b]
Here's some data Benjojo collected.
[img]http://puu.sh/1OkKa[/img]
Soft fail is every time it just gives an error, hard fail is when it gives an error 8 times, consecutively.[/QUOTE]
The real data is here: [url]http://spitfire.benjojo.co.uk/steam.php[/url] (The data is the XML public one)
[QUOTE=dvondrake;39239385]Four agonizing days of non-stop hairpulling later, I realize I simply reversed the order I was multiplying my matrices in. Fuck.
Either way: Shadows!
[img]http://puu.sh/1Oomo[/img]
Got some funky self shadowing on the helmet, but that's because it was modeled poorly.[/QUOTE]
I don't know about you guys, but whenever something is wrong with my rendering code, matrix multiplication order is the first thing for me to check (and reverse to see if it fixes it).
[QUOTE=lavacano;39237719]Or you could stick a very basic XML parser in (hell I think Source actually has one) and use the Steam XML shit to get the image.
[code]http://steamcommunity.com/id/lavacano201014/?xml=1[/code]
Would normally take you to my profile's XML data, and from there you can grab the image straight from Steam Community. I'd tell you what tag to look for but right now it's throwing 503 errors every time I try.[/QUOTE]
That's what my php script is doing actually. But actually getting it from my browser instead of getting it myself is that the code I use to load it can be ported to something other than steam (for example if I wanted gravatar, I just would change the php script). Also it's kinda easier for the client to just load the jpeg once from my server than get the xml from steam, parse it, then get the jpeg.
I'm aiming at making my steamwork-like library te be the most independent I can from Steam and Source, so it can be implemented on any other game easily. Of course it's not perfect yet and I still have many things to redo and rethink.
Also, for the Steam Community API, it seems a bit more up lately (I remember a month or two where you couldn't even get one response). I also remember someone making his own alternative to getting informations about the user, does anyone know who did this ? (I'll try to implement it beside the regular api, so if it crashes, I can still get the avatar url).
[QUOTE=thomasfn;39241187]I don't know about you guys, but whenever something is wrong with my rendering code, matrix multiplication order is the first thing for me to check (and reverse to see if it fixes it).[/QUOTE]
Usually I forget something dumb like a call to glUseProgram.
Sorry, you need to Log In to post a reply to this thread.