Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lactose!

Member Since 16 Oct 2013
Online Last Active Today, 08:49 PM

#5274514 messing up the functions from inherited classes from two different base classes

Posted by Lactose! on 05 February 2016 - 01:43 PM


But I prefer globals because the code seems clearer when the functions take no arguments.

This is something you should unlearn as quickly as possible.

 

While I can see that feeling cleaner, consider the fact that anything, anywhere, at any time, can access and modify the variables.

As the project you're working on starts to grow, this will become a problem. Suddenly, the variable isn't what you expect it to be, and finding out why is extremely difficulty and time-consuming.

 

On the other hand, if you pass the variables you need into a function, you can follow it a lot easier. You won't pass lots of parameters that aren't used (because it's tedious and boring to pass everything all the time), so you'll end up with functions of code, for the most part, only take the parameters they actually need.

 

Globals are bad.

There are some exceptions (e.g. globals that are read-only aren't as bad), but for the most part you should stay away from them unless you have very very good reasons not to.




#5274471 Looking for an engine for a 2d action RPG.

Posted by Lactose! on 05 February 2016 - 10:31 AM

I think JTippetts covered the 2D/sprite concerns.

 


3. Real-time combat, at least, it can do. In fact, I reckon it'd be a lot harder to do turn-based combat in Unity than real-time.

Both are completly doable.

 


4. Now, I didn't spend much time in Unity last time I tried game development (I never got a team together, and moved to Unreal while I was waiting), but I couldn't find one person who could tell me how to give an object multiple hitboxes. And funny,I just got off Steam where I was trying an FPS made in Unity. Oddly, they didn't have headshots, a nearly universal FPS trope. Kinda makes me think multiple hitboxes is impossible in Unity, or at the very least is so hard to do that the devs of that game couldn't figure it out.

There's no issue with having more than one hitbox. You might have to use game objects which are basically just a hitbox and make it a child of the main object or something like that (first solution I can think of, probably better ones exist), but there's definitely ways to this. Lack of headshots in the FPS you played was not due to it being impossible in Unity.

 


5. This might not be impossible, but the entire system would need to be completely built from the ground up in Unity. There isn't even a basic framework present for the existence of stats. In fact, there's no framework available for any RPG mechanics. Or the mechanics of any other genre, really. That isn't a problem if you're making a simplistic mobile "game" that barely has any mechanics, but for a REAL game, you'll want a more specialized engine.
6. See above.

JTippetts covered some of this as well.

Like I mentioned, you will have to do some work on your own. There might be other engines which have more built-in solutions for specifically these problems, but I think they are lacking in some of the other departments. I would also say there's a high chance of those engines not supporting what you need 100%.

 

Additionally, I object to the "for a REAL game" part.

If you look at what games have been made in Unity the last couple of years, I think you will find plenty "REAL games" in the list, both 2D games and stat heavy games: https://en.wikipedia.org/wiki/List_of_Unity_games

(2014 and onwards especially of relevance.)

 

While Unity might not end up being the best decision for you and your team, it feels like a lot of your arguments here are invalid or debatable.




#5274449 Looking for an engine for a 2d action RPG.

Posted by Lactose! on 05 February 2016 - 08:51 AM

 

New to creating games, mainly modders.

Solution: Use Unity.

 

Only if you have ignored literally every other word in the post.

 

What makes you say that?

Not everything you mentioned will have a solution built in, but everything you posted can be done in Unity.

 

There might be slightly better suited engines out there, although I can't personally think of any that fit your requirements better while not going against other requirements you have, but Unity is certainly a valid choice.




#5273492 Classes and header files mess

Posted by Lactose! on 31 January 2016 - 10:51 AM


-Sprite class
-Player class(inherited from sprite)

In addition to Nanoha's suggestions, something here seems wrong.

Use inheritance if the Player IS A Sprite. This seems unlikely to be the case.

You might want to look into composition, which is used when the Player HAS A Sprite.




#5271544 [SFML] My vector array is only drawing one sprite

Posted by Lactose! on 17 January 2016 - 08:34 AM


Well this is the only relevant code for now

What I believe Khatarr is saying, is that in the code you consider to be relevant, we can only see you creating a single troll instance.




#5270531 Create a game with no lag? (Unreal Engine 4). All tips appreciated!

Posted by Lactose! on 11 January 2016 - 08:21 AM

Just to clear up some terminology:

"Lag" in this context is usually reserved for delays due to network latency. The main things here involve network speed & stability, as well as how much data you have to transmit between server/clients.

"Frame rate drops/low frame rate" is usually reserved for the game playing at a low frame rate. This can be caused by having too much performance heavy AI or calculations (CPU bound), or by trying to draw more than the client's computer can reasonable handle (GPU bound) -- or a mixture of the two. This will vary wildly based on the player's hardware. The only reasonable thing you can do here is set a minimum requirement, and test the game on that hardware. There are things you can do to help some of these issues (GPU especially), by allowing different render resolutions, post-processing effects, etc.

 

Asset load time would mainly impact frame rate, but there's not always a strict correlation. A game with a 2 minute loading screen can have better performance than a game loading for 1 minute.

 

Generally, it's hard to say "this will make the game too slow" -- a lot will depend on the actual implementation.

Set a target hardware, and test regularly on it. If the game runs too slow, use profiling techniques to figure out why it's too slow. Maybe there's code you can optimize to make the problem go away, or maybe you just need to make the assets more light-weight. There's no 1 true answer here. It will depend on what you have and what you're doing.




#5269677 How to insert code in the topic

Posted by Lactose! on 06 January 2016 - 01:19 PM

There's a button that looks like this:

<>

The tool-tip when you hover it with the mouse says "Code".

Select it, and paste your code in the window that appears.

 

Alternatively, you can write:

[ code]

CODE GOES HERE

[ /code]

 

 

(Remove the space before "code" for this to work).




#5268110 Need help finding which tile my cursor is in?

Posted by Lactose! on 27 December 2015 - 06:39 AM

You can also treat it as just normal squares, and use an additional mask image. First, find the tile as normal, then use the mask image to determine if you need to offset you position.

This technique will also work with other tile shapes.

 

See this for more detail (described near the bottom).




#5267699 OpenGL call failed in RenderTarget.cpp (SFML2)

Posted by Lactose! on 23 December 2015 - 03:32 PM


If  that's the case then in my game class I have the following:

<snip>
And in my World class:

<snip>

Pasting your code here isn't what mhagain is suggesting.

The suggestion is to set a breakpoint and inspect the actual values when the code is being executed, to verify that they are actually valid when the error occurs.

Have you done this?

 

Actually, is debugging with breakpoints something you've done before? Since this is in For Beginners, your experience level is hard to guess.




#5267166 Creating own 2D game engine from scratch - howto

Posted by Lactose! on 20 December 2015 - 11:19 AM


You could argue that points 1, 3 and 4 are all the same and that point two is an example of Not-Made-Here Syndrome.

I agree that 1 and 3 have a lot of overlap.

I don't agree that 4 necessarily has a lot of overlap with the others -- I can find something fun/interesting without wanting to use it as a learning tool (although learning would happen as a by-product).

For 2 I definitely disagree. There are certainly cases where e.g. Unity is not the best option. Examples here would include games where other engines/frameworks are better suited (RPGMaker springs to mind), or cases which are outside the normal use case of Unity's target demographic -- high-end titles, benchmarking applications, etc.

That isn't to say that 2 doesn't lend itself to the kind of thinking you mentioned, I just don't think it disqualifies it from being valid in some cases.

 

It should be noted that for indies and smaller companies, point 2 might not be hugely relevant.




#5267064 Creating own 2D game engine from scratch - howto

Posted by Lactose! on 19 December 2015 - 03:08 PM


Honestly there aren't many reasons to create a 2D engine.

I have to agree for the most part with this, but on the other hand, some reasons do exist, including (but probably not limited to!):

 

- As a learning experience -- either for the entire "make an engine" part, or for sub-parts where an engine would prevent you from doing so (e.g. if you want to learn graphics programming and OpenGL, Unity wouldn't be a good fit -- although other, smaller, frameworks might be suited in this case).

- Because what you're wanting to make is so highly specific that a huge engine wouldn't give you a lot of benefit, or in some cases even be a detriment.

- As a way to gain knowledge on how game engines are made (compared to on how games are made using engines).

- Because you find it interesting and/or fun.




#5266633 Your development workflow

Posted by Lactose! on 16 December 2015 - 05:00 AM


These take place over a 

I think you accidentally a word.




#5266562 Having a problem to get values from different methods which contain different...

Posted by Lactose! on 15 December 2015 - 04:57 PM

In addition to the accuracy issue when comparing position, there's also this:

 

Enemy enemy = new Enemy(Content.Load("Enemy"), new Vector2(e_x, 100), new int());

//Other code goes here...

foreach (Bullet bullet in bullets)
{
	if (enemy.isHit(bullet, enemy))
	{
		enemy.Health -= 5;
		bullet.isVisible = false;
	}
}

You aren't testing against the enemies in your "enemys" list.

You're testing to see if the bullets collide with a newly created enemy.

 

You need to check every bullet against every enemy in your "enemys" list*.

 

It also seems wrong to me creating a new instance of Enemy every time the function is called, and then only adding it if less than 3 exist in your list.

Check first, then only create & add if needed.

 

 

*Note that there are better ways of dealing with this later on, but for now a brute force way should be sufficent.




#5266231 Unity Vs Unreal

Posted by Lactose! on 14 December 2015 - 04:09 AM

 


If you use Unreal, Epic Games takes 25% of your revenue, after Steam or Apple,

That changed some time ago. It's now 5% of your gross revenue.

 

I missed this. This obviously also shifts the financial break-even point when comparing Unity and Unreal when it comes to licensing.




#5266185 Unity Vs Unreal

Posted by Lactose! on 13 December 2015 - 08:22 PM


If you use Unreal, Epic Games takes 25% of your revenue, after Steam or Apple, so you end up getting around onlt 50% of the revenue from your game vs Unity which charges no licensing fee at all, or $1500 if you make $100,000 or more

While technically correct in some cases, there's a potential for a higher cost than you listed for Unity users, due to 2 reasons:

1. The licensing fee applies per person (or rather seat) in a team. If you have 4 members, this will quadruple the total licensing fee.

2. In the case where you exceed the $100,000 (which is not just for revenue, but for game budget), you need to buy a $1500 license, as you mentioned. However, if you are developing for iOS and/or Android, you also need to buy the relevant iOS and/or Android Pro license.

With a development team consisting of a few members, and developing for either mobile platform, using Unreal could in some scenarios be cheaper overall than using Unity.

 

EDIT: I didn't catch Dave Hunt's correction (see next post), which will also affect the break-even point.

 

 

 


Plus, Unity is more performant on mobile devices, has a larger community, better Asset Store, and uses a more modern language (C#) for coding, giving more power, speed and flexibility than Unreal. 

(Emphasis added)

Citation needed.

In which ways does Unity's C# implementation lend itself to the bolded benefits?

Also, what does the term "power" means in this context?

Additionally, I'd like to see benchmarks for the performance gap, if you have some at hand.

 

 

 


And, if it's a visual logic editor you want, Unity has PlayMaker, which is an add-on you can get for free from the developer's website.

A visual scripting/logic editor is also available for both engines, and is not limited to Unity (which is how your post reads to me).

For Unity, you have the PlayMaker add-on, while Unreal has the Blueprint system natively.






PARTNERS