12:11 AM
Unacceptable @Gajet, you said you'd be here for 8 hours!

12:44 AM
@Gajet it worked :)

1:31 AM
good eveningk

3 hours later…
4:05 AM
Can anyone explain to me how linear polation works?

Linear polation?
Do you mean interpolation?

Yeah >_>

Linear is kinda simple
Say you have two values
And you need three points between them like this
1, x, y, z, 5

Okay :o

x = (1 + 5) / 5 * 2
y = (1 + 5) / 5 * 3
z = (1 + 5) / 5 * 4
That would be a linear interpolation I think.
Don't quote me though, but you basically just take the middle of two values.
What I wrote is far from right I think. :P
But the principle is quite simple. :P

4:11 AM
@WilliamMindWorXMariager think it's right lol: content.gpwiki.org/index.php/Linear_Interpolation
Reason I was asking was because I was trying to interpolate between 2 Colors in XNA to get day/night working in my game
So far, it looks like a bunch of disco-lights lol. Fading a bit too fast for my liking
I thought, maybe I had misunderstood the Lerp function, but looks like it has to do with the percentage parameter... >_>

```1, n, 5

x0 = 1
x1 = 5
u = 0.5 (the exact middle)
n = x0 + u * (x1 - x0)
n = 1 + 0.5 * (5 - 1)
n = 1 + 0.5 * 4
n = 1 + 2
n = 3```
u would be the percentage parameter. x0 would be data point 1, x1 would be data point 2.
If you increase u above 1.0, you're extrapolating rather than interpolating.
Understand?

Yep
Thanks alot :D I think, I've figured out what's causing the "disco-light" error :D

Haha
No problem. :)
If you're working on a day night cycle, just for testing, you should just use something like Math.Sin(gameTime.TotalGameTime.TotalSeconds) and then scale it as necessary. Works great. :P
Combined with some linear interpolation and you have a smexy cycle in no time.

xD heh

4:31 AM
The scene would be so much awesomer with lighting D:<
But it's fixed lol :)
The lighting works now :D
*well day and night cycles
o-o

4:48 AM
And you added stone to the mix. :P

hi folks

Hey JMRboosties

got a quick question about XNA development
anyone have experience with that?

Plenty of us have.

awesome

4:55 AM
But even if we didn't, you should just ask. Someone is usually bound to be around.

im just learning, a lot of examples i see preload assets like images and whatnot on launch
makes sense, those become added to the program's memory and can be accessed whenever. i guess my question is, if you were building something in XNA would you load all your assets? or kind of load-when-needed?

Depends on the amount of assets.

I would load everything, accordingly to my scene

You're limited by the video memory and normal memory.

Like, doesnt make sense you load the credits on the main menu (?)

4:58 AM
Assuming everyone has 1gb of video memory available would be a bad idea for example.

right
i mean this is my first project, its going to be as simple as it comes but i still kind of want to work with best practice even if i could get away with cutting corners
so lets say my main menu has a little melody along with a background png
i'd load those assets on launch, but not the music for level 2
to make a very simple hypothetical

Dont worry, pre optimization is not that good heh

Yeah, if you're starting out simple, don't worry about it.
Pre optimization is the root to all evil.

yea youre right

If you one day feels like you really cant go on with what you have, so you can just refactorate. See the fourth stared comment right there ->

5:01 AM
i can plot and chart for weeks but when i actually do stuff that all goes to hell
i guess i need to figure out how to load assets on a screen-by-screen basis
previously i was doing stuff like `mFont = Content.Load<SpriteFont>("Times");`

If you think you can learn it on your first project, Scene management may be a good choice.

but that Content property isnt available in my Screen class, at least not right now
i can fix that though

It'll make your life lots and lots easier.

im basing my screen management off some sample code from the official support site
not tied to it at all, im writing it all myself, just giving you background about where im comin from
the screenmanager class is a drawable game component
the screens themselves are not, theyre actually drawn by the screen manager

This way, woudnt the screen manager have to be aware of the screens drawables?

5:09 AM
hm yea...
but i can do this:
ContentManager content = ScreenManager.Game.Content;
pipe it through

yup, or just pass it as a parameter in the screens load function

yea
would that just be the same call but unload instead of load? or is there some kind of automation to that?

If i'm not mistaken, you just unload if you really dont want it anymore on the memory. if you dont unload, the gc will do it for u on the end of the game though, im not sure!

yea that makes sense
now how do you differentiate between VRAM and regular RAM when rendering stuff

I've never unloaded anything in my life.

5:17 AM
does it automatically do visible objects in VRAM, and stuff like datastructures and music in RAM?

It's a bit more complex than that, but yes, all textures you use while rendering will be in the VRAM, as the video card needs them to render.
If you get into custom shaders, any data passed will be transferred to the VRAM as well.

thanks for the help!
see you later?
that was meant to not be a ? lol

6:11 AM
Working with mingw is such a pain, lol. It takes YEARS to compile simple programs.

3 hours later…
9:10 AM
@WilliamMindWorXMariager there is a difference between asking if someone is free for 8 hours and saying I'm free for 8 hours.
@CodeAssasssin if you really like developing using C++ and you've found other engines hard to work with you can try esenthel.com but I won't guaranty anything myself. (so far I didn't have any problems with it myself)
@Dave yep, my codes always work. unless otherwise is proven

9:33 AM
@CodeAssasssin also if you want to restrict yourself to 2d development, you can try SDL or SFML
@WilliamMindWorXMariager I guess you are working with TCP packets right now, and sending changelogs. did you consider using UDP and sending whole gamestate?

1 hour later…
10:54 AM
There are some new free courses @ coursera.org. Check it out.

4 hours later…
2:48 PM
Anyone have advice, links to blog posts, or tutorials that cover game character/level/inventory management in ios? I currently use one class (such as GameEnemy.h/.m), and create new characters by adding a dictionary (for each enemy) to an Enemies.plist, which stores the attribute values (similar to this i.stack.imgur.com/D43r0.png).

Open your search up to systems other than just iOS - similar concepts will apply accross all platforms.
You'll probably be able to find more

@tylerrrr07 I would, though, I am looking for an ios specific implementation since I'm trying to get suggestions geared away from databases and more towards classes, etc. It's not that I couldn't use a database to do these things, in fact, I'd very much like to. It's just that I'd like to see how others approach this issue.

I can't see how iOS has anything to do with those things

Thats what I was thinking

ok
well then smarty pantses, what would be your platform independent solution lol
*I never thought it would be this difficult to ask for others opinions btw

3:01 PM
insufficient information for meaningful answer. Normally, use the data structures best suited to your problem domain

I don't have a solution. I was just recommending broadening the scope of your research to help you find solutions easier. The solution isn't "here is the code for you to use" the solution is "here is the general idea of how to accomplish it and write your own code"

Or do the simplest thing that could possibly work
In general, if you just need to store a "bucket of stuff", then you always use a list or list-like container (whatever it's called in your language).

@tylerrrr07 no kidding. I didn't ask for code

If you aren't looking for code than how would it be platform dependent?

@MarkR I guess it's really easy for me to wrap my head around the problem with a relational database. I'm just having organizational issues trying to see it in a different light.

3:03 PM
Mark hit the nail on the head with one of his comments. If you find something that refers to doing it in C# / XNA and it says store a struct, add (whatever its called in your language) after struct

I don't know what language you use to program ios, maybe it's objective-C or something that Apple likes
But presumably you have a) Some kind of struct, or object-like thing which contains named fields and b) A list-like container
So you just do everything with arrays of structs, effectively

@MarkR yeah, I probably shouldn't include ios in the question because that's not really the question I'm trying to ask.

In C++ we normally use std::vector, in Java we have ArrayList, in Javascript it's just Array, but basically, they are all just kinds of resizeable array which implement an indexable-list, which is normally the most versatile thing

@MarkR sorry, that's not what I'm asking. let me try to restructure the question..
okay
would you create a single class, let's call it Player
and then have a data source where each character is stored like a row in excel, with different attributes
or would you create subclasses for each player that have the attributes as constants
like class Dog, Cat extends Player etc.

What are you trying to accomplish? I guess I don't know what you mean by player/level/inventory management system

3:09 PM
Depends what you want to be able to do

hmmm

It is probably not useful to have a different class defined for every kind of animal etc, in your game

yeah

I think it's highly unlikely that most RPG-type games use a different class for each type of enemy, it would be unnecessarily complicated

create an entity and add the Components needed to define it as a Player

3:10 PM
well what if you have players that can vary not only in appearance, but function

the components would tell everything about the entity
or you could cheat and assign a "tag" to the Entity

if I made Player have an attribute such as hair color, creating new players without subclasses would be easy. I could just change the hair color based on an entry in a list, etc

right

But even if the characters had somewhat different behaviour, it would still be generally possible to do it without needing to subclass anything

yeah

3:13 PM
but what if one player died when he fell, and another resurrected, bad example, but proves the point. I'd have a huge conditional if...else tree if I have a bunch of players that react differently to fall()

you could write the behavior inside the components, or create systems that subscribe to entity components and execute the desired behavior

Negative - you'd have a component handle that
The player would have a movement component and you could have one type of movement component that died when it fell and another that didn't (or something like that)

I should look into components

It is very unlikely that you're going to want to write different classes for this. You might conceivably have some composition and a little bit of polymorphism
So suppose you have one character who can fly and another who can't... you can have some MovementController or something, which can be replaced

@MatisseVerDuyn I will say a component based system can be confusing (I still don't understand it) so if you feel overwhelmed stop by and hopefully someone other than myself can clear up questions you have with component systems

3:14 PM
so if a character subsequently gained or lost the ability to fly, then you can replace FlyingMovementController with WalkingMovementController

you could add a component that acts like a "status flag" for the player, then a system would intercept it, do the math and remove the component

@tylerrrr07 thanks, but I definitely try to read up as much as I can first
*I'll
@thelinuxlich thanks
@MarkR and thanks to you as well lol

Speaking of which... where has @Jimmy been?

hey, if you want to delve into entity/component/systems, there is a topic at my ES forum section that can help you: ploobs.com.br/forum/viewtopic.php?f=39&t=136
4

@thelinuxlich will do

3:19 PM
@thelinuxlich Looks like some reading material for me too. Thanks for the link!

ha! lol I knew I was approaching it in the wrong way. It tells me so in the first line! :) @thelinuxlich from the first link: cowboyprogramming.com/2007/01/05/evolve-your-heirachy ... "Up until fairly recent years, game programmers have consistently used a deep class hierarchy to represent game entities."

@tylerrrr07 feel free to ask there or here about ES, I like the topic a lot
@MatisseVerDuyn :)
@MatisseVerDuyn if you used something like MonoTouch for your iOS game, you could use my C# Entity System framework, it is heavily inspired by that post, Scott Bilas presentation and t=machine

@thelinuxlich I haven't used MonoTouch before. for most of the games I'm working on, I've used cocos2d... which got me into learning opengles... and then c

@thelinuxlich is your system compatible with the Xbox?

@thelinuxlich I'll look into it in the future

3:23 PM
@tylerrrr07 yes, and windows phone, and if you use Monogame, iOS, Android, Linux...

Oooo

@MatisseVerDuyn there is a gamedev user named Victor Ponce which is porting Artemis C# to cocos2D

@thelinuxlich git?

@thelinuxlich I just quit my job so I'm going to start contributing to github. I've been restrained under NDAs for about a year :/

3:28 PM
@MatisseVerDuyn cool!

@@thelinuxlich I'm gunna get to reading. Thanks for the resources!

3:40 PM
@MatisseVerDuyn at the moment, it lacks documentation but there is a game example here: github.com/thelinuxlich/starwarrior_CSharp
@MatisseVerDuyn take a look: t-machine.org/index.php/2012/04/19/…

4:19 PM
@tylerrrr07 I love component based systems. :D
@thelinuxlich Sounds like the biggest mess in history. Artemis C# is already a port that's messy as hell.
Maybe messy is a wrong term. Just... I dunno... Doesn't seem to really know it's C#.

ahahaha

There's no use of accessors even though there are plenty of clear use cases, and it's filled with java style comments rather than actual C# style summary for functions.
I mean nothing bad by it, but it could really use a touchup. :P

@William the comment thing is being fixed, replaced with intelisense detectable comments
@William, now, accessors? what do you mean?

```    public void SetTag(String tag) {
world.GetTagManager().Register(value, this);
}

public String GetTag() {
return world.GetTagManager().GetTagOfEntity(this);
}```
Makes more sense like this:
```    public String Tag
{
set { world.GetTagManager().Register(value, this); }
get { return world.GetTagManager().GetTagOfEntity(this); }
}```
Now you can set and read the tag like it was just a property.

ah, i thought it was about using reflection to do something like entity.health.percentage

4:32 PM
Same with uniqueId, there's a GetUniqueId() method.

I've ported from Java project and didn't spend time to make it more "csharpish", instead we were adding features

Why not just have it be another accessor.

your point is valid, but it is just syntax sugar

Well, you really should focus on making it more C#'ish. It's really alien to use it in it's current form.
It doens't fit with all the other libraries you're generally using.

will do :)

4:33 PM
Making it stand out.
uniqueId could as well just be a public member. :P
There's a set and a get method, and both just change the member and return the member. :D

you are right, I will try to focus on it this week
I apologize for the lack of documentation, but actually it is really simple to use
we have some system templates that need explanation too

If you add me as a contributer, I'd be willing to help csharpify it.
If I understand version control correct, I could simply create a branch, start the work, once everything is ready, I'll merge the two.
Haven't used version control for anything but backup so far as I always work alone. :P

user4704
Since this is git, you can just fork it

yeah

user4704
and then make your changes, and submit a pull request to the original author

4:45 PM
@WilliamMindWorXMariager Working alone is no excuse!
2

ahahahhaha

user4704
(why do you have the .userprefs file checked in?)

Sorry John John. :(

user4704
and the.suo

user4704
tsk tsk! ;P

4:46 PM
@WilliamMindWorXMariager your help would be very much appreciated

@WilliamMindWorXMariager Ok, Bill Bill

Bill is short for William in English: en.wikipedia.org/wiki/William_%28name%29

@JoshPetrie :~

user4704
:D

4:49 PM
@JohnMcDonald :(
I hate it when my username is taken. I used to be unique. Now it seems it's taken everywhere.

Well, apparently it isn't MindWorX... Gimme a second...

tbh, I've only ever had my unique username used in 2 places: `cell18189` Like... Who in their right mind would take that from me?

I've used my nickname for like ~11 years. But it's taken more and more places.
But the fucker on freenode got axed! Hah! I claimed it cause I was more awesome than him! (And because he hadn't been active for 6 months...)
@thelinuxlich, I'll get an account going when I get back. I'll ping you when it's ready.

4:53 PM
okie dokie

5:20 PM
Would it be better to generate caves or caverns in 1D Perlin Noise, or 2D? o:

1D is a line

Okay so 2D then.

Yeah probably

5:42 PM
@CodeAssasssin I still can't figure out why you need caves in a TD game?

Good point. I can picture some use for caves in a TD game, but only for user-generated maps, not for randomly generated ones

My "gamer" name as I will call it has only been taken in one place and I wouldn't be surprised if it was by me a long time ago and I just didn't know it - Games for Windows Live
The name being SpartanDonut

A donut not for the weak of heart?

Hahah could be
When Red vs Blue came out people would think I got it from that (They were Spartans and I guess one of them was called Donut)
But really I just thought of two manly things I could combine that would be humorous (Donut stemming from Homer Simpson being "manly")

6:44 PM
mmmmm Spartaaaaa

@WilliamMindWorXMariager Do you actually love component based systems or are you just saying it because you saw it?
Anchorman reference if anyone didn't get it. :)