Search found 54 matches
- Tue Jun 29, 2010 4:15 pm
- Forum: Programming Discussion
- Topic: Help: Overloading a function from C++ in Lua using LuaBind
- Replies: 7
- Views: 1340
Help: Overloading a function from C++ in Lua using LuaBind
I am implementing Lua in my engine, so now I am doing so items can be loaded from lua into the game. What im having problem is that it seems like i cant overload my class specific functions in lua. thi is my item struct: struct item { string name; //name of the item bool hasOwner; player* Owner; //o...
- Sun Jun 27, 2010 12:32 pm
- Forum: Programming Discussion
- Topic: My automatic class wrapper for luabind thing
- Replies: 0
- Views: 1669
My automatic class wrapper for luabind thing
I made a program that can make lua wrap code to wrap classes for luabind, it asks you for what the lua state is named and the class and its functions and variables. I figured someone might want to use it to port their own classes to lua, it saves the code to a text file that you just copy. The sourc...
- Tue Jun 15, 2010 2:05 pm
- Forum: Programming Discussion
- Topic: Pythagoras theorem for colission detection between squares
- Replies: 7
- Views: 1015
Re: Pythagoras theorem for colission detection between squares
that seems nice i should probably check this AABB out, thx :Davansc wrote:If you want to to simple AABB rect collision you can make it about half as simple if you ad the width and heigh of one rect to another(with the appropriate half offsets), then it just becomes a point in rect test.
- Tue Jun 15, 2010 2:03 pm
- Forum: Programming Discussion
- Topic: Pythagoras theorem for colission detection between squares
- Replies: 7
- Views: 1015
Re: Pythagoras theorem for colission detection between squares
So you are saying i should use normal collision detection for squares? Yeah I probably should, but i want to see if its possible with this, and if so then i could probably use it with rotating squares too. Im just interested in if something like this is possible, not for what i should use but tnx a...
- Sun Jun 13, 2010 7:01 am
- Forum: Programming Discussion
- Topic: Pythagoras theorem for colission detection between squares
- Replies: 7
- Views: 1015
Re: Pythagoras theorem for colission detection between squares
So you are saying i should use normal collision detection for squares? Yeah I probably should, but i want to see if its possible with this, and if so then i could probably use it with rotating squares too. Im just interested in if something like this is possible, not for what i should use but tnx an...
- Sat Jun 12, 2010 6:59 pm
- Forum: Programming Discussion
- Topic: Pythagoras theorem for colission detection between squares
- Replies: 7
- Views: 1015
Pythagoras theorem for colission detection between squares
Well, this might be more of a math problem but still... I recently found out that i could easily check the distance between two objects using pythagoras theorem :P, so i used it for colission detection, it works great for circles and that but, when for example i want to check the colission between w...
- Sat Apr 24, 2010 10:54 am
- Forum: General/Off-Topic
- Topic: Official Forum Profile
- Replies: 163
- Views: 134397
Re: Official Forum Profile
Name: no Username: yes, Zer0XoL || ZerX0r Age: 17 Birthday: 93 02 04 Sex: yes,plz Favorite Console: N64, GBA Favorite Type of Game: Adventure / Adventure Puzzle / Adventure RPGs Favorite 3 Games: The Legened of Zelda Ocarina of Time, Ristar, Bioshock Favorite Color: Blue Favorite Food: Depends, Tach...
- Sat Apr 24, 2010 3:07 am
- Forum: Programming Discussion
- Topic: PLEASE!! Tile map collision help!!! ( C++/SDL )
- Replies: 12
- Views: 2259
Re: PLEASE!! Tile map collision help!!! ( C++/SDL )
you are passing references which meybe is the same object that you are just changing...
try using new like this:
CreateTile(new tile);
i hope it helps
try using new like this:
CreateTile(new tile);
i hope it helps
- Sun Mar 28, 2010 7:13 am
- Forum: Programming Discussion
- Topic: Simple question
- Replies: 11
- Views: 855
Re: Simple question
Yes, you might want to look into spritesheets and SDL_Rect s. Yes, ofc i know what that is and how to use it, its just i ask how to keep it somewhat structured as tiles and still have it animated.. hmm You would just create another class eg. animatedTile and have code very similar to your sprite an...
- Sat Mar 27, 2010 4:02 pm
- Forum: Programming Discussion
- Topic: Simple question
- Replies: 11
- Views: 855
Re: Simple question
Yes, ofc i know what that is and how to use it, its just i ask how to keep it somewhat structured as tiles and still have it animated.. hmmxiphirx wrote:Yes, you might want to look into spritesheets and SDL_Rect s.
- Sat Mar 27, 2010 10:19 am
- Forum: Programming Discussion
- Topic: Simple question
- Replies: 11
- Views: 855
Re: Simple question
Did you get this idea from quake? Like others have said, I would only use it for stuff that is active (moving etc). a sample class would be /* UNTESTED CODE, PROBABLY REALLY CRAPPY STUFF D: */ class Entity { public: Entity(SDL_Surface* image); Entity(); ~Entity(); void move(float nvx, float nvy); p...
- Sat Mar 20, 2010 11:58 am
- Forum: Programming Discussion
- Topic: Simple question
- Replies: 11
- Views: 855
Simple question
is it good if i make every object and things inherit from the class entity( wich i made) and then make a vector of entity pointers and have all my game objects in that vector, so it would be easier to check collision and things? what is good and what i bad about this and can it be done in a better w...
- Thu Mar 18, 2010 3:24 pm
- Forum: General Gaming
- Topic: Avatar Showdown
- Replies: 23
- Views: 5046
Re: Avatar Showdown
Sue them.
- Thu Mar 18, 2010 3:11 pm
- Forum: Art, Music, and Design
- Topic: -My Game Idea-
- Replies: 29
- Views: 6673
Re: -My Game Idea-
Sounds like Counter-Strike, in 2D~! lol, Yea... if this is your goal, it's great! If you are planning on doing it in the summer, or any date other then the next few years,it's not for you... (assuming you are a beginner) Anyway... good luck with that. There is only one problem here, and it is, no o...
- Wed Mar 10, 2010 9:12 am
- Forum: Current Events and Science/Technology
- Topic: Steam on Mac!
- Replies: 12
- Views: 2554
Re: Steam on Mac!
Why mac? Why not Linux, i know the linux guys has been wanting it very much, including me. I hope they eventually port it to linux after the mac ports.. or else :twisted: I assume that most companies don't bother making a port to linux because it's linux . Linux is about free and open software (aft...