• Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About elle_lawliet

  • Rank
  1. Hi! I'm trying to load a .PNG image from the SD card (OS: android 2.2). It loads ok, but when I check the size, it's a little smaller than the original (the original size is 36x36 and the loaded is 27x27 bits, also looks smaller in the screen) This is what I'm using to load the image this.bmp = BitmapFactory.decodeResource(this.game.getResources(),this.id); if(bmp==null) System.out.println("Cannot load the image"); this.pixelsX = bmp.getWidth(); this.pixelsY = bmp.getHeight(); Also, if I load a 24x24 image, pixelsX & pixelsY get 18 each one. Is this somethig decodeResource do by itself? I need it to be the right size for each bitmap. Hope you can help me ;)
  2. Dialog and event programming

    I have just found a short tutorial that explains the basics about making c++ objects inside a Lua script. I will use that and the advices you gave me. I think I will wait for a short moment with a function and then continue the script execution. However, I think I will not wait until the player press a button becouse I want to make the dialog more dynamic. Thanks for your help =)
  3. Dialog and event programming

    Thanks for your answers. I understood I need a function to stop the scrip until the player press a button. I was thinking not to stop the game, to make the player pay attention. However, I'll keep that in mind. I have other questions, maybe because I don't know much about scripting: For example, I have a C++ class called Character. If I want a new Character, I call the constructor. If I want the Character to move, I call char->move();. If I want to draw the character, I call char->draw(); Do I need to access this Character class from the script, or do I need to create an object of this class inside the script (don't know if it's possible). Is this done in some other way that I don't know? I've looking information about scripting, but it's too general or incomplete.
  4. Dialog and event programming

    Hi! I'm making a 2D game with C++/DirectX 9 (I decided not to use a Game Engine). It's similar to old RPG games. I need to program the dialogs and events in the game. I've looking info and it says a good way to do this is using Script language Lua. I have a little knowledge about scripting, but my real question is: how do I implement this? for example: NPC 1 moves to NPC 2 NPC 1 says: "It's cold today" NPC 2 answers: "Yes" NPC 1 .... .... It's like a cinematic, you only see the character chating and moving until they finish. If you had an example of this, it would be great. If not, please explain to me how I can implement this in Lua. Also show messages, move a character and load scenario are implemented in C++ Thanks for your time.
  5. About 2D Engines

    [quote name='IceBreaker23' timestamp='1325614206' post='4899325'] [quote name='elle_lawliet' timestamp='1325526098' post='4898994'] @IceBreaker23 Thanks for the answer. The problem with 2/4 is that I have lots of items in the same scenario. Do I need to check the x-y axis of all items in oder to know which one I am picking? I do the colission detection with a DirectX function. [/quote] If you are testing 100 objects with one point you´ll need 100*4 int-compares(normally a bounding box does it). ( x1 >= x2 && y1 >= y2 && x1 <= x2+width && y1 <= y2+height) But why would you want to make 100 objects on a single screen? Furthermore a modern pc will handle this, I think. Keep in mind that you are only using 2D and this with c++, a really fast language. Modern 3D games do much more on the CPU in one frame. Hope I could help you! [/quote] Yes, all the information was helpful. Now I'm thinking to leave the engine for something more complex and to develop those functions by myself. However I'm going to download the engine, it will be useful in the future.
  6. Help with my Calculator

    If you want to do a Calculator function, you shoul have something like this [CODE] #include "stdafx.h" #include <iostream> #include <conio.h> #include <string> //#include "Header File.h" using namespace std; void Calculator() { cout <<"\n\nThis is a simple calculator"<< endl; cout <<"\nEnter the first number: " <<endl; double dNumb1; cin >> dNumb1; cout <<"\nEnter the proper mathmatical operation(+, -, /, or *); " << endl; char chOperation; cin >> chOperation; cout <<"\nEnter the second number: " << endl; double dNumb2; cin >> dNumb2; cout <<"\nAnswer: "; if (chOperation == '+') cout << dNumb1 <<" + "<< dNumb2 <<" = "<< dNumb1 + dNumb2 << endl; else if (chOperation == '-') cout << dNumb1 <<" - "<< dNumb2 <<" = "<< dNumb1 - dNumb2 << endl; else if (chOperation == '*') cout << dNumb1 <<" * "<< dNumb2 <<" = "<< dNumb1 * dNumb2 << endl; else if (chOperation == '/') cout << dNumb1 <<" / "<< dNumb2 <<" = "<< dNumb1 / dNumb2 << endl; else cout <<"You entered an invalid operation!"<< endl; } int main() { cout <<"Enter your name:\n"; string sName; cin >> sName; cout <<"\n\nNice to meet you, " << sName <<endl; Calculator(); cout <<"\nPress enter to quit this program....."; _getch(); return 0; } [/CODE] The code of the function must be outside of the main, and you call the function inside the main... Also you need to put "else if" at all the if of the function (exept the first). If you don't, you will see the "You entered an invalid operation!" every time you don't press the "/" Finally i don't know why you're adding that header file. I hope I haven't missunderstood the what you were doing.
  7. About 2D Engines

    I'm using DirectX becouse I'm still learning about it and I want to practice it. SDL seems easy to work with, I'll keep that in mind. I made a simple game in Allegro about a year ago, but I forgot almost everything about the syntax so I just have to learn it again. I'm going to start reading the tutorials of the engine you gave me, but also I want to discover if I can code the points 1 2 3 and 4 by my own (I think I will learn a lot if I do it).
  8. About 2D Engines

    I'm studying Software Engineering and we always use C++ or Java, so I have a long time programming with C++, but we usually don't use it for game programming. The only games I have done are simple games like a multiplayer tetris, and other games with bitmaps. I want my game to be something like this (but obiously, different) [media]http://www.youtube.com/watch?v=JpnArvfuxIk[/media] Is the Irrlicht Engine good for that king of game? I don't know if it's ok to post videos. If not, please let me know
  9. About 2D Engines

    Thanks for the answer! I've found 2 or 3 useful engines, but they hadn't documentation. I will use C++ with DirectX 9.0. In the game you will have to solve puzzles in rooms (like Resident Evil 1, but the view is from above the character and it's not 3D) and it will not have any battle/combat. Edit @IceBreaker23 Thanks for the answer. The problem with 2/4 is that I have lots of items in the same scenario. Do I need to check the x-y axis of all items in oder to know which one I am picking? I do the colission detection with a DirectX function.
  10. About 2D Engines

    Hi! I want to make a 2D game and I can't completly understand the concept of "game engine". So, the questions are: If I use a 2D game Engine -Can I know if a character is in front of an item without a lot of programming? -Can I know if a character in front of a hole (and can't keep walking)? -Can I change a room ilumination? -Can I know if a character has passed through a door and I have to change the scenario? Basically, are those things something that an engine could resolve? Do I need to code them? I want to learn more about game engines but I couldn't answer those questions with the info I found. Also, please tell me if you know about a free 2D game engine with DirectX9 support and complete documentation. Thanks for your time [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]