« first day (402 days earlier)      last day (4603 days later) » 

12:00 AM
It seems like you're saying you want a method that will do the basic loading work, but can be overridden in a subclass.
But you also want to do all your sprite loading up front, and have all your entities reference a shared instance of their associated sprite. (So all spaceships reference the same spaceship sprite)
Is that correct?
 
yeah... I could do something like the flyweight
 
Yeah. Those are two separate issues.
The flyweight pattern will solve the second one
 
:/ yeah, I guess they are... kinda
The content loading is only ever once, and the sprites are technically content, and will (or should) only be loaded once per Entity type
 
Yeah. The flyweight is best for that.
If you give me a second, I can find a good code example that will solve your first problem
 
Well... as of right now, I only load 1 resource per Entity
and that 1 resource used to be a texture (taken from something like a FlyWheel), but is now changing to be a Sprite (which uses a texture)
 
12:09 AM
You load 1 resource per entity or entity type?
 
Entity type
 
Okay
 
@John I can't get AO to work =/
 
You download the installer?
 
So it seems like you have that squared away, and your only issue is being able to selectively override methods
 
12:11 AM
yes the windows installer
 
@PabloAriel interesting, does it throw an error?
 
mm no, well actually.. let me check again,
 
@AriPatrick Well... that was one route I was thinking of for doing the Entity-Type content loads
 
no, it just does absolutely nothing, but the debugger window pops up
 
@PabloAriel Debugger window... interesting...
Like the JIT debugger?
 
12:13 AM
yea the vs jit
that means my debugger recognizes an error but as I don't have c# installed I can't do anything
 
My brother was having a similar issue earlier today. How old is your graphics card?
 
ati radeon hd 5450
 
@JohnMcDonald Here is how you can selectively override methods in C#. This is called "method hiding".

class BC
{
public void Display()
{
System.Console.WriteLine("BC::Display");
}
}

class DC : BC
{
new public void Display()
{
System.Console.WriteLine("DC::Display");
}
}
 
it's a card from 2010
 
@JohnMcDonald

DC obj = new DC();
obj.Display();

would output
DC::Display
 
12:16 AM
@AriPatrick Yeah... If I remember, there's a good article here about that: msdn.microsoft.com/en-us/library/ms173153%28v=vs.80%29.aspx
New vs Override
@PabloAriel hmm... that should be ok, I'd think
I'm pretty sure there's a problem with AO working on older cards due to the width of the sprite map I am using (3200)
@PabloAriel Do you feel like debugging AO with me?
It'll require SVN, VS2010, and some patience
or... I could remove the dependency on SVN if need be
 
yes I may help you with that
 
might be easiest to just download the source zip on SF
I'm going to bet that my oversized texture is causing it to break, :/
 
oversized?
but how big is it?
 
3200x100
I think once I go past 2560 it can cause issues... maybe...
I'm trying to find where I read that
Max texture size is 2048 on "any Windows PC with a DirectX 9 GPU that supports at least shader model 2.0"
 
mm but it's not big enough I think, at least for my card
mine is DX11
 
12:31 AM
:/ yeah. That's the only problem I've experienced to date
So, I'd like to know what is going wrong
 
I will have to install C# first
 
In the meantime, @JohnMcDonald, I'm having a hard time wrapping my head around what you're trying to accomplish for some reason. Either I'm not understanding your requirements, or I'm not conveying my thoughts clearly enough. Either way, it seems it'd probably be best for you to write up a question for this.
Definitely drop a link to it in chat though, as I'd like to review it
 
I think the flywheel will work just fine actually
 
Oh. Okay :)
 
12:39 AM
I'm actually something like a flywheel for textures right now, but I was planning to rip it out (or at least modify it). Right now, in my game's LoadContent, I basically have a list of all the assets I would like to load, and I load them right there
I am thinking that it's better if I ask each Entity Type to load their own resources, make it a little more modular
or.. self-contained
Move ever so slowly toward a component based design (one day)
 
be careful on that pattern because you may end up managing something you actually want replicated, ie the current frame sprite or animation time, making all sprites show the same animation frame, and even if you can select a frame to render you could lose any chance of precalculating values, on every render you may then need to get the proper transform instead of precalculate on state changes.. anyway for 2d it may be not an issue
 
yeah... I understand where you're coming from anyway
Just make sure that I only store immutable (or intentionally mutable) data in a flywheel
 
@JohnMcDonald I've attempted to implement a pure component-based arch. once or twice, but I ended up giving up on it at some point and falling back into my old habits. :/
 
@AriPatrick ic. Yeah, I have yet to try
 
I don't like make entities load their resources, so what I was thinking was making them send a message for the framework to load it
 
12:47 AM
But at any rate, my Entity Types know what resources it will need, so I'm thinking the Entity Type should load it. Right now, there are no resources that are used by multiple entity types
@PabloAriel Yeah... that's an interesting idea. Have the entities go back to... some flywheels to grab the resources or load the resources if they aren't there yet
 
If all of your entities come from a base entity type, I would create a factory that handles the creation of entities, and marry your flyweight to that, so as entities are loaded, they can request their resources. If a resource exists, it's utilized, if not, it's created.
 
yeah, interesting
So, in that case, it would be lazy eh?
 
Yes, it would be
 
yes,
the major problem comes when you don't test for an entity then you can't notice the resource is missing, which is very common in big games
 
yeah, I can see that being a problem
 
12:56 AM
it often happens when making the installer... the game has been tested already, so testing everything again just to test the installer is something that most of the time is very inconvenient
 
yup
I try to do that too. And with SVN, simply checkout a new copy and see if it builds
 
are you committing to sourceforge? so I can checkout already for when I finish on preparing the c# stuff
lol mission completed and I forgot completely
 
yeah, there are 4 projects on SF that need to be checked out
I haven't done that cool "externals" linking in SVN just yet
Or... like I mentioned, there's the source zip that should make things a little more painless
 
If issues cropping up when you don't test specific entities seems to be an issue, I'd recommend writing tests to verify that all your entities behave appropriately.
 
@AriPatrick sounds like a plan
 
1:10 AM
I recommend taking the time to automate the testing on any feature or code section you find particularly troublesome throughout the course of your development
That way you don't spend all of your development time writing tests
 
yeah, I usually create tests (often visual tests) of various components
 
That's a good practice to maintain
So @PabloAriel, what is your development background? You seem pretty sharp
 
actually I'm not sure but thanks! I've been studying for a while about game development now, but I don't work as a programmer for like some years,
I've worked 2 years on programming
 
Oh. Interesting. It seems you've learned a lot in that time
 
but I didn't know much I had to learn most while working
it was about translating an app from VB to python, I've learned some oop concepts then, but I think I know much more since I work with C++
I always wanted to start with game programming but it took a while until I could
 
1:17 AM
Yeah. It takes a little bit of time before you can really do anything useful and game related.
 
when I was 11 I started writing some text based games in qbasic,
 
:) cool
 
but after something happened to my computer at around 14, i couldn't practice anymore, and at home they didn't even knew I was programming
I rendered my first 3d mesh back then in a 386 sx, it was so slow that it took like
3 to 5 minutes to render a frame
for a paper plane shape, like 4 triangles
but now it's better because there is all this hardware which can do a lot of things
 
Wow. That's a really impressive story
Sometimes I wish I started programming earlier like that
 
yes I wish I could have continued but life it's complicated sometimes, in the end I started about 2 years ago with proper game programming, and I had to start with c++ at the same time
I think it helped me anyway because since then when I played a game I was able to relate to programming issues
so basically the last 15 years or more when I played a game there were many times when I was thinking on how to implement this or that, which I probably couldn't without some previous programming experience
 
1:27 AM
Yeah
 
but as an official background, I don't have much actually
I'm spending a lot of time on it though
only to get pointers straight it took me some months
also I improved my English thanks to it, which I read a lot since I started reading programming books, I speak Spanish here but almost everything I read is in English
I'm really bad at english when I have to talk about what I have for dinner or other trivial matters
 
If you can pickup programming terms, I'm sure you can learn those things. It's just a matter of focusing on that stuff
 
thanks
so tell me about you, are you working on something in particular?
 
No, work keeps me plenty busy, but I like to stay active on here to talk with other community members and answer the occasional question
There was a time when I was much more active on here, but unfortunately my free-time isn't what it used to be
 
1:43 AM
Yay! My spaceship sprite now loads from an xml file, and has interpolated rotations
 
cool thanks, people who are learning like me find very useful this site even when we don't ask any question but just read from others
 
@JohnMcDonald badass!
@PabloAriel I'm the same way. That's why I try to take the time to help others out as well.
 
yes that's great
yes, but it took some time until I was able to answer anything
 
Ah. I understand
 
I still doubt of my answer and find ambiguities while answering and get confused,
and the topics I was learning were somewhat complicated and less common, besides, I didn't knew gamedev.se
I knew about gamedev.net but I didn't like it actually so I didn't spend any time in there, then there was this forum from which I got banned, where I started answering some questions about directx, but as I said I didn't want to be there anymore
 
 
2 hours later…
3:43 AM
@AriPatrick It's been a struggle yeah.
 

« first day (402 days earlier)      last day (4603 days later) »