Jump to content

  • Log In with Google      Sign In   
  • Create Account


Fredericvo

Member Since 06 Mar 2012
Offline Last Active Yesterday, 04:00 PM

#5181570 My games does not work on Mac but works in Windows

Posted by Fredericvo on 19 September 2014 - 11:00 AM

Think different
(Sorry couldn't resist)


#5179731 Separate dll and linking to another project

Posted by Fredericvo on 11 September 2014 - 06:35 PM

I recommend this read though:
http://eli.thegreenplace.net/2011/09/16/exporting-c-classes-from-a-dll

You can export just one C function that creates instances of your classes. They have to derive from an abstract class though as the methods won't be visible by dll export but by the vtable in its data segment.


#5178856 GOTO, why are you adverse to using it

Posted by Fredericvo on 08 September 2014 - 08:14 AM



Let's not forget that goto fail; happened.

 

Wow I noticed that my device is vulnerable and I wasn't aware of it. I deliberately avoid ios 7 as I dislike it very much so is there no patch for 6.1.2? I kinda hate how apple always forces the very last os on you.

On another note, I don't understand how the bug works. the second goto fail: does skip an important signature check but... executing it and the signature not being valid also branches to fail: it seems this code always goes to fail, no matter what.

 

EDIT

I think it's err's value that matters. Ignore my post.




#5178073 Possibly a better design for rendering?

Posted by Fredericvo on 04 September 2014 - 09:14 AM

Game Objects should not contain directx9 stuff. (what if you ever wanted to use OpenGL? Or DX 11?)

They should only contain position, velocity, game specific related stuff and... something like an int or enum that you will use to identify what model/sprite/texture etc to use (and which are stored in their respective manager classes)

So you'd iterate through your objects as now, retrieve their position and an an id for a sprite (a place on a spritesheet texture), then send the relevant info as parameters to your renderer's method(s).




#5177675 Did I begin learning late?

Posted by Fredericvo on 02 September 2014 - 10:36 AM

I learned C++ within the last 2 years and I'm 37.

(granted, I learnt C64 BASIC at 9 & 6502 assembler at 12 so maybe I had an unfair advantage)




#5174754 How do you make these "long" web sites?

Posted by Fredericvo on 19 August 2014 - 09:51 AM

If you mean infinite scroll, personally I detest it.




#5173768 Creating a Basic Window Tutorial

Posted by Fredericvo on 14 August 2014 - 08:33 PM

If I can give you one advice, please try to increase the audio quality. With my volume level maxed out you still sounded like you were far away.




#5171642 What happened to Rastertek?

Posted by Fredericvo on 05 August 2014 - 09:24 AM

I took the trouble to save the entire DX 11 Basic + Terrain tutorial from archive.org just in case that site were to vanish too or in case you need an offline copy. That complements Alessio1989's saved source code.

 

http://1drv.ms/1ookevH




#5170480 Want to move onto a graphics library

Posted by Fredericvo on 30 July 2014 - 07:08 PM

How do I include the .lib files to Visual Studio for SLD2?

#pragma comment(lib,'SDL2.lib')
#pragma comment(lib,'SDL2main.lib')


#5162312 Why do we need to iterate data structures as they are already in RAM

Posted by Fredericvo on 23 June 2014 - 06:30 AM

First off, I hope I placed this in the appropriate section.  If so...

 

 

I've been programming for a while, but this may be a simple question to some (or many).

 

My Question: If a data structure already exist directly in RAM, then why do we need to spend the processing power to iterate in order to find the right data? (Side Note: pointers still exist in managed languages. They're just handled for you)

 

 

All that would actually be in RAM is:

 

index 0, index1, index 2

 

 

Index 0: --> GET VALUE '10'; FALSE; Next Address!

Index 1: --> GET VALUE '15'; FALSE; Next Address!

Index 2: --> GET VALUE '5'; TRUE; RETURN Value!

 

 

 

It doesn't work like this. RAM is like one huge array of bytes e.g. char MyWholeRAM[4 294 967 296] for 4 GB.

Every byte (char) has a unique address numbered from 0x00000000 - 0xffffffff 

I'll spare you details about paging and kernel space/user space.

A pointer is just an address of one location stored at another location. The CPU can only load a few values at once in its registers so iterating through RAM means loading data in registers, do a calculation or comparison, and store the value.

Some times it needs to know that another value is at a particular place in RAM and that's when a pointer tells it where it is.

A linked list would be stored as a pointer to the next node or NULL if there are no more nodes, and the actual data. The other node would again contain a pointer (really just a 4 byte value like another or 8 bytes in case of x64) 

Attached Thumbnails

  • ram.png



#5162300 DirectX

Posted by Fredericvo on 23 June 2014 - 05:51 AM

I completed all 49 DX11 tutorials from www.rastertek.com and all 20 terrain tutorials and everything is starting to make a lot of sense to me now. I did have some mathematical background already though (Linear Algebra). I recommend khan academy or Paul Dawkin's online notes (Lamar Uni) to learn that.




#5041474 When to start with C++?

Posted by Fredericvo on 10 March 2013 - 05:45 AM

I knew assembler before I knew C and C before C++. I understood pointers already thanks to assembler and curiously found the C/C++ way to approach them more convoluted because of the complex syntax. Looking at assembly output helped me understand what compilers do and get the language better.


#4963065 PhysX basic understanding

Posted by Fredericvo on 25 July 2012 - 03:06 PM

I'm still a total noob on this topic but from what I read so far, yes, this seems to be how it works.


#4961312 "Make Games, Not Engines".. But how?

Posted by Fredericvo on 20 July 2012 - 07:00 AM

Do you mean even the little question mark block that you can kick out coins from have not been copyrighted? Or little turtles whose shell you can grab to throw it back at them?


#4961124 physX info

Posted by Fredericvo on 19 July 2012 - 07:06 PM

I know what you're saying.
The Nvidia site seems to have suffered a hacker intrusion and I too can't find anything about physx there lately :-(




PARTNERS