Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lactose!

Member Since 16 Oct 2013
Online Last Active Today, 04:13 PM

#5194805 SDL Pausing game help?

Posted by Lactose! on 26 November 2014 - 12:21 PM


is paused already in the sdl library?

No.

 

His suggestion is to create a bool variable called "paused".

Toggle the variable when Escape is pressed.

Check the state of the variable in your update loop to determine what updates.




#5193157 Building A Game Engine + Game

Posted by Lactose! on 16 November 2014 - 06:43 PM


Its undefined because you haven't assigned a value to it. In reality it will be some value that was left in the stack from a previous local variable in some other function call.

While the question is simple, the correct answer is quite a lot more complicated than that (although more information would be required to accurately answer a specific "version" of the question).

The short answer is "It depends on where the line of code is written", followed by a number of different scenarioes with different rules & logic for the corresponding value.




#5193138 member access into incomplete type

Posted by Lactose! on 16 November 2014 - 03:21 PM

In other words, in the object.cpp, this:

const char* getSomething(){

needs to be changed to this:

const char* object::getSomething(){



#5193024 Best Way to Learn 3D Computer Graphics? Help!

Posted by Lactose! on 15 November 2014 - 03:20 PM


It's certainly a private choice,

Did you mean "viable" or something similar? I'm having a hard time understanding this as it is written.




#5191215 Thread-post never made ... almost

Posted by Lactose! on 04 November 2014 - 04:32 PM

I have a rubber duck at my desk for this exact reason. If I'm stuck, I explain the problem to the duck and half the time figure out the solution in the process.

AKA rubber duck debugging.




#5190238 Match-3 Program Question

Posted by Lactose! on 30 October 2014 - 04:03 PM


the programmer seems to think there should be a more efficient way to detect matches.

Most likely, this is true.

Most likely, this does not matter at all.

 

Unless there are cases which the code does not handle correctly, or if the code's efficiency is a real (measurable) problem, notions like "it can be done better" should be filed away for the sequel. Your goal is to finish and ship the game, not to rewrite pieces of code until the end of time.

 

As is often the case, perfect is the enemy of good [enough].

---

EDIT: If there are real problems (measurable or use cases where it fails), posting details on those specific areas would be required for further feedback.

EDIT 2: Ninja skills are definitely improving today.




#5190207 Match-3 Program Question

Posted by Lactose! on 30 October 2014 - 02:27 PM

You say you've already got a demo up and running. I would assume this includes some sort of code for checking matches.

Is the code you have already not good enough? If not, why not?

 

If you don't have any code for checking matches yet, what have you tried?

 

It's somewhat tricky to give specifics without more details (especially if you have something working but it's not good enough for you, for some reason), but more advice should be possible, especially given the answers to those questions.




#5190096 Creating a Grand Theft Auto type of Game in Delphi.

Posted by Lactose! on 30 October 2014 - 02:46 AM


OpenGL is the engine I usually use.

OpenGL is still not a game engine (as I mentioned the last time you referred to it as such). It is still a cross-language, multi-platform rendering API (specification).

"Game engine" in the context of the original post is a term used mainly for more complete packages, usually something like Unity3D, Unreal Engine, etc. It can also refer to the parts of a studio's code base that are reused for multiple games.




#5190011 Game Development with Delphi: "Yes or No?"

Posted by Lactose! on 29 October 2014 - 02:36 PM

Another Delphi post/thread?

 

If the best thing about Delphi is "you can create the same games as when using other languages, but it might be a lot harder and take a lot more time", then I would find it foolish to choose it over other, more pragmatic solutions. The exception would be if one wanted to do so for learning purposes or because one found it fun/interesting or similar.

 

If I had a project in mind*, I would want to choose a language/framework/engine that I thought best suited the project/goal. As someone who has never used Delphi, I don't see any particular reasons why I would want to change that, aside from the catch-all notion that being knowing multiple languages is usually a boon.

 

If I were a Delphi expert, I would probably be more inclined to choose Delphi, assuming no other languages/frameworks/engines were better suited, given my other knowledge in this hypothetical scenario. That said, I personally see no reason for choosing learning Delphi as opposed to e.g. C# or Python.

 

That's not to say Delphi users can't or don't create awesome things. I'm sure they can and do, but for me personally to be interested, there would have to be a clear benefit to it, which isn't something that you've conveyed so far in any of the posts/threads I've seen you make.

 

 

*And I do. I don't see a reason why I should use Delphi for it, so I won't.




#5189918 Wanted: Free 3D Game Engine for Farming Game

Posted by Lactose! on 29 October 2014 - 07:26 AM


Here is a few Game engines in Delphi:

XNA is usually considered to be a framework, not a game engine.

OpenGL is not a game engine. It is a cross-language, multi-platform rendering API (specification).




#5189650 function that returns class template

Posted by Lactose! on 28 October 2014 - 04:06 AM


Don't use underscores as a suffix. 

Using underscores as a suffix is ok, as long you avoid adjacent underscores.

What WiredCat is doing is using them as a prefix, which you shouldn't (as per ChaosEngine's quote).

 

Suffix = at the end.

Prefix = at the beginning.




#5188927 how to limit fps in glut ?

Posted by Lactose! on 24 October 2014 - 09:51 AM

Minimal effort question = minimal effort answer.

http://lmgtfy.com/?q=glut+limit+fps




#5184255 how does it make the game?

Posted by Lactose! on 01 October 2014 - 02:52 AM

http://www.gamedev.net/page/reference/faq.php/_/for-beginners-r1




#5181622 Can you explain to me this code !

Posted by Lactose! on 19 September 2014 - 03:07 PM

If you enter 100, you will get to how_much = int(choice).

That means how_much is equal to 100.

In the next if statement, we check if how_much is less than 50. 100 is NOT less than 50, so we do not enter the if part of the if statment.

Instead, we enter the else part of the if statement.

Inside the "else" part the dead("You greedy bastard!") code run.

The dead code will print the text you see.

---

Edit:

 

Like I've done before, I would suggest you slow down. You seem to be going too fast. You might be going through the exercises quickly, but if you don't understand them, you won't learn much.

The questions you're asking indicate you're missing some fundamental knowledge. I would urge you to back to earlier lessons, and not progress until you feel you understand basically every line in the lessons you're working on. If parts are unclear, I'm sure people will help you. That said, I would recommend you ask more specific questions.

Instead of "help what does this do" and post all the code for a lesson.




#5181150 Tilemap collision problem

Posted by Lactose! on 17 September 2014 - 04:43 PM

It will probably not move because it's stuck inside the collision.

 

One solution could be:

1. Store current player position.

2. Update the player position.

3. Check the new position for collisions.

4. If a collision was detected, move back to the original position (stored in step 1).






PARTNERS