I looked in system32 and the project directory, no lua dllsavansc wrote:in windows the exe will look for libraries in 2 places, unless otherwise specified in the code. first it will look in the local directory, then in system32 or whatever its called these days. id first go look to see if the dll is not in that directory either.GroundUpEngine wrote:Hmm, well if it works without the dll, then it must be statically linked by default. btw I'm just guessing
p.s. I prefer to statically link as many libraries I use as possible, so my program's directory isn't full with dll's however the file size is always alot larger.
mvEngine Development Thread
Moderator: Coders of Rage
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: Questions about loading maps and check out my new project!
Re: Questions about loading maps and check out my new project!
LUA!!!!!!!!!!11111111111111 but fucking rape youtube, then leave it on the corner like a dirty hooker
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: Questions about loading maps and check out my new project!
I HATE vector<object*> thingy!!!!!!eatcomics wrote:LUA!!!!!!!!!!11111111111111 but fucking rape youtube, then leave it on the corner like a dirty hooker
THIS IS WHY:
Code: Select all
thingy.push_back(new object);
delete thingy[0];
//DOESNT WORK!!!
Code: Select all
thingy.push_back(new object);
delete thingy[0];
thingy.erase(thingy.begin()+0); //I guess when you delete, it doesn't delete the pointer in the vector!!!!!
My engine IS LOADED WITH VECTORS!!!!!! SPECIFICALLY VECTOR<OBJECT*>THINGY's
Ahh, i feel better now
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: Questions about loading maps and check out my new project!
Yeah that's the same with all pointers. Don't forget a pointer is just a pointer, the memory it points to is allocated seperately.
Also wow, you don't waste any time. Nice videos keep it up :D
Also wow, you don't waste any time. Nice videos keep it up :D
- lotios611
- Chaos Rift Regular
- Posts: 160
- Joined: Sun Jun 14, 2009 12:05 pm
- Current Project: Game engine for the PC, PSP, and maybe more.
- Favorite Gaming Platforms: Gameboy Micro
- Programming Language of Choice: C++
Re: Questions about loading maps and check out my new project!
I'm having trouble running your engine on my computer. It says "Debug Error!" It seems that Allegro can't set the graphics driver.
"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: Questions about loading maps and check out my new project!
lotios611 wrote:I'm having trouble running your engine on my computer. It says "Debug Error!" It seems that Allegro can't set the graphics driver.
What's your screen resolution, i'v noticed that if the screen res of your computer is the same as the engine, it crashes cuz it tries to make a windows the same size as the screen. Plus, i haven't upoaded the new engine yet.
Engine res is 1024x768.
To make it smaller, edit the engine.mv file and change 1024 to whatever and 768 to whatever, same with the map editor.
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: Questions about loading maps and check out my new project!
I just thought i would share another FAIL of mine while deving.
Ok, so i found a bug in my inventory system. I made a heart that adds health when you use it but you cant use it if you have full heath. When ever i would use it, i would get a memory access error, so i just spent about 5 hours looking through all object pointer to see if i was forgetting to delete one(cuz their in vectors). As it turns out, the reason i was getting the error was this:
I was adding an integer to a POINTER!!!!!!
OMFG
Ok, so i found a bug in my inventory system. I made a heart that adds health when you use it but you cant use it if you have full heath. When ever i would use it, i would get a memory access error, so i just spent about 5 hours looking through all object pointer to see if i was forgetting to delete one(cuz their in vectors). As it turns out, the reason i was getting the error was this:
Code: Select all
int AddHealth(int h)
{
health+=h; //WRONG!!!
}
Code: Select all
*health+=h;
Re: Questions about loading maps and check out my new project!
Don't you just hate when you do stuff like that?
Re: Questions about loading maps and check out my new project!
Why is health a pointer?
- lotios611
- Chaos Rift Regular
- Posts: 160
- Joined: Sun Jun 14, 2009 12:05 pm
- Current Project: Game engine for the PC, PSP, and maybe more.
- Favorite Gaming Platforms: Gameboy Micro
- Programming Language of Choice: C++
Re: Questions about loading maps and check out my new project!
That was the problem. You might want to put that in the README. The only problem is that it's impossible to see the whole map when you change the resolution. That'll go away once you add tile scrolling (you are going to add that, aren't you?).mv2112 wrote:lotios611 wrote:I'm having trouble running your engine on my computer. It says "Debug Error!" It seems that Allegro can't set the graphics driver.
What's your screen resolution, i'v noticed that if the screen res of your computer is the same as the engine, it crashes cuz it tries to make a windows the same size as the screen. Plus, i haven't upoaded the new engine yet.
Engine res is 1024x768.
To make it smaller, edit the engine.mv file and change 1024 to whatever and 768 to whatever, same with the map editor.
"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: Questions about loading maps and check out my new project!
Because of my crappy OO design, to render the health bar, the map has a pointer to it.K-Bal wrote:Why is health a pointer?
Eventualylotios611 wrote:That was the problem. You might want to put that in the README. The only problem is that it's impossible to see the whole map when you change the resolution. That'll go away once you add tile scrolling (you are going to add that, aren't you?).mv2112 wrote:lotios611 wrote:I'm having trouble running your engine on my computer. It says "Debug Error!" It seems that Allegro can't set the graphics driver.
What's your screen resolution, i'v noticed that if the screen res of your computer is the same as the engine, it crashes cuz it tries to make a windows the same size as the screen. Plus, i haven't upoaded the new engine yet.
Engine res is 1024x768.
To make it smaller, edit the engine.mv file and change 1024 to whatever and 768 to whatever, same with the map editor.
Im probably going to redesign the item system first because it is HORRIBLE, i randomly get vector subscript out of ranges!
(Maybe even re-structure the entire engine)
My OO design is total garbage.
Does anyone have any tips on good OO design practices?
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Questions about loading maps and check out my new project!
Have a skim through this thread, it may help -> http://thechaosrift.com/viewtopic.php?f ... 999#p53934mv2112 wrote:Does anyone have any tips on good OO design practices?
Also could you describe your Engine structure? So we can see what might need improvement e.g.
Code: Select all
main.cpp // uses instance of engine class to power app/game
class Engine; // handles player & tiles
class Entity; // basic base for renderable's e.g. int x, int y, Init(string filename), Update(), Draw()
class Player : public Entity; // player class
class Tile : public Entity; // tile class
..etc
- mv2112
- Chaos Rift Junior
- Posts: 240
- Joined: Sat Feb 20, 2010 4:15 am
- Current Project: Java Tower Defence Game
- Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
- Programming Language of Choice: C/++, Java
- Location: /usr/home/mv2112
- Contact:
Re: Questions about loading maps and check out my new project!
ugh, as im looking through the source code, my engine really has no organized structure, lol, here are the classes:GroundUpEngine wrote:Have a skim through this thread, it may help -> http://thechaosrift.com/viewtopic.php?f ... 999#p53934mv2112 wrote:Does anyone have any tips on good OO design practices?
Also could you describe your Engine structure? So we can see what might need improvement e.g.Code: Select all
main.cpp // uses instance of engine class to power app/game class Engine; // handles player & tiles class Entity; // basic base for renderable's e.g. int x, int y, Init(string filename), Update(), Draw() class Player : public Entity; // player class class Tile : public Entity; // tile class ..etc
mvEngine: handles inistializaiton and final rendering(contains buffer)
map: map objects that handles loading the map and blitting to buffer
Sprite: started as a sprite class(hence the name) but ended up being a player class
ObjectController: handles all objects in the game
object: handles the properties of objects
heart:public object: different object
orb:public object: different object
//heart and orb are just test objects
inventory: player's inventory system
I think thats it.
One mistake i made was i had every object contain a pointer to the mvEngine rather than mvEngine contain all instances of classes.
I defiantly am going to restructure the engine and use std::vectors sparingly now.
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Questions about loading maps and check out my new project!
Cool structure is important, well sounds like you got it figured out