Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 04:51:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)General thread for quick questions
Pages: 1 ... 18 19 [20] 21 22 ... 69
Print
Author Topic: General thread for quick questions  (Read 132622 times)
Kyuugatsu
Level 1
*



View Profile
« Reply #380 on: October 14, 2015, 01:04:20 PM »

Maybe take a look at this

http://illogictree.com/games/kyoto/

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. Tongue
Logged

Cheezmeister
Level 3
***



View Profile
« 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

෴Me෴ @chzmstr | www.luchenlabs.com ቒMadeቓ RA | Nextris | Chromathud   ᙍMakingᙌCheezus II (Devlog)
Kyuugatsu
Level 1
*



View Profile
« 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

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #383 on: October 15, 2015, 06:49:53 AM »

Maybe take a look at this

http://illogictree.com/games/kyoto/

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.
 

Did you read his devlog? He does talk about techniques (vertlets etc).


http://forums.tigsource.com/index.php?topic=24105.0
Logged

Kyuugatsu
Level 1
*



View Profile
« Reply #384 on: October 15, 2015, 09:08:16 PM »

Did you read his devlog? He does talk about techniques (vertlets etc).


http://forums.tigsource.com/index.php?topic=24105.0

I hadn't read it. Thanks!
Logged

oahda
Level 10
*****



View Profile
« 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
*



View Profile
« 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
Level 10
*****



View Profile
« 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? Durr...?
Logged

zleub
Level 0
**


View Profile WWW
« 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
Level 10
*****



View Profile
« 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
Level 0
**


View Profile WWW
« Reply #390 on: October 22, 2015, 01:24:14 AM »

Nop, I don't think that's possible.
Logged
oahda
Level 10
*****



View Profile
« Reply #391 on: October 22, 2015, 01:25:01 AM »

 Hand Thumbs Up Right
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« 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
Level 10
*****



View Profile
« 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

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #394 on: October 22, 2015, 06:49:01 AM »

http://stackoverflow.com/questions/25864206/running-c-code-outside-of-functions-scope

I take back what I said, apparently it's possible with some manipulation (exploit?) of class based things. I'm not sure what's happening in this though.
Logged

oahda
Level 10
*****



View Profile
« 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. Tongue I was just curious if the exact thing I described could be done, out of random theoretical interest. Smiley
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« 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
Level 10
*****


View Profile WWW
« 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
Administrator
Level 10
******


aka Mireille


View Profile
« 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
Level 10
*****



View Profile
« 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

Pages: 1 ... 18 19 [20] 21 22 ... 69
Print
Jump to:  

Theme orange-lt created by panic