Local variables

New releases and general discussions.

Post » Fri Apr 17, 2009 3:10 am

But seriously, what's a small 2x2 or even 4x4 sprite going to do? heck, use a text object with no text! (or does that use vram in some weird rendering way?). You guys can't seriously be annoyed at using 148 bytes of Vram? That's BYTES! One nice fat texture in your game and those bytes just fade away up in the memory useage that one texture takes. There's practically no point to layout variables. Why not just use a global variable and tell it to change on the start of each layout you want it to change in?
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Apr 17, 2009 4:19 am

[quote="QuaziGNRLnose":1332wkew]a 2x2 png takes up 148 bytes. i think 2x2 is the minimum that can be loaded into vram, since its the smallest multiple of 2.

i seriously doubt 148 bytes is going to make your game have any loss in performance, the implementation of layout variables would probably use more power than the sprite anyways.

would a game really need that extra space?

Aeal i think youre a lil too paranoid about performance in that sense. if you really wanted to be making youre games that effecient why even use construct, technically its making youre game alot slower than it needs to be? why not use C++? well you dont really have to, do you?[/quote:1332wkew]

The point was to save the Vram not to improve performance. I don't make games in C++ because I dont have the coding ability to yet. And What is the point of wasting those bytes? When I could go into the SDK uncommnet a line or two and copy and paste some code compile and I have my own solution. As I said before if you dont like the plugin I dont give a shit. I made it for me to use in my games I dont care if you use it I just uploaded it for people who would like something like that.

[quote="BROO":1332wkew]Please don't add unnecessary ACEs to "System" object. Construct needs compromise between number of ACEs to master and their power. The more there are ACEs, the harder is Construct to learn.[/quote:1332wkew]

First of all they are your Basic set, get, compare, add, Subtract, aces same ones every other variable has. If you are too stupid to know what those do then you should not be making games. And if you cant remember what they do ITS IN THE NAME! READ IT!

[quote="Davioware":1332wkew]But seriously, what's a small 2x2 or even 4x4 sprite going to do? heck, use a text object with no text! (or does that use vram in some weird rendering way?). You guys can't seriously be annoyed at using 148 bytes of Vram? That's BYTES! One nice fat texture in your game and those bytes just fade away up in the memory useage that one texture takes. There's practically no point to layout variables. Why not just use a global variable and tell it to change on the start of each layout you want it to change in?[/quote:1332wkew]

First they wont fade away the ram will still be used. I know it maybe negligible in smaller games but Ive been working on a game where every bit of vram counts. and why the hell do you care if I make a plugin that dosent draw to the layout and uses private variables I never said you had to use it. To me it helps keep my layout clean and organized. Yet again I dont care if you use it. if you dont like it then dont use it your not hurting my feelings.

Lastly layout variables would be useful. you all said you have some way of getting around not having them and thats fine. but how can you say they are not useful when you all have a way to do that exact thing? The right wording that you are trying to come up with maybe that they are not an important feature to add right now, but don't go saying they would not be useful when you are doing the same exact thing.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Fri Apr 17, 2009 7:09 am

Now, now, calm down, everyone is entitled to their opinions. There is a little bit too aggression going on in here.

If Aeal wants to develop plugins for his own uses, sure, no problem, that is what Construct is for! If he wants to suggest layout variables as a part of Construct base, well, that is an opinion as well. Even if we disagree, we have to remind ourselves that jousting each other's heads off is hardly productive. He developed his own method, fine and dandy, it is his game.

What features to implement into Construct, however, is the developers' word that is final. Obviously we can see that they see this as an unnecessary feature, since there are many other ways to achieve the effect.

Also, there are objects that don't use up any VRAM and can contain private variables. Namely Text object. You could use them for debugging, too, for example to show a certain PV in runtime; in release we just turn it off.

Or, better yet - you could use those text objects for more than one purpose; show the title of a chapter, like "Chapter 1 - The Awakening" in a neat way during transitions, but they'd also store variables for that layout! No wastage at all.

Just some creative thinking ;)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Apr 17, 2009 1:40 pm

Since Text needs place in memory to render its text I'm quite sure it also needs some VRAM allocated.

What Aeal does with his plugin in nothing of my concern. However, I don't like the idea to have this 'local variables system' integrated with IDE (meaning they'll go into 'System' ACEs or they'll be included as standard plugin in every new Construct build).

Aeal your behaviour is clearly irritating now. Consider changing it, because it's troublesome to have conversation with people calling others "stupid".
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Fri Apr 17, 2009 1:43 pm

I didnt call you stupid you may have misunderstood my post.

I mean that if you (As in the user) do not understand what basic Set, Get, Add, Subtract, Compare does then you should not be making games
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Fri Apr 17, 2009 3:33 pm

[quote="QuaziGNRLnose":2cud1pzi]a 2x2 png takes up 148 bytes. i think 2x2 is the minimum that can be loaded into vram, since its the smallest multiple of 2.
[/quote:2cud1pzi]
Hey Quazi, MATH just kicked in!
2^0=1
2^1=2
2^2=4
etc.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Fri Apr 17, 2009 4:33 pm

Math doesn't tell a thing about how many memory is allocated for initialization of object in VRAM and how much single pixel needs bits to be represented.

Aeal now try to figure out if I know what does these things mean ;).
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Fri Apr 17, 2009 8:32 pm

[quote="Doppel":3cp4igto][quote="QuaziGNRLnose":3cp4igto]a 2x2 png takes up 148 bytes. i think 2x2 is the minimum that can be loaded into vram, since its the smallest multiple of 2.
[/quote:3cp4igto][/quote:3cp4igto]

i dont think ^0 can be used. i could be wrong though.

thats why i said "i think" 2x2 is the smallest
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Apr 18, 2009 12:02 am

empty project, the object in question
+ 1 text object displaying vram remaining

hash table with 10 keys
2522873856 k in vram
12576 k in task manager

10x1x1 array
2522873856 k in vram
12556 k in task manager

0x0 sprite with 10 entries (invisible and off screen)
2522873856 k in vram
12528 k in task manager

0x0 sprite makes 0 impact in vram when invisible
I did this twice, accidentally erased my post the first time
and the other time the sprite used the most ram in task manager
with the array in second. I guess it doesn't make much of a difference
it's all a matter of convenience
unless you plan on having 100s of variables, which I do
but then, you'll probably need an array
or a bunch of sprites storing xy info anyway

I think it's low priority,
but I don't think it's worth getting all aggressive about

also, I get his point
it is a workaround. it's no big deal
it's not like construct is full of em
but it is.
putting a text object I don't need in a project in order to store variables locally
is a workaround
it's not even a pain in the ass, it's almost as simple as having an object made for it
but it is a workaround.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Apr 18, 2009 12:54 am

not really a workaround, it gets the job done exactly how youd want it, calling it a workaround is just like saying (i want an object variable object, which i can make a container of the object its going to be used for, then use it for PV's. i dont want to use a sprite for it)

its the exact same thing. it wont change a thing if you use a sprite, its not even an inconvenience.
whats wanted here is variables which can be used on a per layout basis, this accomplishes this task, it isnt a workaround, its a solution.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests