Kyuugatsu
Level 1
|
|
« Reply #380 on: October 14, 2015, 01:04:20 PM » |
|
Thanks! I hadn't seen that before. It doesn't really help my technical problem but it's definitely similar to what I'm going for. Well, you can still use the technique I suggested in 3D (since my "2D" technique basically is 3D tech, but only uses two axes). It just gets a little more complicated to work with, but it's essentially the same.
But when you talk about models and stuff I begin to wonder whether you're actually intending to premodel the trees in all of its various stages. Maybe blendshapes could be use to tween between those in that case...
Oh, I hadn't heard of blendshapes before. Thanks! That should help me out a lot. Yes, I was thinking of premodeling because it would very likely be the easiest thing to do here. Not sure how wind/snow/rain would work but that's much farther down the line so maybe I should stop worrying about it.
|
|
|
Logged
|
|
|
|
Cheezmeister
|
|
« Reply #381 on: October 14, 2015, 08:43:42 PM » |
|
I'm making a game where you essentially watch a tree grow.
Include a mini-game where you brush paint on the tree and then watch it dry ^_^
|
|
|
Logged
|
|
|
|
Kyuugatsu
Level 1
|
|
« Reply #382 on: October 14, 2015, 08:46:26 PM » |
|
I'm making a game where you essentially watch a tree grow.
Include a mini-game where you brush paint on the tree and then watch it dry ^_^ No man, that is silly. But you water it by leaving ice blocks near the base and watch them melt.
|
|
|
Logged
|
|
|
|
|
Kyuugatsu
Level 1
|
|
« Reply #384 on: October 15, 2015, 09:08:16 PM » |
|
I hadn't read it. Thanks!
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #385 on: October 16, 2015, 02:09:04 AM » |
|
I can't make static class methods in AngelScript? Googling and looking through the manual turns up nothing, and it would be weird if something like this didn't follow the C++ syntax (for which I'm getting an error) like most AS stuff, so do they really not exist?
|
|
« Last Edit: October 16, 2015, 02:48:03 AM by Prinsessa »
|
Logged
|
|
|
|
Kyuugatsu
Level 1
|
|
« Reply #386 on: October 16, 2015, 06:52:10 AM » |
|
I can't make static class methods in AngelScript? Googling and looking through the manual turns up nothing, and it would be weird if something like this didn't follow the C++ syntax (for which I'm getting an error) like most AS stuff, so do they really not exist?
I wasn't able to find anything either. The closest thing is namespaced globals, or maybe the "shared" keyword (although it doesn't look like you can "share" variables).
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #387 on: October 22, 2015, 12:47:21 AM » |
|
Meh. Also random theoretical question that popped into my head: in C++, is it possibly to have a function that when called creates a variable on the stack in the scope from which the function was called, rather than the scope of the function body? I would assume NO but since I had the thought, why not ask?
|
|
|
Logged
|
|
|
|
zleub
|
|
« Reply #388 on: October 22, 2015, 01:04:37 AM » |
|
If i'm not speaking about something i didn't understand, you're looking for the lambdas object. edit: I'm not sure for the allocation part tho.
|
|
« Last Edit: October 22, 2015, 01:13:41 AM by zleub »
|
Logged
|
|
|
|
oahda
|
|
« Reply #389 on: October 22, 2015, 01:20:54 AM » |
|
I mean a regular old-school function that I don't necessarily define myself. I just call it.
|
|
|
Logged
|
|
|
|
zleub
|
|
« Reply #390 on: October 22, 2015, 01:24:14 AM » |
|
Nop, I don't think that's possible.
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #391 on: October 22, 2015, 01:25:01 AM » |
|
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #392 on: October 22, 2015, 06:22:15 AM » |
|
I'm pretty sure that would defy the very basis of programming language design. You would pretty much need to never call this function more than once in the same scope, and making this work with a C++ compiler would most certainly be a nightmare. Also, I'm relatively certain that Edsger Dijkstra would not approve.
|
|
|
Logged
|
|
|
|
InfiniteStateMachine
|
|
« Reply #393 on: October 22, 2015, 06:42:08 AM » |
|
you want to define a function withing a function and call it multiple times with in another functions body? Why would a lambda not do the job for this?
Can you post code to kind of show what you mean?
|
|
|
Logged
|
|
|
|
|
oahda
|
|
« Reply #395 on: October 22, 2015, 09:49:13 AM » |
|
I don't want to do anything with this at all, so don't bother with alternative solutions. I was just curious if the exact thing I described could be done, out of random theoretical interest.
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #396 on: October 22, 2015, 09:53:33 AM » |
|
I've actually wondered about this too, since when I first started learning C++ and scope wasn't super clear to me I would wonder if it was possible to have a function create variables. The obvious answer was yes, of course, but you can't really define their scope, and that's because in C++ there isn't really a way to identify scopes.
I might be on to something. Would it be very useful to manipulate scopes in a similar fashion as variables? Would anyone use a language in which such an outlandish thing is possible?
|
|
|
Logged
|
|
|
|
BorisTheBrave
|
|
« Reply #397 on: October 22, 2015, 10:30:24 AM » |
|
CPython has each stack frame (what you are calling scopes) as inspectable objects. You can edit them just as any object. It's meant for debugging only though.
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #398 on: October 22, 2015, 10:41:06 AM » |
|
I am totally going to use that to my advantage. I also realize now that objects are, in a way, ways to manipulate scope by creating a new one each time an instance is created. This is still limited though, as you still can't access a "global" scope, or a specific level of the scope "stack" if you will. Now that I think about it, this could totally be done in Javascript. You would just need to create an object named global and run all you main code in that object, so that you could always just type global.variable to create or access a variable for that scope. This setup step of creating an object before you intend to create a variable in that scope could get tedious though if you intend to use it several steps deep. Also garbage collection would become a nightmare.
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #399 on: October 22, 2015, 11:05:10 AM » |
|
But you can already put variables in the global scrope in JS. D: From where are you getting that you can't do that?
|
|
|
Logged
|
|
|
|
|