
EFileTahi-A
Avatar/Signature-
Posts
633 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by EFileTahi-A
-
Ok then. PS: Discard my last private message. I just made it. I came here to let you know this. I found another site which explained the whole thing step by step. I can now automatically get a realistic temperature in Kelvin of a given planet next to any star.
-
Thank you very much! What would I do without you? :D
-
Snarfblam I have the non-smooth animation problem you described in my game. I'm using Invalidate() as you described. I was going to dedicate myself over this issue at the end of the project but since you mentioned it... Does the Update work with Overrided Paint events? Because Update() is not triggering it.
-
You can draw circles using GDI+. No need to load images. Maybe this will help: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace BackinBlack { public partial class Form1 : Form { //Initializes the circle position at x100 and y100 Point ptCirclePos = new Point(100,100); System.Windows.Forms.Timer tmrTimer = new Timer(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { //I'm using a timer programatically. Feel free to use one through the control panel. this.tmrTimer.Interval = 1; this.tmrTimer.Tick += new EventHandler(tmrTimer_Tick); this.tmrTimer.Enabled = true; } private void Form1_Paint(object sender, PaintEventArgs e) { /*We use the form itself as the painting object for the GDI+ output*/ //Sets the quality of GDI+ to antialias e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; //We first clear the form to a black color e.Graphics.Clear(Color.Black); //Now we draw a circle with the size of 75 pixels width and height //We draw it using the ptCirclePos point coordinates e.Graphics.FillEllipse(Brushes.Yellow, ptCirclePos.X, ptCirclePos.Y, 75, 75); } private void tmrTimer_Tick(object sender, EventArgs e) { //We increase the X coordinate of the ptCirclePos ptCirclePos.X += 1; //The line bellow forces the application to refresh itself, triggering the Form1_Paint() event. this.Invalidate(); } } } Simply copy and paste this code over the code of a new windows-form-type-project. You will have a problem though, moving it every 1milisecond. .NET built in timers are not that precise. The StopWatch() should be used instead as it is far more precise than Form.Timer(). Don't forget to set you form's DoubleBuffered parameter to true to avoid flickering!
-
How can I transform this number (Stefan-Boltzmann constant): 5.6704 x 10-8. to a C# compatible number? :confused: Is it 5.6704E-8?
-
I'm not quite sure what are you trying to accomplish. Whatever it is, I'm sure it can be done with GDI+. While GDI+ is not known for its speed it is ideal simple animations, plus, it is also VERY easy to use. Are you familiar with GDI+?
-
I don't know how many projects you have in your database but I advise you to reduce their count so you can put a lot more effort in a single one. If you need help in game design or ideas drop me a line (assuming your projects are games).
-
Hi joe Pool, I'm not quite sure of what you meant :confused:. Was that a compliment?
-
Sorry for the late response. It has been crazy at my job handling nearly 100 teachers to use my software to plot all their student's scores. Regarding "our" project :D. It does have strong RPG elements in it with customizable ships and equipment for the following types of space ships: - Frigate - Battle Frigate - Destroyer - Light Cruiser - Heavy Cruiser - Small Freighter - Large Freighter - Battle Freighter - Battleship - Dreadnought - Capitalship Have you ever player Elite? Frontier (Elite II)? First Encounters? Well this project is strongly inspired in such game. Ships have jump drives to travel between solar systems. Although Elite was a 3D game this project will be strictly 2D. I'm replacing the cool 3D aspect of it by a even cooler 2D Game play mechanics. The game play: You will cruise through the thousands of stars which compose the galaxy. You will be able to trade, go freelancer, run missions (quests), join the military for several factions or simply travel by your own for fortune and glory without any predefine path. The above is similar to the original game Elite. What I've changed was the combat and the possibilities of equipping your ship, adding also heavy tactical / strategic turn based combats. But I'm not talking about a top-down / isometric view with a grid-map where you move your ship and fire by turns. No no, the action will consist of a screen split in half. One half for each faction, you and the enemy. Action points is what will decide the faith of both factions during combat. Here are some possibilities: - Shields up / down (if any) - Transfer energy between shields. For example, transfer energy from the rear to the front shields so that armor remains protected. - Charge weapons. - Fire weapons and missiles - Canalize energy between equipment. - Order crew to battle stations. - Order crew to repair pretty much anything on the ship. - Order crew to replace equipment (if you brought spare ones). - Order crew to put out fires. - Order crew to escape pods. - Manage the wounded. - Evasive actions. - Increase decrease speed (the faster the ship is traveling the harder the enemy will hit it but also more power will be consumed at the end of the turn.) - Approach enemy vessel. - Board enemy vessel. - Jump away (escape). It take a few turns. If the enemy ship has a jump disruptor you might not be able to escape at all. - Bring equipment ON / OFF line. This will critically affect the amount of energy the ship will have available for the next turn. Probably the most important aspect of the ship is the power it generates. Power cores are the life of a ship. Without energy the ship is a dead rock. Power cores, like pretty much all sort of equipment have many variants and models. Energy is produced at the begin of your round. You spend it by charging weapons / shields and on repairs. Its a good a idea to leave some energy at the end of your turn for your defense phase so that the weapons you charged but you didn't fire may try to destroy enemy missiles and other hazards. Ships have a certain number of slots for weapons and equipment with specific sizes. For example frigates, battle frigates and destroyer use small size slots while cruisers and battle cruisers use medium size slots. Well, there is too much to tell. Now I will tell you something which probably you won't appreciate at all. The game is being done using only GDI+. Why? It's so easy to work with and makes it go cross-platform. There is no great need for speed. It does at the moment an average of 40 fps at 1920x1200. Thought I think I will limit it to 20fps so it can run stable in slower computers. The project is still being crafted so I can change anything you want. I'm quite serious about this one. If you want I can add some screen shots of what is done at the moment. :)
-
No, the problem is definitely not yours. Its my poor math skills that didn't get me to see your explanation. I payed more attention now and I actually understood how the whole think works. I must also confess that I got too much excited with the code you posted which got most of my attention. Anyway, I got the (Math.Pow(Value, (1.0 / 3.0)) expression to cubic root it. This is awesome as I will also require different magnitudes of arcs I simply need to replace the 3.0 for a different value. Just for to let you know this is for a exploration-space-game I'm developing which generates a galaxy on the fly. It creates stars based on astrophysics real info. Each solar system will have their own planets, asteroids, comets etc. Planets will have their own atmosphere, type of terrain and resources based on their distance from their stars and size. Since I'm using our solar system as a model, planets are most likely to appear closer to stars and more likely to have lower eccentricities on their orbits, hence the non-uniform random function. At the moment the game already generates a full spiral galaxy with stars. Now I just need to populate the solar systems with celestial bodies. We can already travel around the galaxy and watch all stars and their designated names. I have great plans for this project :) (\me imagines snarfblam asking about that project of his) :D
-
I have absolutely no words for you top notch post. Thanks to your time and effort I can finally resume my work! I already tried your algorithm and it works like a charm! This produces the line random chance I described in my first post. Just wondering, is it too difficult to implement the curve random chance? If it is complicated forget it, this will fit quite well for what I intend to achieve. Thanks again! PS: did you read my private message? :)
-
I assume you talking about Data Grids and that you already tried .NET's DataGridView. Though this grid is not that fast it achieves good results when using just a few columns. In case you just want to display an empty grid, well, GDI will definitely be the way to go as suggested by Napivo1972.
-
Regarding your last post: If I understood correctly, you want to click in a picture box and retrieve its relative mouse position (x,y coordinates). Then you want to know if that position matches or intersects with an object that might already be there? If this is the case than you need to keep tracking of all that you draw or that is present within the picture box. What I suggest is creating a class say 'class_gfxObject' or an HashTable to hold all the information regarding each graphical object. Use these objects to store rectangles, lines, bitmaps etc. The final step is looping through all items resident in these objects and see if the designated mouse position intersects with the coordinates of these objects.
-
What would be the best approach to generate a random number that does NOT have the same equal chance of coming up. Although I would prefer an arc, a line would also fit for the job. Arc: ---- 0 # ## ### #### 50 ##### ######## ########### ################# 100 ######################## Line: ----- 0 # #### ####### ########## 50 ############# ################ ################### ###################### 100 ######################### So the above example tells the chance of randomizing a number between 0 to 100, where the more '#' equals a better chance of scoring. I could manually script the chances values inside an array or similar object but the numbers can be decimal and contain a real astronomic difference between the minimum and maximum values. Help? :)
-
open multiple forms in PANEL .. C SHARP .net
EFileTahi-A replied to sumair_coolboy's topic in General
An alternative: you could set your application's main form to be a MDI container, where your main form houses all other MDI child forms. Pretty much like a traditional image processor (Photo Shop) if you don't know what I'm talking about. By using this you could easily open / close and set the position of all windows through the buttons you described. http://msdn.microsoft.com/en-us/library/d4dabts7%28v=vs.80%29.aspx -
I'm currently using GDI+ for my application. GDI+ Is so easy to use! Too bad its performance is not even moderately as good as its simplicity... I need a solution to draw images, rectangles and text fast and clean, but it must also be cross-plattaform, I believe this leaves me only with OpenGL. I know that there are a few OpenGL wrappers for .NET but I don't know about their performance and simplicity. Does anyone know about one that is easy to use and fast enough to be used in 2D ONLY?! Thank you!
-
I have this .exe running in the background but I need it to be closed whenever a user switches account (instead logging off) and restarted when the user re-logs in it. If 2 users log in but do not close their accounts I end up having 2 .exe running at the same time which is quite problematic. Any suggestions in how to walk around this? Thank you.
-
th ratherSimple question (wi hard to find answer though)
EFileTahi-A replied to EFileTahi-A's topic in General
I just read this: "Caution note Caution Future versions of Visual Studio will not include the Visual Studio Installer project templates. To preserve existing customer investments in Visual Studio Installer projects, Microsoft will continue to support the Visual Studio Installer projects that shipped with Visual Studio 2010 per the product life-cycle strategy. For more information, see Expanded Microsoft Support Lifecycle Policy for Business & Development Products." Now everything is explained... In case anyone was still wondering, well, wonder no more. -
th ratherSimple question (wi hard to find answer though)
EFileTahi-A replied to EFileTahi-A's topic in General
"This Trial Edition is fully functional but will expire after 90 days. This trial software is not supported by Customer Services and Support (CSS)" This is the only limitation I read. So either there is something wrong with the demo or VS 2010 Professional version left out the MSI deployment feature... -
th ratherSimple question (wi hard to find answer though)
EFileTahi-A replied to EFileTahi-A's topic in General
Yeah, that's what I thought... Do you have any idea why the professional edition I had just installed (trial) has no items in the Setup and Deployment project category? -
Simple question (with a rather hard to find answer though) Which versions of Visual Studio 2010 has the ability to deploy .MSI setups? I know the Express version is unable to and it seems the professional edition is also unable (as it Deploy and Setup project category is empty). Thank you (with some urgency).
-
How to change ContextMenuStrip Highlight color
EFileTahi-A posted a topic in Graphics and Multimedia
How to change ContextMenuStrip Highlight color? We can change the background and foreground colors but not the selection background and foreground colors... so what's the point? Any ideia? It would be great if VS .NET controls were more flexible graphically... -
It might be simple what you did, but the truth is that not one else managed to help me (I post this problem of mine also at other forums). Consider yourself added to my credit list. Thank you once more.
-
Thank you! Your example was simple awesome! Do you mind I add your name / nickname to my credit list? If so, what name should I include. Thank you again! And please, post back.