Well I like your Tutorials... Awesome!!!
So I think you could help me .
Thing is: I want to make a game with Ants and because I love these Animals and they seem to be perfect to implement to a Game, because ( until now ) there are only 20 known Operations they can do and they are quiet easy to implement ( I had c++ at the university, but only console-applications ).
Problem:
Ants leave a smell while looking for meal or something ( 20 operations ). I wanted to implement that by leaving parts of the PlayBoard behind the Ants "shine". But if they overlap the Shine is brighter ( hard to explain with words but really simple ).
I had two Ideas:
1: I define squares over the whole Playboard, so I can define the Strenght of smell by an intended Value, or
2: I use the defined Line-Method and calculate by distance.
I want the Program to work mostly efficient, and depending on the Size of the PlayBoard both seem to have their Advantage.
What would you prefer or do you have a better Idea of making it?
Whatever... Thanks Dude
p.s.: Why don't you include "string" or something from the "stl"? I know you are going Step by Step, but if you dont include them because of any Problems ( like Runtime ) I just have to know .
Need a Tip
Re: Need a Tip
you could do try doing some color arithmetic, like for ex: multiply current pixel color with trail color (or something like that ), for that you'd need a line drawing function that takes that into accountAliB wrote: Ants leave a smell while looking for meal or something ( 20 operations ). I wanted to implement that by leaving parts of the PlayBoard behind the Ants "shine". But if they overlap the Shine is brighter ( hard to explain with words but really simple ).
the chili already explains in one of his vids why he decided to use c-strings instead of stl strings (not gonna repeat it here since you can hear it in vid xP), and imo i like to use c-strings lol (that's just me, so meh lol)AliB wrote: p.s.: Why don't you include "string" or something from the "stl"? I know you are going Step by Step, but if you dont include them because of any Problems ( like Runtime ) I just have to know .
(man i wish this forum had a quick edit option, something mybb already has :/)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Need a Tip
You could section the world into blocks which would have various data about the blocks such as size, position, type and intensity of smell. As far as the intensity or brightness you could add the colors together and normalize to 1.0f or 255 if over these numbers, and create a "brighter or shinier" trail by increasing the radius of the glow.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Need a Tip
A bitmap is what I would probably go with. If you learn to use HLSL you could make the program use your GPU to do calculations using the image, that would speed it up potentially by 1000x haha.
ʕ •ᴥ•ʔ
Re: Need a Tip
Thank you all for your good tipps ( and the reminder that I have to listen more carefully to the Tutorials ). Well I think I try the tipp by LuX... I found some Pages about HLSL that I could use, but if you've got a tipp for a special page ( without any Payment ) I'd be very happy to know.
Again: Thank you everyone
Again: Thank you everyone
Re: Need a Tip
Hmm, yeah I'm not really sure if that's even doable with c++... But you can always render the drawings with HLSL. To be honest I doubt your code will be that heavy that you will need to optimize it so radically. If you haven't completed chili's series it might be a bit early to tackle HLSL. I used primarily the tutorials from Rastertek, but now looking through the SDK examples.
ʕ •ᴥ•ʔ
Re: Need a Tip
Sure, I have to go Step by Step. I Just startet learning directX and that will take some Time... But it's always good to know what's the next Step.