• Create Account

MarkS

Member Since 09 Jan 2001
Online Last Active Today, 06:19 PM

#5259811How to get angle for 360 degrees for a line

Posted by on 30 October 2015 - 05:15 PM

I'll let Dijkstra answer: http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

Well, yes, such as it applies to computers and programming. I was thinking about how math is taught in school.

#5259628Confused at rotating an object around a transformed circle

Posted by on 29 October 2015 - 03:12 PM

You need to scale your object radius in the Update function by the same amount you scale the path.

Changing this:
```obj[i].y				= obj[i].radius * Math.sin(angle);
```
To this:

```obj[i].y				= (obj[i].radius * 0.3) * Math.sin(angle);
```
Fixed the problem.

#5259366Game development with assembly. Where to start?

Posted by on 27 October 2015 - 10:18 PM

Hello,

For the past few days I have been learning assembly and I was wondering how to display graphics on the screen.

I'm doing this just for fun because I feel like I'm starting to burn out on my main game project and I thought I would do something fun like learn assembly. However displaying text on a console wasn't very exciting for me. So I'm taking it to the next level.

So, does anyone know how to start game development with assembly?

thanks

Why do you want to do this? What do you hope to gain? Yes, there is still the ability to write optimized assembly, but you can write just as optimized code and write it far quicker in a higher level language with today's compilers. I certainly recommend learning assembly, but for no other reason than to know what is going on behind the scenes. It's a step up from writing code directly in binary. It's like learning how to fix an engine to get your driver's license.

#5258187Why didn't somebody tell me?

Posted by on 20 October 2015 - 03:41 PM

Lessie if I can explain better: (or maybe just make it more confusing)

```const int* type1; // non-const pointer to const int
int* const type2; // const pointer to non-const int

int value1 = 1 * 2; // 2
int value2 = 2 * 1; // also 2

typedef int* IntPtr;
const IntPtr type3; // const pointer to non-const int
IntPtr const type4; // ALSO const pointer to non-const int

const int onePlusOne = 1 + 1;
int value3 = onePlusOne * 2; // 4
int value4 = 2 * onePlusOne; // 4

#define INT_PTR int*
const INT_PTR type5; // non-const pointer to const int!
INT_PTR const type6; // const pointer to non-const int

// of course if the * isn't there, suddenly const is commutative
const int type7; // const int
int const type8; // ALSO a const int
```

I'm still lost. Maybe I'm reading your example as compilable code and it's not? type1 - 8 are not used with value1 - 4, so I'm lost on the math issue. How does const int vs. int const change the way the compiler calculates the mathematical expressions?

#5258011Problems writing a BMP exporter

Posted by on 19 October 2015 - 05:12 PM

Its kind of funny how those two modes work, they have basically an entire complete PNG or JPEG file where the pixel data should be. (you can read in a JPEG file, stick it inside of a bitmap container in memory, and send it to GDI and it will render it)

Most likely to get around patent issues.

#5258009Why didn't somebody tell me?

Posted by on 19 October 2015 - 04:59 PM

```int i = 1 + 1 * 2; // 3
// here's the "typedef"
const int onePlusOne = 1 + 1;
int j = onePlusOne * 2; // 4, not 3
```

I fail to see the problem with that.

#5257714How to create shader that fades based on two different connecting surface angles

Posted by on 17 October 2015 - 03:34 PM

It looks like ambient occlusion.

#5256580Should I use OpenGL or Directx

Posted by on 10 October 2015 - 03:30 PM

This question has been asked multiple times and is actually not allowed.

From the For Beginners FAQ:

"This" versus "that" threads are considered flame bait and will usually be closed on sight. Such questions have usually been asked before, several times, so there should be no need to ask them again.

#5256556The wrong way to count lines of code

Posted by on 10 October 2015 - 12:39 PM

Not really. It's a useful metric- at least it would be if they implemented it properly. Gives you a ball park figure of how complex a project is.

It really isn't. Brackets, for instance, are arbitrary. They make the code cleaner, but do not translate to machine code. There is quite a bit in all modern languages that exists for aesthetics and code organization that do not have any effect on the final machine code.

This:

```if(...){}
```
is equal to this:

```if(...)
{
}
```
Your code really isn't any more compact in the first case.

#5255919What's the best system on which to learn ASM?

Posted by on 06 October 2015 - 06:15 PM

I vote 68000. I learned to program on a Mac 512KE and the only processor I've actually learned assembly for was the 68000. It has a remarkably easy and rather nice instruction set.

#5255130which program I should use for a text adventure

Posted by on 02 October 2015 - 07:34 AM

Hi Snatcher,

Have you considered using a programming language instead? It would give you the ability to build on your efforts from creating this in the future.
I'm currently learning javascript and am working on a text adventure also with some graphics.
Good luck either way and let us know how you get on.

I've been wanting to make a text adventure game for years. I've been programming for 30 years. Text adventures are easy to write, so long as you don't include a command parser. This is absurdly hard to get right. I've tried and failed. Parsing the individual commands is easy. Applying the parsed commands to grammar rules is not so. If you can find a program that does this for you, use it!

#5255068which program I should use for a text adventure

Posted by on 01 October 2015 - 07:24 PM

I'd use Quest, if for no other reason than the website actually shows how to use it. Twine seems like an afterthought.

Posted by on 01 October 2015 - 04:50 PM

Tom Forsyth gives a pretty good argument against scene graphs in his blog. It falls under his OffendOMatic blog post!

#5255023Books with decent, real and useful projects?

Posted by on 01 October 2015 - 01:00 PM

Someone else will have to chime in then. I gave up on programming related books years ago. There may be books like what you're looking for, but I haven't checked in nearly a decade.

#5254931Books with decent, real and useful projects?

Posted by on 01 October 2015 - 12:25 AM

This was a common theme back in the 90's when graphics APIs either didn't exist or were in their infancy. I have several very old computer graphics books that detail how to make something useful, from start to finish, and all use software renderers. I think the focus has shifted now to explaining how to use the various features of the different APIs, and since the APIs are so complex, the authors really do not have the time or space for much else. It is left to the reader to assemble the pieces into something useful.

That being said, I no longer recommend buying books on any computer graphics related subjects. The technology changes so fast these days that by the time the book makes it to print, it is seriously outdated. You'll find more up to date stuff online where changes can be published immediately.

PARTNERS