CE change actions

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Flumminator, Zomis

Tomi
Posts: 339
Joined: Wed Aug 03, 2005 3:37 pm
Location: Slovakia

Post by Tomi »

> I think you misunderstood me -- I was not referring to the source code, [...]
No I didn't mean it that way - just that you know the *game* better to consider if it's needed. May be considered as a (grammatical?) error in my post.

> Was your main intention to use more than one action at the same time [...]
Yes if I understand you right. I mean, it's already possible (change + other), but in weirdly limited way. Why shouldn't it be possible to set keys + shield + ce value in one action?

Anyway, I think the main point was dynamic widgets anyway. Another example: When you select "set artwork" action, use element-box instead of selectbox and hide the selectbox that contains only "=" anyway.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Tomi wrote:> Was your main intention to use more than one action at the same time [...]
Yes if I understand you right. I mean, it's already possible (change + other), but in weirdly limited way. Why shouldn't it be possible to set keys + shield + ce value in one action?
This is possible in one way. Use many change pages with the same condition and different actions.
Maybe you already knew that though... and maybe that was exactly what you didn't want... but well... it's possible... sort of :)

>Anyway, I think the main point was dynamic widgets anyway. Another
>example: When you select "set artwork" action, use element-box instead of
>selectbox and hide the selectbox that contains only "=" anyway.

Yeah. Dynamic selectboxes/elementboxes would be great. But I guess it would be a pain to program... (here Delphi has an advantage, with just writing SelectBox1.Visible:=False; and SelectBox2.Visible:=True and such things... I think C handles this in a more difficult way) but I think maybe it could be worth it.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> This is possible in one way. Use many change pages with the same
> condition and different actions.

Yep, but I think that was exactly what Tomi wanted to optimize, and it would indeed be more elegant (define one 1 condition and n actions).

The problem is that an arbitrary amount of CE actions (well, all that are available) would indeed require some thing like "CE action pages". And of course you will still need more than one "condition page" (change page) like now. So you then would have n change pages with each m action pages, although in 99% of cases you only need one single action (proof me wrong ;-) ). So I think it would be much more confusing for only very little benefit.

> Yeah. Dynamic selectboxes/elementboxes would be great.

Yes... For the "set artwork" action, it would probably be nicer to have an element drawing area (1x1) to specify the artwork element. On the other side, this has two disadvantages: Some people won't have an idea how to specify the trigger element (the one below the CEs in the element list), and resetting the player artwork would also require to specify the correct element. (As there is now an option for a starting player artwork, this is not always the player element, but -- if you use the "set artwork" action anyway -- some other element, like the bug or robot.)

Therefore, it's sometimes easier to just select from given options from a list rather than to specify the element all by yourself (which is of course still possible, but with one indirection ("target" or "trigger" element option)).

Well, not really sure which one is more confusing to newbies... ;-)

> I think C handles this in a more difficult way

In fact, C does not handle this at all... You have to do it all bit by bit for yourself (at least if you don't use toolkits or libraries)... ;-) :-o
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Zomis wrote:- add/set/remove dynabomb size/count/power
...is still missing.
And of course, the min, max, avg and sum functions ;)

Otherwise, CE Actions works great :D
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> > - add/set/remove dynabomb size/count/power
> ...is still missing.

Well... I already had this, but then removed it again.

I'm not really convinced that it could be that useful at the moment...

Any more comments/ideas/explanations on this one, anybody?

> And of course, the min, max, avg and sum functions

Well... Yes. Same here: I'm not yet conviced that anybody could need this. ;-)

(Besides that you would also need an additional element area to specify the element which CE values you want to min/max/avg/sum, which does not fit well into the current interface... :-/ )

> Otherwise, CE Actions works great

I'm really glad to hear this! :-)
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Ah, I see...
well... about the functions, I was thinking that you could use the same as for "set player artwork", i.e. use target or trigger element. And when the action happens, the CE value is set to average of all those elements specified by the type.

But well, maybe I'll have to prove to you that this actually will be useful.. I'll see what I can do ;)
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

I think that allowing deeper mathematics in RnD, as wished by Zomis, would be really an important and clever action.

Mathematicians and programmers have, with their tools, the same relations that artists have with their own. And experience tells that any kind of creator need just to be provided with the widest and most powerful control, in order to create the "creatable".

If you can't allow me drawing functions with CEs, I will never do it with them.

But if you make me a CE that acts like a "multipixel led display" and let me pass a matrix and some functions to it, I will love you for-e-ver :D
Anyway, by the way, have fun!
Francesco
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> And experience tells that any kind of creator need just to be provided with
> the widest and most powerful control, in order to create the "creatable".

At this point I would disagree with you -- sometimes it's the limitations that tickle your mind best. If you can just do "anything", your creativity may not find a point to start anymore. Maybe you know what I mean (and I don't write this because I'm too lazy to add nice functionality to R'n'D, believe me!).

Think of LEGO, and what you can do with the classic "2x4" brick.

And think of today's LEGO packages, which don't look like LEGO anymore, but more like ready models build from a few very specialised "bricks".

What do you think -- which one is more challenging for your creativity?

So, in my opinion, "the widest and most powerful control" is also the most basic, yet flexible control.

> If you can't allow me drawing functions with CEs, I will never do it with
> them.

I bet that you already can do it with the existing CEs, although there might be no "CE drawing function" switch.

Look at Alan's "saturday night special" level sets, like "Defender". Or look at Juergen Bonhagen's level set "machine" and "game inside". I'm still conviced that those things cannot be done with the current CE functionality (and the sets I just mentioned are based on a very early implementation of CEs!).

> But if you make me a CE that acts like a "multipixel led display" and let
> me pass a matrix and some functions to it, I will love you for-e-ver

This is the wrong approach, I think.

Probably *you* can already *do* this, maybe even with the 3.1.1 CEs! Just think a bit harder, and try some more (and study the level sets that already made the impossible possible)! :-)
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

Oh-yes! I think we are looking for the same things. I think I should now begin to learn what there is to learn in order to make it.

This is indeed a right thing: I will contribute at my best, but I have to learn C. Any advice about where to start?
Anyway, by the way, have fun!
Francesco
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

Indeed my last post sounds a bit strange, but it's the result of a thing that I had under the eyes from the start of all this: I wanted some - not all - mathematics, more in the movements of the CEs than in a silly pixel display, which obviously I could do with a simple counter animation - never used it, just read about in some posts -

I confirm the fact that the right thing to do is to learn some C, at least to help in doing anything I could do. I really like it but I really fear C, so the point is about it.
Anyway, by the way, have fun!
Francesco
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> I think I should now begin to learn what there is to learn in order to make it.
>
>This is indeed a right thing: I will contribute at my best, but I have to learn
> C. Any advice about where to start?

This was not what I meant... :-D

I did not mean that you should implement it by yourself in the code (although you could do this, of course), but that you should try to just use the existing CE stuff, which might look limited, but is indeed already very powerful -- just look at the existing, heavy CE based sets! :-)

About starting to learn C: Besides a lot of books and very good internet resources, probably the best way is always to start modifying existing code and see what happens! :-) (And I don't mean that you should start with the R'n'D code, as there are certainly better, smaller and more elegant pieces of code out there. But in principle, any code works if you have the time and endurance.)
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

(Did not read your last post when I submitted my answer.)

> I confirm the fact that the right thing to do is to learn some C, at least to
> help in doing anything I could do. I really like it but I really fear C, so the
> point is about it.

Don't fear it! It's just a programming language! :-)

But seriously: C is not harder that most other languages; in contrast, it's really a quite simple language when looking at the fairly limited language features. But you can of course build anything you want with it! (Just like it is with CEs, in some respects! :-) )

As C is very near to machine language (if you know Assembler, you can "see through" C and see what the compiler will -- more or less -- do with your code on byte level, although most compilers will do optimizations you or I will never expect when looking at the original code... ;-) )

But as I said: Just grab a C compiler and some (small) example code and start right now! It's a lot of real fun! :-)
User avatar
Francesco
Posts: 577
Joined: Thu Dec 29, 2005 2:22 pm
Location: Sardinia (Italy)
Contact:

Post by Francesco »

Cool! Nobody told me that it would be "so" easy, because - I think - if someone like you tells me that, it must be true.

Other people I've been talking with, told me that it has got a lot of "preprocessor sumthin'" and that it does not contain "string" variables and thus one coming from Basic would have found it even harder and so on.

Not still convinced, I took MSVisualC++, and it gave me the final hit!
Did achieve in doing exactly no-thing!

I don't even know Assembler, I've got just high school mathematics, a lot of Basic and some nice ideas...

[Note for the moderator: I told that I would have gone off topic for one and one single time. Hope I've been holding my word :D]
Anyway, by the way, have fun!
Francesco
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Well... I'm really sorry about this idea, it may sound strange or terrible or whatever but it's only with good intention that I write this, and the possibilities would be GIGANTIC! And I think, and hope, that it actually is possible to implement.
It will need one additional parameter unfortunately, but it's worth it (and if I'm not mistaken, we've talked about that earlier, right...?)

CE action:
Change group element <Group element> <index position> <element>

This will replace the element at the index position on <group element> with the new <element>. This would be ggggrrrreat for new techniques. Mathematics, compression/decompression, maze generation, RPGs, you name it!
Please Holger, at least consider this half-crazy-but-yet-so-useful idea ;)


And oh... another half-crazy-but-very-useful idea:
Set CE value = Element number for <element>
And "change when touching element <ce value element>" or "change to <ce value element> when ..."
This would be useful for checking if two elements are the same, which is no good way to do right now... please Holger...? I know, not for 3.2.0... but for 3.2.2 or something? It's just sooooo useful :D
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> This will replace the element at the index position on <group element>
> with the new <element>.

Oops, this really sounds strange! :-o ;-)

Although this would probably be possible, it doesn't really fit into the current implementation, because there is some amount of recursive pre-processing of group elements which would then be needed each time a GE is modified.

Besides that, I have the feeling that on-the-fly re-definition of group elements is really a bit esoteric... ;-)

> Set CE value = Element number for <element>
> And "change when touching element <ce value element>" or "change to
> <ce value element> when ..."

This sounds more useful -- in fact, it is generic enough that it could be useful for a lot of different things. Despite the feature freeze, I just hacked this concept into the current engine, together with a third trigger element that gives the element from the current CE value (and looks like "[#]"). I build a little test level that lets a CE store the element number of another element that hits it (like a rock) and later changes to that element when touched by the player, effectively storing an element over time. Nice thing! :-)
Post Reply