|
|
| Who Needs Direction? |
|
Don Freeman
Member #5,110
October 2004
|
Quote:
So I've been thinking of adding a check that makes sure the script hasn't sent a bad pointer. This could be costly though, any ideas on how this should be done?
To Trezker: I think I fix the first problem I was having, but now I get: Init.lua:6: attempt to perform arithmetic on global 'x' (a function value) [Init.lua] player = Get_player(game) x = Player_get_x_position(player) y = Player_get_y_position(player) print(x) print(y) Player_set_position(x+10,y+100) [/Init.lua] [main.cpp]
[/main.cpp] Don't mean to hijack thread...just want to learn this LUA so I can help...:D -- |
|
Erin Maus
Member #7,537
July 2006
|
Trezker said: This could be costly though, any ideas on how this should be done? To do so, give the pointer (a.k.a. userdata) a metatable that's stored in the registry. Then, before executing commands, check to make sure that the provided userdata has the correct metatable. As long as the user doesn't use the debug library (you can just open the libraries manually and only have the debug library in debug mode) to change the userdata's metatable, all will be fine and dandy. Example code is like so (not tested):
Of course, you'll need to use "heavy" userdata, and not that light pointer stuff. This will ensure that, unless the user does something stupid (like below) in the Lua script, everything will operate correctly and there is no way a normal modder/whatever can cause the game to crash. debug.setmetatable(Something_create(0, 0), debug.getregistry().Entity) I hope this helps! --- |
|
Trezker
Member #1,739
December 2001
|
Well, that is rather cryptic technobabble, and lots of pointers... And I need three things. Create_entity - function that creates an entity in C++, puts it in the entity manager and returns a handle to the new entity. Destroy_entity - function that removes an entity from entity manager, this is quite safe as it is... various interaction functions - needs to be able to tell if the handle sent from lua is an entity that exists in the entity manager. The simplest way to solve the problem would be to just ask the manager if the pointer is in the managers entity container using a std::find. I'm just wondering if that'd risk being way too slow. |
|
Don Freeman
Member #5,110
October 2004
|
Unless we load all scripts that we need at once (not to run-just check), process to see if they are correct, if not we abort...if so we can continue with the game.8-) -- |
|
Paul Pridham
Member #250
April 2000
|
Matt (et al.), here is the bulk of the speech synth stuff I have collected, as promised. Some of your strange animated mouth project is in there with my original Speechy stuff, as well as a bunch of datasheets, allophones, various text-to-speech code, formant synthesizer code, and others. Most of it is public domain. Enjoy! ---- |
|
23yrold3yrold
Member #1,134
March 2001
|
Ooooh, actual work has been done! Debugging and testing! Didn't even occur to me we were far enough along to warrant that! Yay! In other news, my tilemap editor sure slows the crap down if you load a decent sized tilemap image into it. -- |
|
Neil Black
Member #7,867
October 2006
|
By the way, I'm still here when you guys need playtesters.
|
|
Don Freeman
Member #5,110
October 2004
|
I've noticed strange behavior with the animations...like it is "off" by 1-2 pixels in the width of the images or that the bitmaps are not being cleared to a mask color before being loaded with animation data that does not completely fill the bitmap. Also, I get a segment fault every time I run the program and exit. Doesn't matter if I am just in the menu, or actually in the game. I've noticed problems with the menu code for the keyboard section. You can move up and down the menu, but sometimes the menu goes psycho and "loses" it's start and end positions. I will look at the code later...8-) Also, I've got a TON (over 150MB) of weapon sounds in ogg format...very high quality. These are hand guns, rifles, machine guns, explosions, rockets, etc. Someone just let me know what ya want, or if I get SVN write access...it will be included in my branch.::) -- |
|
MiquelFire
Member #3,110
January 2003
|
Wow, it will suck when you upload that, and when others download your branch for the first time. --- |
|
Don Freeman
Member #5,110
October 2004
|
I don't HAVE to upload all that...someone could just request what they want to include...::) -- |
|
bamccaig
Member #7,536
July 2006
|
Yeah, could always post it elsewhere and let the team figure out which files they do want... Or if MiquelFire can spare 150MB, you could upload them into a separate wpnsndfx branch, and files could be fetched from it with svn export.
-- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
Don Freeman
Member #5,110
October 2004
|
I have another group that is only about 3mb in rar format...I'll just include it. It has a lot of sounds in it...8-) Almost forgot about it! Also, found some old civil defense posters...like fallout shelter info, etc. Government issue, so is public domain.;D -- |
|
MiquelFire
Member #3,110
January 2003
|
I made a folder you can put stuff like that in the repo. I won't mind the occasional 150MB or so file actually. Just big really big file in that one directory to not hurt those on slow connections (including slow DSL). --- |
|
Don Freeman
Member #5,110
October 2004
|
I've uploaded the smaller one (3mb) and some posters from old civil defense. I think I am doing something wrong...it was included in the trunk...not MY branch! -- |
|
bamccaig
Member #7,536
July 2006
|
Don Freeman said:
I think I am doing something wrong...it was included in the trunk...not MY branch! When you checkout a repository path a working copy is created on your machine that represents the repository structure. You need to put things in your working copy path exactly where you want them to be in the repository. For example, if you have checked out the repository to ~/src/monday, and you wanted to add your files to ~/src/monday/rawdata/wpnsndfx you might... cd ~/src/monday/rawdata svn mkdir wpnsndfx cp ~/mywpnsndfiles/*.ogg wpnsndfx svn add wpnsndfx/* Before committing to the repository, you should always check the output of svn status (kdesvn surely has this somewhere), which will tell you which files have been added, modified, or deleted; or are unversioned. This way you can review your structural changes before committing them. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
MiquelFire
Member #3,110
January 2003
|
There's a move command that changes where your working copy is pointed to. --- |
|
Don Freeman
Member #5,110
October 2004
|
Quote: When you checkout a repository path a working copy is created on your machine that represents the repository structure. You need to put things in your working copy path exactly where you want them to be in the repository.
I DO have the structure layed out correctly...or at least I thought so. The Monday Project/monday/branches/donald/Monday: [include] [media] My Branch Notes.txt [obj] [Release] [src] Story.html Weapons.html [wip_media] I think kdesvn screwed something up with the structure...??? When I first started, I just checked out the SVN state as it was, created a branch called donald, and created EVERYTHING in that folder ONLY! -- |
|
bamccaig
Member #7,536
July 2006
|
MiquelFire said: There's a move command that changes where your working copy is pointed to. svn switch
To find out information about a local or remote item you use the svn info command. From inside a working copy directory, with no arguments, it should tell you the remote URL of the directory. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
Don Freeman
Member #5,110
October 2004
|
MiquelFire: Edit: Edit2: -- |
|
Trezker
Member #1,739
December 2001
|
I see there's a ton of files in your branch under wip_media. If you merge, these files will end up in wip_media in the trunk... The wip_media folder really shouldn't be under trunk or under a branch. |
|
Don Freeman
Member #5,110
October 2004
|
I've got the stuff uploaded... also, I noticed (and fixed) the code in the keyboard menu that was causing the fuc@ ups I was having. The corrected code is: switch (event.keyboard.keycode) { case ALLEGRO_KEY_UP: option--; if (option<0) option=3; break; case ALLEGRO_KEY_DOWN: option++; if (option>3) option=0; break; I can't seem to actually PLAY the game...I get the main_menu_option = 0, but nothing happens. I can go into the other menus fine... We need to fix the problem of the game exiting when you are backing out of the key/joystick configuration...it SHOULD just go back to the main menu.8-) Also...I still get the segment fault EVERY time I run it...no matter what!:( -- |
|
bamccaig
Member #7,536
July 2006
|
Trezker said: The wip_media folder really shouldn't be under trunk or under a branch. It would be fine in a dedicated branch, but not in one where project development is going on. I think that's why MiquelFire created /rawdata. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
Matt Smith
Member #783
November 2000
|
Sorry if anyone thinks the new /ma5king dir is intrusive. Apart from revision numbers it won't interfere with us in any way. It was the quickest way to get ma5king into SVN and it would be great to use for all the GUI, even the ingame stuff. |
|
Don Freeman
Member #5,110
October 2004
|
Fine with me... Argh, Back to work maities!:D -- |
|
OnlineCop
Member #7,919
October 2006
|
With everyone working on slightly different things in their own branches, is everything in the "trunk" considered to be the "stable branch" that we can/should help out with bug fixes? For example, trunk/src/Character.cpp, line 28 is: If we find things like this, is it safe to assume that we should go ahead and fix it?
|
|
|
|