Jump to content
  • Advertisement

ggenije

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ggenije

  • Rank
    Member

Personal Information

  • Interests
    Art
    Audio
    Business
    Design
    DevOps
    Education
    Production
    Programming
    QA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ggenije

    How to program smarter??

    Like this? public class Enemy { float health; float attack; float speed; void Attack(){}... } public class Minion : MonoBehaviour { Enemy enemy; void Update() { MinionWork... } } public class Boss : MonoBehaviour { Enemy enemy; void Update() { BossWork... } }
  2. ggenije

    How to program smarter??

    What I am doing is next: with class Enemy there is type Boss and non Boss(minions) i use same model for minions and bosses , just scaled. 99.99% of enemies are minions and they behave the same (expect some minor things that happens once in few seconds) but 0,001% are boss that behave differently. So why call a millions of unnecessary if statements? I know that this statements they do not bother too much , but what is there a lot of different types/behaviors . Also different bosses doing different things.
  3. ggenije

    How to program smarter??

    My problem isn't that I have many if statements,but to do it only once, not in every update.
  4. My question: For example I have class enemy, let's say I have 100 enemy types. Now in Update()(each frame) if(enemyType==Type1) {doWhat Type1 does} else if(enemyType==Type2) {doWhat Type2 does} else if(enemyType==Type3) {doWhat Type3 does} ... else if(enemyType==Type100) {doWhat Type100 does} so in each frame I can call up to 100*enemy count so is there any way to avoid this , to tell it earlier what update should it do I am working in unity, but is there universal way or?
  5. This is what I'm trying to make in custom editor so it's like a wave of enemies data that I'm storing in next way: first int-> number of formations then select formation (one, pair, triple, shield...) and for each A FIXED NUMBER OF (1 for one ,two for pair , 3 for shield...) other enum (types) that way I can store many number of rounds without typing code, but I don't know how to make it to limit with fixed number...
  6. Important: I am trying to realize in scrtach which is performance very low due to it's "virutal level" scrtach->flashplayer->java... Also i'm new to this forum so i'm sorry if I missed group (like last time) Like a title is saying:I have project ,and I get negative feedback on it because some people need 30 min to complete it (what is the planned time)but problem is that some people need EVEN 5 hours…(game is incremental/idle/upgrade type so it's important to keep same time ...)———————————————————————————————————————-Of course people with slower computer will have less fps so game will be slower for them,so I have created TimeDelta system for each frame to calculate something to do per second for example Update(){move(TimeDelta*speed)} so that mean it will be moving speed number of pixels(or units) per second so it will be same for almost each user.But problem is next:I have to change ySpeed by jumpPower (#PlayerJump in my project)when any jump button is pressed then in each frame decrease ySpeed by gravity it is(-10 * TimeDelta)but when someone have lower fps it will have higher TimeDelta and will fall faster but with same jump it turns out to jump significantly lower that changes core of game BUT even worse if fps suddenly in moment of jump then timeDelta would be 1 so player will jump much much MUCH higher , then fall much slower because timeDelta changed in meanwhile…(and the point of my game is about upgrading jump not complete game in first fps drop) —————————————————————————————————————————————————————Then I got an idea to fix TimeDelta (like in unity for rigibody) so it will be rounded likeif calculated TimeDelta is 0.01834 it will be 0.02 fixedif weaker computer is using it the TImeDelta will be 0.143 so runded to 0.14 and so on…I did not manage to realize it… i tried to calculate it before main initialization of game objectsbut I'm afraid to fps will drop in moment that is calculating so it will be much diffirent…I was trying with empty loop(400)(in scrtach even this is taking time) to calculate it but i'm not sure is it right So is there good way to realize this fixed TimeDelta I only have timer function to use and time difference between frames This_is_the_link_for_the_game
  7. ggenije

    Make game like worms

    Yes I can use sprites but even with 100 sprites it's lagging and even number of sprites is limited to 300 But I do not even know how to realize the base of game, And it's very easy to make sprite transparent (in Scratch (sprite or circle(pen)))
  8. ggenije

    Make game like worms

    You can even try it and view the code https://scratch.mit.edu/projects/237888143/
  9. ggenije

    Make game like worms

    That engine allows only circles ( you can draw triangle with circles but you'll need many circles) because I'm doing in engine made in flash player intended for kids for 8 to 16 year (this is somewhat challenge to me) and circle is max 128 pixel radius
  10. ggenije

    Make game like worms

    As said in title i want to make game like worms but i will some limits: 1.I can only draw terrarian using circles 2.Engine have very low performance -> only around 1000 circles allowed for normal fps of course in 2D
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!