Jump to content
Xtreme .Net Talk

EFileTahi-A

Avatar/Signature
  • Posts

    633
  • Joined

  • Last visited

Everything posted by EFileTahi-A

  1. Hey marble, I thank you again for your post. And, I'm glad there are persons here like you who are willing to help. About image bit reduction: I wanted to convet the pictures to 6/5 bit (64/32 colors) but Paint Shop Pro cannot handle such color depth. In fact I don't know if this can be done in BMP format. On Amiga OS I could convert the pictures from 8 to 7,6,5,4,3,2 and 1 bit color depth using amiga standard format IFF/ILBM. Anyway, PNG and GIF does seem to support such bit color depth. Say, did you tryed the program?
  2. About file formats: I just used BMPs because I did not wanted to convert them one by one, yet I was not sure if MakeTransparent prop would work with such formats as it did not worked with Tif format. I work with images for too long. I know what's best for compression/Quality. But thanks for the tips :) About croping images: The BMPs are compressed. They are in BMP with "Run Length Enconde" which basicly discars all the "blue color" region (wasted space). For instance compare these two pictures: 001_BaseWall_y0_x1.bmp (182x600) size: 112Kb 001_BaseWall_y0_x2.bmp (900X600) size: 114kb I also used some cropped images to see if GDI+ would finish the loop faster but, it seems it had no effect on performance. If you try to convert the two above pictures for PNG (for example) they will differ only about 3kb in size from each other (like 86kb to 89kb)... Take also in consideration that the pictures are all in 8bit (256 colors). THIS is what really reduces the size. Without "Run Length Enconde" and color decrease they were originally about 1.5MB each one. Not even PNG could lower them bellow 200kb; About image scaling: I know that small images = better performance, but I made them big to see how good could GDI+ handle such sizes in performance matters that is. All in all thaks for the post Marble :)
  3. Previously I opened a thread on how to create an EOB engine and, some ppl stated that it would be better to use recent technology such as DirectX to develop an EOB like graphic engine because it would be simplier. Well I believe that using plain GDI+ to draw images is simplier then setting up a 3D environment and EOB Replica prooves this. I started this project Friday (two days ago) and I finished it sunday afternoon (including the raytraced graphics). So I guess it was simple to acomplish ;) Use the following keys to move around the dungeon: 8 = move forward 5 = move backwords 4 = step left 6 = step right 7 = turn 90º left 9 = turn 90º right NOTE: I renamed the archives from .rar to .zip since Xtreme .NET Talk does not support .RAR. If you have any trouble with it simply rename the archive's extinsions to .rar. Feel free to post your comments. Debug.part1.zip Debug.part2.zip Debug.part3.zip
  4. Ok, I've finished the GDI+ replic of a graphic engine simulating the old Eye of The Beholder game! I will just kill the final bugs and add some wall variations to make it look nicier, before uploading the project. I'll upload the program today (22-01-2006). Note, the grapics were created by me using Cinema 4D, thus, THEY ARE legal. Screenshot http://img.photobucket.com/albums/v698/EFileTahi-A/EOB_Replic.jpg
  5. Ok the EOB engine is on the works... I will make both GDI+ and DirectX versions... Hopefully, I will finish the GDI+ version this weekend...
  6. Do you really think so? Do you think that rotating, scaling and posicionating a certain pciture would be much simpler and less time consuming then simply showing a certain picture? Rotating... Where? Certain degrees? How many degrees exactly? Where to be drawn at x,y? How much exactly should be scaled? Do you realise of how many times I would need to run the project until I get the bug-free formula? This is definately not for my brain... I do agree it would require less storage space by using this method but... The trabe off would be more cpu consuming... :confused: :confused: :confused:
  7. Yes Marble, you have the right ideia. If you want (for example) to add an ornamented wall you will have to render it in all visible angles. Same thing goes for the monsters you might want to add to the game, they shoud be rendered in all locations too. Alternatively, you could render the enemies using this method (which was used in EOB) resulting in less pictures by skiping redering the monster in side/angle views. Lets say you have a skeleton warrior. The skeleton should be rendered 1,2,3,4 and 5 blocks/cubes away in the middle of the screen to get a full straight view of them in four available directions, front, back, left side and right side. resulting in 20 pics to his graphic set (lets make 21 to include the attack picture too ;)). And yes the floor and celling should be the first things to be drawn as I though it would be as I described in my opening post. Say marble, you're showing much interest in this graphic engine, are you up to create something? Wanna start a party? Sometimes I kept thinking. How can be possible that there are projects made over internet by groups of ppl which are from most places of the world? I mean, I can't find no one with the will to form a group to acomplish something...
  8. Some adicional notes on my post, as marble_eater made me see some poinst of mine were not too much explicit. [1] - My bad, when I said comment everything I was not refering to comment every single line, but to keep on track what your code does. In other words comment everything you think might be confused for later paused re-visits. [2] - Keep in mind that collapsing funtions will be expanded next time you load your .NET application (at least in v1.1). This, (at least for me) is STRONGLY annoying to I see loads of functions/lines of code messing around with my eyes when I'm scrolling down through the code to focus on a X funtion. Like not Regions .NET will keep them collpased/expanded the way you let them by the time you exit .NET platafform. This is also great because you can easly know what was your last coding move by looking at the only expanded function. I always leave expanded the last function I was making/changing. [3] - No adicional notes to add here :) [4] - Just some side notes on this one. Continue variable could be controling a loop or if the player ran out of action points to continue with his turn. In other words, it could be bool or int type variable, bContinue or iContinue. Alternatively you could say WillContinue and EndPlayerTurn, but then again, try to "guess" which type of variable are both WillContinue and EndPlayerTurn. Int or bool? I could say EndPlayerTurn = 1 or EndPlayerTurn = true. All in all I also could do the following: bWillContinue and iEndPlayerTurn, using both logic names and iditifying its types. :) Just to finish, applying logic is slower then following rules. We immediately know that a bContinue variable is a bool by simply looking at the variable's starting letter, but, by looking at WillContinue I will have to understand the purpose of the funtion in which the variable is to know exactly what kind of value is need their. Of course this can be a vague explanation by having in count many other circustances/factors, but I think I got my point here. Now let me reforce Marble's opinion on "do what suits best for you". Persons should try all the ideias/methods post here and see what suits best for them or simply make their own methods as I did. :)
  9. How is data being cleared? Through a button or something? Could post the project or some of your code?
  10. LOL! Now you confused me! You mean they resized in both 1.1 and 2.0? I'm using 1.1 by the way.
  11. I see what you mean. Although the main purpose of the pack file thing is only for storage, not to constantly changing its contents, it's like when .NET compiles the hole project into a single executable file to be setup elsewhere, although in this way I don't want it to be executable but to store data only. Yet, I'm not worried about how easy it's contents can be unpacked by thirds.
  12. 1 - Add comments. (Large ones if you need to). 2 - Use #Regions in every function. 3 - Don't be afraid to use long object names. 4 - Identify the type of variables your declaring. On my current home project (a RPG maker, which most likely I will never finish it as I keep adding new fesatures to it, over and over) have a structure like this. [1] Add comments to every thing public class c_DirectX { public static Device dxDevice1 = null; //Draws on pnl_map public static Device dxDevice2 = null; //Draws on pnl_selected public static Device dxDevice3 = null; //Draws on pnl_graphics public static Texture texTemp; //Stores temporarely textures public static string sLayerText = "BOTTOM LAYER"; //Default layer text to be shown public static object oColorLayerText = Color.FromArgb(0,255,0); //Default text color public static object oColorLayerBackground = Color.Black; //Fixed color of the text shadow public const int ScreenWidth = 1024; //Default Horizontal screen size public const int ScreenHeight = 768; //Default Vertical screen size public static int iGMapXPos = 0; //Stores the X pos of the current selected tile in the Graphics panel public static int iGMapYPos = 0; //Stores the y pos of the current selected tile in the Graphics panel public static string[,] sArrGraphicsPanel = new string[1000,1000]; //private Texture spriteTexture; public static Texture texDX2; public static Texture[] texDeleteTile = new Texture[5]; //Stores cursor's delete pictures public static Texture[] texRegTile = new Texture[5]; //Stores cursor's registering pictures [2] Add regions to your functions http://img.photobucket.com/albums/v698/EFileTahi-A/Regions.jpg [3] Everyone keeps telling me to use short names for objects, but I don't. I totaly refuse to apply such method. I use large names instead. Most of the times I don't actually need to comment what I'm doing since the code itself is way too much explanatory. I rather take a few more seconds to write bigger names and have my code more explicit, then code faster and loosing plenty of time to figure out what was I trying to do weeks ago when I last touched the code. [4] This is what I do to identify the variables I declare; use string sName = ""; then string name = ""; use int iJoinDate = 0; then int joinDate = 0; use bool bContinue = false; then bool continue = false; use double dTotal = 0.0; then double total = 0.0; use string sArrMap[,] = new string[100,100] then string map[,] = new string[100,100] etc... I hope this helps
  13. Thank you. I will look into this, although I would prefer to have a C# example...
  14. You don't have to do nothing with the pictures except loading them ;). http://img.photobucket.com/albums/v698/EFileTahi-A/EOB_03.jpg http://img.photobucket.com/albums/v698/EFileTahi-A/EOB_02.jpg http://img.photobucket.com/albums/v698/EFileTahi-A/EOB_01.jpg It is all about showing the correct pictures. The blue area will be of course transparent, leaving only the right piece of graphic to be seen/used. You also don't need to reposicionate them as they will be already in the right place. You can build all the graphics using a 3D raytracing software like 3D studio or Cinema 4D. You simple create a few cubs in a row like 5 by 5 (depending of the visible range you want in the game) pattern and render each cube at the time using the same camera. There is no lighting system at all, those are only images... Monkey Island was a great game ;)
  15. Yeah I post it wrong, but you did it way worst... The game was running on amiga 320x256 and not 320x280 (my bad, I only noticed my mistake when you posted yours) nor 320x200 (skiping here the 320x400, 640x200 and 640x400 you mentioned has they are franquely non-accurate) because, Amiga 500 ONLY resolutions were (PAL) 320x256, 640x256 1280x256 and interlaced resolutions of 320x512, 640x512 and 1280x512. These resolutions were always standard to all Amiga models (1000, 500, 500+, 1500, 2000, 600, 1200, 3000, 3000T, 4000, 4000T, CD32 and CDTV). And yes you could force all these resolutions to NTSC by holding both mouse buttons during amiga reboot to gain access to its startup menu (but only for Amigas using kickstart v2.0 and above though, plain A500 did not had this ability, so no NTSC for it). Amiga was designed to be connected directly to a TV, that's why its builtin resolutions were something like 320x256, 640x512 etc... I will not mention Overscan nor Multisync resolutions as I don't recall them exactly, yet I'm not in mood to go to the bassment to reconnect my old 1200Tower with a PPCe+210mhz, 68060 50Mhz (dual CPU) plus Bvision 8MB video (Bvision recreated any VGA resolution (up to 2048x2048 by the way) so you could use any VGA monitor to plug the amiga in) ram plus 64MB of Fast Ram, Fast SCSI-II Device..., bla, bla, bla, just to post such info. Another thing about this phrase of yours: "So, if the game used 64 colors it ran at 320x200" I really don't understand this conclusion of yours. Why 64 colors have anything to do with 320x256? 64 colors where available on A500 in any resolution I meantioned above, AS LONG, you had at least 1MB of memory which was a TRULY common thing among A500 users. 98% of all existing amiga games are in 320x256 (which are a few thousands). Trying to lecture me on Amiga systems is definately not a "great" ideia. Hey, we all make mistakes... ;) "Also, Efile, get your friggin facts straight!" - Next time BE SURE of what you're going to say if want to correct someone else's comments with such authority. PS: You can always download Ultimate Amiga Emulator "UAE" to learn more about Amiga computer if you want to.
  16. But then I will have to unpack it first to get those files (right?). I was thinking of something like grouping the files only, with no compression. And this grouping process must be done with C# language. I mean, creating my own file format for grouping files. I don't know if I'm being explicit or not. Please do let me know about it.
  17. The game from the screenshot from the opening post is like 15 years old. and it's graphic engine does not use any 3D nor hardware aceleration (as we all know). Yet is was fast as hell. Ok it is 320X280 and used 64 colors but it was also running on 7MHz computer (Amiga500) I managed to talk to a guy who made a similar graphic engine, and the engine goes like this: You have an 3D array[,,] which holds: [x,x,0] -what is walkable and non-walkable (the map itself) represendted by 1 and 0 [x,x,1] - Type of graphic set do be used. We start by drawing both celling and ground (as I suspected this would be ;)) Then, it plays this formula to draw the respective graphics: Check the drawing range: ##### ##### ##### ##### ##### P Where "P" is the player current position and "#" represents the scanned area in front of the player. *1.11 11.11 ..... 11.11 11.11 P Now we know which area can be walked through. The "1" represent the walls and the "." the free path. We start drawing the graphics by comencing by the farest block "*". The selected block "*" is -2 and on horizontal position of -5 to vertical to the players "P" position, so we will draw the specific graphic from the selected graphic set named (forexample) m2_m5 (minus2_minus5). We loop this point untill all the range area have been scanned. All pics will have the same size, meaning that they should only show the right portion of the wall and rest of them MUST be transparent. Sorry, I'm kind in a hurry so I can explain this any better... Later!
  18. Ok, how can I create a data pack. You know, creating a file to hold all types of files (graphics, sounds, text files etc...) like Quake's .pak files. Any, yet, small information on this subject will be much apreciated. Thank you.
  19. Hi Joe, Unfortunately the Image List object is limited to 256 by 256 pixels.
  20. Hmmm... interesting. I used another method though. But yours sounds more professional and definately less resourse consuming then mine.
  21. Ok, nevermind... I made it :) Thank you PlausiblyDamp for the tip. - THREAD CLOSED -
  22. Ok, but how will I do that? I'm loading the images from file directly to the hash table: myHashTable.Add(sKeyImageName, Image.FromFile(sPath));
  23. How the Foxtrot can I release the Hashtable's associated resources? I load 30 large bmps which will "eat" about 45MB of ram. Then, If I reload them, an aditional 45MB will be consumed. So, basicaly, If I reload these pictures 5 times more the 200MB will be consumed, even with the myHasTable.Clear() property and the CollectGarbage before reloading these images... Also, the Hashtable don't have the "Dispose()" property... What the... This Hastable of mine is static so I would only like to dispose it's associated resources rather then disposing the object itself...
×
×
  • Create New...