With 2D sprites and characters...is it better to have a single sprite for the gun which you rotate through code or to have a sprite map of the gun in all the rotations and just pick the right frame through code?
[editline]04:00PM[/editline]
In terms of performance
[QUOTE=CarlBooth;20304708]With 2D sprites and characters...is it better to have a single sprite for the gun which you rotate through code or to have a sprite map of the gun in all the rotations and just pick the right frame through code?
[editline]04:00PM[/editline]
In terms of performance[/QUOTE]
A single sprite.
[QUOTE=CarlBooth;20304708]With 2D sprites and characters...is it better to have a single sprite for the gun which you rotate through code or to have a sprite map of the gun in all the rotations and just pick the right frame through code?
[editline]04:00PM[/editline]
In terms of performance[/QUOTE]
rotate through code, definitely
using all direction sprites would get messy, it's much easier and smoother to just use one
Doesn't rotating hammer the CPU/GPU though?
[QUOTE=CarlBooth;20304946]Doesn't rotating hammer the CPU/GPU though?[/QUOTE]
-snip-
[QUOTE=CarlBooth;20304946]Doesn't rotating hammer the CPU/GPU though?[/QUOTE]
Not as much as loading different sprites all the time. (:
[QUOTE=iNova;20305035]Not as much as loading different sprites all the time. (:[/QUOTE]
Kewl, thanks.
[QUOTE=Diaklu;20304521]Does anyone know what this kind of serialization format is called?
[code]"Package"
{
"Name" "Some program"
"Author" "Some guy"
"Version" "1.00"
"Dependencies"
{
"somelib"
{
"Version" "1.00"
}
}
}[/code][/QUOTE]
Looks like JSON
[QUOTE=mahalis;20300432]Why would you make it in Flash :frown: This isn't 1996—if you want to show off your animation prowess, make a demo reel. Otherwise... real, navigable site, pleasek?[/QUOTE]
I agree with you, ironically. I just wanted to experiment with flash/AS3. I'm swapping it for PHP and HTML5 over the summer.
[editline]08:56AM[/editline]
But for now, real programming.
[QUOTE=TheBoff;20303414]Xerios, that's pretty awesome, but how do you include an emitter in game? What sort of API is there for actually using the created effects in our own games?[/QUOTE]
Thanks :buddy:
Well I got my own API which does that which can be easily converted to any language, still in development of course =)
[QUOTE=Xerios3;20305277]Looks like JSON[/QUOTE]
Close, but no dice.
This is JSON:
[code]{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}[/code]
Maybe if I do some regular expression work I can replace strings and parse it as JSON if nothing else comes up. :(
I'd call it node-based or categorized key-value system. It's alike the ini-files.
[QUOTE=CarlBooth;20304708]With 2D sprites and characters...is it better to have a single sprite for the gun which you rotate through code or to have a sprite map of the gun in all the rotations and just pick the right frame through code?
[editline]04:00PM[/editline]
In terms of performance[/QUOTE]
rotate with a few lines of code or load in at least 50 textures. Answer seems pretty obvious.
Working on my model format a little. got into the triangeles and float number thingy's. Now i just have to get the models to render too. probbably i just did something stupid. becuse my console app can read them fine
[editline]06:27PM[/editline]
I guess someone wants to try to figure out what all this means...
[img]http://img22.imageshack.us/img22/6021/lolyqv.png[/img]
Ignore all the 20's(spaces) it was that hex editor fucking with me -_-
[QUOTE=databee;20305510]rotate with a few lines of code or load in at least 50 textures. Answer seems pretty obvious.[/QUOTE]
Besides the fact that he'd have to supply those 50 textures somehow, for each gun too. It would just waste time and make the guns a lot less flexible to work with code-wise.
I think this falls under premature optimization. Focus on making the game the best and fastest way you can, then worry about making it run fast. Of course that doesn't mean make tons of obvious performance mistakes that gain you nothing.
[QUOTE=ryandaniels;20305697]Besides the fact that he'd have to supply those 50 textures somehow, for each gun too.[/QUOTE]
If you can rotate them with code, you can generate 49 textures on the fly with code.
[QUOTE=Diaklu;20304521]Does anyone know what this kind of serialization format is called?
[code]"Package"
{
"Name" "Some program"
"Author" "Some guy"
"Version" "1.00"
"Dependencies"
{
"somelib"
{
"Version" "1.00"
}
}
}[/code][/QUOTE]
SDL is pretty close to it, maybe you could do something with that?
[url]http://www.ikayzo.org/confluence/display/SDL/Home[/url]
[QUOTE=Diaklu;20305387]Close, but no dice.
This is JSON:
[code]{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}[/code]
Maybe if I do some regular expression work I can replace strings and parse it as JSON if nothing else comes up. :([/QUOTE]
Actually, this would be it's equivalent in JSON:
[code]
package = {
"Name" : "Some program",
"Author" : "Some guy",
"Version" : "1.00",
"Dependencies" :
{
"somelib" :
{
"Version" : "1.00"
}
}
}
[/code]
You could access it like package.Dependencies.somelib.Version = "1.00".
Thanks, I think I'll replace the tab with a colon and then it might parse as JSON.
[QUOTE=gparent;20305787]If you can rotate them with code, you can generate 49 textures on the fly with code.[/QUOTE]
I considered that, that's why I said "somehow". However you do it, it's still most likely going to make the guns harder to work with, and although he may have got a definitive answer in this thread as to the performance boost, I'd advise him to avoid making performance predictions and instead focus on getting a working product first. At least until he has enough experience to know when it's beneficial to invest time and energy into doing early performance fixes.
@ Garry: can describe your networking system? Essentially, I'm interested in how you handle the networked properties of all the entities. I remember you had previously made some intriguing posts but I'm having a little trouble finding them. And I remember you mentioned you have separate "worlds" - what exactly makes up a world? Would you consider separate game states (main menu, play, etc.) separate worlds, or is a world on a higher level than game states? Thanks for any information :smile:
This thread makes me regret forgetting all my programming skills.
[QUOTE=Diaklu;20306369]Thanks, I think I'll replace the tab with a colon and then it might parse as JSON.[/QUOTE]
Don't forget, an object needs commas between the items.
[QUOTE=Diaklu;20304521]Does anyone know what this kind of serialization format is called?
[code]"Package"
{
"Name" "Some program"
"Author" "Some guy"
"Version" "1.00"
"Dependencies"
{
"somelib"
{
"Version" "1.00"
}
}
}[/code][/QUOTE]
That looks like the KeyValues format that Valve uses in practically everything.
[url]http://developer.valvesoftware.com/wiki/KeyValues[/url]
As for parsing methods, you could "borrow" their tier1 code and make use of it, or perhaps choose a simpler format.
Perhaps XML? It might be a little bloated and slow, but for simple things XML is a quickie to use, and there are plenty of libraries out there for handling it.
[QUOTE=VoiDeD;20307374]That looks like the KeyValues format that Valve uses in practically everything.
[url]http://developer.valvesoftware.com/wiki/KeyValues[/url]
As for parsing methods, you could "borrow" their tier1 code and make use of it, or perhaps choose a simpler format.
Perhaps XML? It might be a little bloated and slow, but for simple things XML is a quickie to use, and there are plenty of libraries out there for handling it.[/QUOTE]
I'd say that if it's already this close, JSON would be a better call. XML would just add size.
Yeah, I plan on converting it to JSON and parsing it as JSON.
Or getting the source code for a JSON parser and modifying it to read this format.
[img]http://dataus.net/image/yamarbackground_4ebfdf3e7cd9fc12085af109c0f0b43b.png[/img]
Visual stuff, here's the background you're going to see behind the desert metropolis of Yamar. Of course you have to scale over the wall to take a peek (that won't be a problem for the nimble climber that is the Assassin) but it'll all depth. There's parallaxing and the waves are animated. Next up is advanced guard AI so I'll keep you updated.
[editline]09:50PM[/editline]
Also, you can now see people bathe!
[img]http://dataus.net/image/yamarbathers_ce5168d78536562944f41ab631bb3789.png[/img]
[img]http://dataus.net/image/lolbath_0852115d935db21a484773d3c28f71d6.png[/img]
[QUOTE=Namelezz!;20307924][img]http://dataus.net/image/yamarbackground_4ebfdf3e7cd9fc12085af109c0f0b43b.png[/img]
Visual stuff, here's the background you're going to see behind the desert metropolis of Yamar. Of course you have to scale over the wall to take a peek (that won't be a problem for the nimble climber that is the Assassin) but it'll all depth. There's parallaxing and the waves are animated. Next up is advanced guard AI so I'll keep you updated.
[editline]09:50PM[/editline]
Also, you can now see people bathe!
[img]http://dataus.net/image/yamarbathers_ce5168d78536562944f41ab631bb3789.png[/img]
[img]http://dataus.net/image/lolbath_0852115d935db21a484773d3c28f71d6.png[/img][/QUOTE]
That looks cool except for the resolution discrepancies.
[QUOTE=Namelezz!;20307924]
Visual stuff, here's the background you're going to see behind the desert metropolis of Yamar. Of course you have to scale over the wall to take a peek (that won't be a problem for the nimble climber that is the Assassin) but it'll all depth. There's parallaxing and the waves are animated. Next up is advanced guard AI so I'll keep you updated.
[editline]09:50PM[/editline]
Also, you can now see people bathe!
[/QUOTE]
Did you try adding a bigger border around characters, or somehow playing around with colored borders? They look really good, but sometimes it's a bit complex to instantly distinct them from backgrounds (especially sky).
[img]http://dataus.net/image/thecurrentyamar_20848be75dda5723a90fabb434b01194.png[/img]
Here's a shot of the current Yamar. Try to ignore the completely white tower in the background - DOF doesn't like my laptop.
Now to work on the city gates, a horse you can mount and some clothes lines / ziplines.
Sorry, you need to Log In to post a reply to this thread.