« first day (1892 days earlier)      last day (1469 days later) » 

1:01 PM
How are you generating it anyway? Normalized cube vertices?
 
using a noise module stack, I get heightmap data that I map to a texture, at this scale its essentially just a perfect sphere
as the scale increases it will eventually just map to raw voxel data
I have deliberately broken up the sphere in to square faces to help later with my approach
It basically boils down me getting a IVoxelContainerView from which I generate a mesh :)
 
I see no evidence of square faces? =p
 
yeh im not cube mapping
 
That's the kind of distortion you get with square faces
That's nothing to do with cube mapping
This is pure mesh generation
 
thats basically it :) (at this scale)
 
good case for generics right there
 
what do you mean?
 
not sure I know enough about what this code is doing
usually where I end up a in switch based on type I just write a generic method to handle the scenario
 
That's code that writes properties of trigger actions to the level file
I modify the actions inside the editor, and store the value in an union
 
var result = SomeGenericMethod<T>(params);
 
1:21 PM
Then that code I posted translates the value in the union into a string that can be written to the file
 
what's up with using ToString()
hmmm it's c++
 
yes
and it's an union
 
if it was me I would do something like ...
var resultString = Serialiser.Serialise(someObject);
then write an object serialiser to output my format
 
well that's pretty much just wrapping my code into a serializer class
I don't have any fancy stuff to use
<Trigger name="Trigger" x="5" y="16" w="4" h="3">
	<Action type="ACTION_SPAWN">
		<Property name="Count" value="10"/>
		<Property name="Position" value="1.000000;0.000000"/>
		<Property name="OffsetX" value="1.000000"/>
		<Property name="OffsetY" value="0.000000"/>
		<Property name="EntityType" value="ENTITY_TRUCK"/>
		<Property name="ParachuteOn" value="1"/>
	</Action>
</Trigger>
So that results in this getting written
I will then probably just parse those values into a String, String map
And use the factory pattern to create the action based on the data
Hmm I might have to also save the property type
Man this stuff is complex
also my level files are 20000 lines long xD
Might have to compress this stuff
or, well
probably not
 
so then you would have ...
string Serialize<T>(T objectToSerialise) {
     if(typeof(objectToSerialise) == typeof(string) || typeof(objectToSerialise).IsValueType())
    {
         return "<Property ... value=" + objectToSerlize.ToString() ...;
    }
    else {
        var properties = GetProperties(objectToSerlialise);
        foreach(var property in properties)
               var propResult = Serialise(property);
    }
}
and so on
obviously thats not a whole solution but you see where its going right
probably broken to all hell lol
 
1:31 PM
Well, that really is just my code wrapper in a layer
Because basically my switch just implements ".ToString()"
 
do you not get ToString out of the box with c++ ?
 
no
 
can you not just do anyObject.ToString() ?
 
No
 
wow what an evil language
 
1:32 PM
there is no class "Object" that everything inherits from in C++
 
lol
 
I feel your pain
 
And can you believe it; not everything is passed by reference by default in C++ :O
 
@Wardy thanks :)
It's just a matter of hiding this code behind some abstraction layer I guess
 
c++ imo is a very flexible language but doesn't seem to be a very helpful language
 
1:34 PM
But ToString() still wouldn't solve the problem, as I'm using an union
 
I can you not implement ToString globally without creating some base object?
 
it's very old language with a lot of stupid boiler plate things, like that header #ifndef FOOBAR stuff
 
that's why we have yield in c#
 
@Wardy I could, but run-time type detection is a mess
And I would still have to hard code the translating
 
IEnumberable<string> SerialisePropertiesOf<T>(T obj)
{
       foreach(var p in GetProperties(obj))
          yield return "<Property ... value=" + p.ToString();
}
that would give you back the property array
as strings
 
1:36 PM
What's "GetProperties()"?
Reflection?
 
no properties in C++
 
its my way of saying "whatever in your context for the object you define as a property element from the object that you need to iterate over"
having ToString() in c# is massively helpful
 
Sure
But I need to switch to access the right element
Because I use an union to save memory
 
the right element?
surely its just a collection of object fields that you are turning in to a collection of strings
then putting some wrapper around
to produce your final block of xml
 
1:39 PM
actually I don't use an union it seems
That's what a single property inside an action looks
Well in the editor layer that is
 
do you only serialise value types then?
 
<CLevelTriggerAction>
	<Property type="int" name="Count" display="Count" value="1"/>
	<Property type="vector" name="Position" display="Position" value="1;0"/>
	<Property type="float" name="OffsetX" display="Offset X" value="0"/>
	<Property type="float" name="OffsetY" display="Offset Y" value="0"/>
	<Property type="entity_type" name="EntityType" display="Entity Type" value="ENTITY_ENEMY"/>
	<Property type="bool" name="ParachuteOn" display="Parachute" value="1"/>
</CLevelTriggerAction>
I use XML files like this to define single actions
So that the editor knows what properties to display
I load those files, and the initial values to an action
 
So you have a TriggerAction class right?
 
Yeah
 
hows that look?
 
1:41 PM
struct SLevelEditorTriggerAction
{
	// Stores the action type.
	ELevelTriggerActionType m_ActionType;
	// Stores the action data.
	CLevelTriggerActionData* m_ActionData;
};
That's in the editor layer
 
so the data is ... a dictionary?
 
Jon
 
CLevelTriggerActionData is a dictionary of TLevelTriggerActionProperties
Which is shown in the pastebin above
 
ah ok
 
Then when I actually load the level into the gameplay mode, I would use a factory and translate those saved properties into members of an action class
 
1:42 PM
TLevelTriggerActionProperties ... if you implement ToString on that class
 
So that the layer where the actual action code is located is decoupled from the saving and loading
@Wardy Yeah I was actually just thinking about that
 
then implement to string on trigger action to call tostring on each property and then wrap that in a trigger element
be nice and simple right?
 
Actually I'll just implement ToString() on the property class
And do the looping in the writer
 
you could do the looping in ToString in the TriggerAction class
then return a single Trigger action element with the children by simply callingtriggerAction.ToString()
 
Sure, but I find it cleaner if all the writing happens at one place
(Also because of the weird rapidxml element ownerships)
 
1:45 PM
well the writing would
presumably you would have some serialiser that comes along and does this for a ocllection of trigger actions right?
 
Yeah, the writer class loops over all the triggers in the level, then all the actions inside the trigger, and then all the properties inside the action
Neat and straightforward
 
var stuff = SomeCollectionOfTriggerActions;
string result = Serialise(stuff);
and that could then simply do ...
var result = new String();
foreach(var ta in stuff)
   {
      result += ta.ToString();
   }
   return result;
}
makes the code clean :)
 
well that's now just a matter of splitting my code into smaller methods
Which gets messy really quickly because I always need a pointer to the xml document when I create a new element or attribute
So the writing/serializing process has to happen close to the document creation
But I appreciate the help a lot, thanks
 
hmmm ok
 
That's the current part of writing: pastebin.com/gGbLFScC
 
1:52 PM
Seriously though I would try and go for a generic model so as not to add too much overhead
 
That's surely something that would be nice to have, but I'm doing this in C++
So that's not something that can be done very easily
 
I guess you could have a TriggerSerialiser and a ActionSerialiser
then you can separate the code that way
 
Well true
Yeah, that's actually kinda good idea
I'll make a TODO comment of it now, I want to move to loading now
:)
 
niiice :)
 
// TODO: The translation process of different classes to XML elements could be split to separate classes:
	// CLevelEditorSerializerTileLayer, CLevelEditorSerializerEntity, CLevelEditorSerializerTrigger, CLevelEditorSerializerTriggerAction...
Thanks
So for loading I need to first load the template data from the separate XML files
And then apply the values from the level file ontop of that
And then I can move onto the Trigger/TriggerActionFactories
 
2:24 PM
:)
awesome
 
2:43 PM
anyone know a cheap / easy trick for debug rendering normals for a mesh in unity?
 
I've had my mouse for like 4 years now, I bought it for 5e from my friend
Razer SC2
I just learnt that I can change the colors on it
 
5e?
 
yeah
eating brb
 
3:11 PM
Now I just need a keyboard with red backlighting
I've got a headset with red cushions, USB speakers with red speaker rings, and now the red mouse lighting
 
Jon
3:44 PM
 
sprites
I'm calling it Fall of Rome
 
Jon
I call it derp wizzerd
 
=P
 
Jon
the king
 
[Levitation]
 
Jon
3:55 PM
not very good with this wacom but its fun
2 minute sketches
 
you draw fast to learn without conscious awareness. when you draw slower you can reach contours that are impossible with speed drawing. good practice though.
 
Jon
oh yeah, i just like sketching
 
it's fun
 
Jon
 
4:18 PM
Oh dear.
 
Jon
Kinda tablet u got?
 
intuos
wacom
 
4:45 PM
I like how the "Should we split the site chat" meta hasn't actually received an answer from the person that proposed doing it ( CC @AlecTeal in case it's a matter of not being aware of it)
 
ok now im confused
this guy asks a question about how to uv map stuff from his atlas
I give him a complete solution to writing a texture atlas wrapper for unity and he tells me he cant put his atlas in ram
if he can't put it in ram how the hell can his gpu code work on it?
0
A: Tiling atlas textures correctly with a custom shader in Unity

WardyI took a different approach and created a texture atlas on the cpu, from there UV mapping was just like normal UV mapping all I had to do was assign a texture to the vertex info from my atlas ... My scenario is a custom voxel engine that can handle anything from minecraft to rendering voxel base...

or am i missing something here?
 
5:04 PM
@KevinvanderVelden I cannot post also I didn't want a meta post about it.
 
@AlecTeal oh suspended. And why didn't you want a meta post about it?
 
@KevinvanderVelden because I've seen the user base for this chatroom, and can only assume it's the group that visits the meta and didn't want that crap spilling out of here.
 
There's way more people visiting meta than chat
Which is actually kinda a reason against going to meta because... it's not people that actually use this chat
 
Either way, I do not "endorse" the meta discussion, I don't want to "split the chat" please do not think I do.
I also REALLY want Almo to stay in this chatroom too.
 
Well he'd go to the other chatroom
The social one
 
5:10 PM
One hopes.
So yes, @KevinvanderVelden if you could put a comment saying the "suggesting user" deems it as clickbait, doesn't endorse it, nor wants to "split" the current chat. That'd be great.
 
Hello
 
Yeah it really doesn't convey enough how separate from the main chat I want it to be. You guys can keep this as is. I don't want transfer.
 
@Slereah \o
 
found out some more problems with my sprite engine, hurray
Sprites weren't animating while moving because I reinitialized them every step :p
 
Heh, oops
 
5:17 PM
Because of that "decide what sprite to use for which direction" thing just put in a new animation each time
So rolled back to frame 0
 
So yes, just to reiterate, please don't split the site chat. You lot; stay!
 
Oh don't worry, the no answer has 5 votes and no opposing viewpoint has been presented, I don't think it's gonna go through =p
@Slereah time for some logic of "If curDir == oldDir: do nothing"
 
Also I wouldn't say that the majority of you lot, the meta, the site's visitors are ... it's not "aimed" at you guys, if that makes sense. Which is why I declined putting it on the meta, twice.
 
@KevinvanderVelden : Pretty much yeah
Or just "if same sprite as old sprite don't do a thing"
I dunno
Also currently the path finding doesn't do anything if I click on a collision type tile, which is what I wanted, but it's a bit strict
Is there a good heuristic to decide what tile to go to in those cases?
I guess checking the closest tiles to the user to see if they're reachable?
 
@KevinvanderVelden just as an example, this topic right now. That should stay here.
 
5:23 PM
@Slereah the most common heuristic to my knowledge is the "Play a sound so the user knows they were dumb" heuristic
 
@AlecTeal Everything should stay here. If it didn't, this chat would become way less interesting and people would go away. I'd prefer more people coming in
 
@Lasse I will agree to a slightly different statement: "everything that has happened in here, was best in here"
Also yes, people should come here first if anywhere, without like an invite or something.
 
Yes, if there were more highlevel discussions going on then a discussion about the basics of pointers could move to a different room, on an as needed basis. Making a room is trivial here =p
 
@KevinvanderVelden So should it be a trumpet or a horn???
(heheh)
 
No, the basics of pointers, that's also in here.
 
5:26 PM
@Slereah vuvuzela
 
As I said, what goes on in here, you can totally keep in here. I don't want to split anything.
So @Lasse if you're just starting out and the things that stump people in her are useful to you, THIS is the room for you, and I don't seek to change that. Honestly, I'm not trying to sift on/off topic in here.
 
I've been programming for almost 20 years, of which 1,5 years making games professionally
 
awesome.
 
I'm not looking for credentials, I need to BRB now.
 
This chat is a place for me to socialize
 
5:30 PM
Yeah, see, I want that here.
 
@Noctrine if you could remove the meta post or something that'd be great.
@Lasse I don't want to convince you. Honestly.
 
You don't have to
 
I declined a meta post twice ( @Noctrine if you could delete that that'd be great) I don't want to split. If you come for light/casual chat, and are happy here PLEASE do not come across.
Not trying to split you guys up
 
So what are you trying to make? =p
 
5:33 PM
@KevinvanderVelden I'm not entirely sure, this is why I didn't post to the meta, or advertise at all. I am annoyed that @JoshPetrie did.
I was talking with Arantor (or something) for a bit, but we've switched to email for now. I haven't been "recruiting" any others because of my suspension.
If you could star some of those messages (or comment on the meta that it is not my intention - or simply tell others later) that the meta post is nothing to do with me, nor the room I've named "Game Tech & Internal" nor conveys what I had hoped or wanted for it, great.
 
@AlecTeal I think that message is the clearest, otherwise I'd have to star half a dozen which is annyoing to read =p
 
Thanks, and sorry you found out this way
 
Sorry for what? I see nothing you've done wrong
 
@KevinvanderVelden if you could put a comment (a link to that maybe) on the meta post that'd be great. It really isn't intended to siphon off any of this chat. The only answer so far is from someone I'd probably want to block for talking. It isn't intended as a "general chat" - you know just an on topic version of this.
 
I bet there has been some kind of misunderstanding then, which is always confusing for everyone
 
5:48 PM
@Lasse TBH, last time when no one had spoke for for 24 hours and 3 minutes the person who posted the meta post froze the room. I had to get a community mod to unfreeze it. I think this meta thing (which he suggested in a chat called "On a second chat" or something) is an excuse to close it when you guys vote as you have already for what he's presented it as.
If you actually read the chat I mentioned, you'll see I DO NOT want to split this chat. I didn't want to post to the meta either (at least until I got a better feel for what it was becoming) - I was hoping it'd just sort of develop.
 
That was a weird flag
 
@KevinvanderVelden Indeed.
 
Mountain out of a molehill really, I started a chatroom and it's apparently a big deal. (What got flagged?)
 
flag? lol who flagged what?
 
15 hours ago, by Josh Petrie
Should we split the site chat? http://meta.gamedev.stackexchange.com/questions/2019/should-we-split-the-chat-in‌​to-on-and-off-topic-rooms
Dunno who (flags are anonymous) but that
 
5:52 PM
yeah that's not what flags are for
It's not a big deal for me, I just saw the question on meta and responded to that. I know nothing else about the whole thing
You don't have to defend it to me @AlecTeal
 
So to sum up! (I have to go) I don't want to make a big deal out of clicking the "create new channel" button. I don't want to submit a formal proposal, I don't want to split stuff off from this chat room. If we could stop making a big deal out of it, that'd be great. Also I really sense this is an excuse to freeze that room again... Josh please don't.
 
@Lasse Btw, regarding your comment: You don't have to keep multiple rooms open, there's this "Other rooms you're in" thing (Though I typically have 3 tabs open)
@AlecTeal I doubt josh will do that, do note that rooms get automatically frozen for lack of activity =p
 
He did. I had to get a community mod to reverse it.
 
@KevinvanderVelden yeah, I know. I think it does not work really well as I have to close this chat to get to the other one and it's slow changing chats that way. Other way could be to open both chats up at once in different tabs, but that's taking up tab space.
 
Also 24 hours isn't the threshold.
 
5:55 PM
@AlecTeal I'm aware, I meant more like, again
@Lasse yeah the speed thing is an issue
 
I really do think though that the meta post will be used to try and freeze it again. Why can't he just leave me to it!
 
Because he sees it as splitting the community, which is a bad thing =p
 
To me it seems more like a subreddit
The volume of users here is just so low, that the subreddit idea does not work here
 
Hm
 
at least not that much
 
5:59 PM
Sprite turns into a chicken when moving upward
Let's say a wizard did it
 

« first day (1892 days earlier)      last day (1469 days later) »