Studio better than Classic?

Started by Pfaber11, April 18, 2021, 15:18:25

Previous topic - Next topic

Pfaber11

I've been working on a new game the past few days and decided I needed clumps of grass all over the place . I used the cloneobject command and this worked fine and made 9000 clones which were positioned all about my terrain . I then thought this is overkill and am now using 4000 clones which was very good and went with it . I then tried to run it in AGK Classic and it would not run saying error out of GPU memory. Thoughts anybody? And I initially used 9000 clones in Studio and worked fine with that amount . In Studio it works with "Prefer Best" and "Basic" .
  So the differences are not just in the way the IDE works or Vulkan but other stuff too. Just thought I would share my findings .
Something else which I find I use a lot or rather look at is the assets window , save me having to go into my documents to check on file names . The documentation window is very nice too now I don't have to come off my page to look up scan codes etc. The only real drawback to Studio is the price but if you can wait for a sale which seem to happen every few months then it can be found at a reasonable price .
   Have a nice day and happy coding .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

  I just tried to see how many objects It would let me clone with Classic , it failed at 2000 but worked at 1000. Studio failed at 12000 but succeeded at 10000 . That is quite a large difference. I also noted that on 1000 clones classic was getting about 46 fps whereas Studio was getting the full 60 fps. I did read somewhere this guy said classic and studio were the same , how wrong he was . I'm done testing now but I just thought I would put this out there . You can see what computer I'm running at the bottom of the post and the figures may differ depending what system you are using .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

iWasAdam

without knowing what you are doing - i suspect modeling every blade of grass  :))

There is one thing I can tell you - STOP!

you should be looking at more composite models using textures to add the detail.

if your (visible models onscreen) count is more than 100-200 (particles don't count as they are usually dealt with differently) you are doing something terribly wrong.

This tutorial should give you some thought on what I mean by composite models with textures being used :)

Pfaber11

Thanks Adam I'm gonna watch it now and see what I think. 
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

Hmm very interesting . Think its gonna be a while before I produce much however it does open up the possibilities .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

iWasAdam

#5
use this gif as a general concept. it shows the 3d model and the single texture.
a number of these are grouped together and saved as a single combined model ;)


you then place/copy the core model, scaling and rotating to give you lots of variations...

The other thing you will need to understand is 'culling' - this is when a model you are not seeing is hidden in the scene. this will make your end scene run very fast, but you will have to come up with something to do it for you ;)

Pfaber11

#6
made it too big here is a better one .
I noticed the fps drops down a bit when taking a screen shot .

Here's a piece of my code for populating the terrain with grass .

     
for n = 1 to 4000
rotateobjectlocaly(12,ts)
ts= random(1,359)
xs = random(1,2560)
zs = random(1,2560)
SetObjectScale(12,random(4,6),random(7,9),random(4,6))
cloneobject(12)
if getrawkeystate(27)=1 then end

SetObjectPosition(12,xs,mappy-1,zs)
rotateobjectlocaly(12,ts)

next n   [code]
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

I had to wait awhile to get agk studio but now I have tried it I think it's awesome a d is a worthwhile upgrade from agk classic. Anyway. If you are undecided try the 14 day free trial. Some people prefer ago classic but personally for me it's Studio. My laptop has vulkan 1.2 and it really is excellent. Have a nice day. Happy coding.

HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

#8
This is my attempt at doing a forest , did clumps of grass then thought it can't be much different to do it with trees .Anyway here it is . Only simple but quite pleased with it . Toned it down a bit with 1500 clumps of grass and 1000 trees, all clones although all a bit different . I've unfortunately only got integrated graphics so can't go too mad but I suppose at least I know it'll run on most computers without any issues. Looks good on my phone too although only getting about 45-50 fps . I guess it depends on what phone you have although mines not bad being a moto G7 . May the force be with you .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

#9
Had a rethink of the way I'm using colours and this is what I've come up with .Gonna put some Android controls on it to see how it works on the phone . Really want the 60 fps but we'll see.



HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

RemiD

#10
i did some experiments with many grasses on a terrain, in january:
https://www.syntaxbomb.com/index.php/topic,8260.0.html


and the better fps (less rendering time) was not with many copies of a premade mesh, but with one mesh with one surface in which all small grasses were merged.

a better aproach would be to split your big map into smaller zones and to merge all grasses (or all trees), in the same zone, into one mesh one surface, and only show / render the zones near enough and in the field of view.