• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Askr

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

117 Neutral

About Askr

  • Rank
    Member
  1. Many people claim Unity to be slow under certain conditions (like using physics excessively), but it's probably still your best bet until you've got something more serious going on you're willing to pay a substantial amount for.
  2. Yeah, Kerbal Space Program is also quite playable already with career mode/science. Also the physics are way more realistic than in Space Engineers. :)
  3. [quote name='BCullis' timestamp='1355495228' post='5010616'] Try replacing [CODE]myButton.Click += new Action(myButton_Click);[/CODE] with [CODE]myButton.Click += myButton_Click;[/CODE] or [CODE]myButton.Click += () => {Console.Write("foo");};[/CODE] From what I can tell in the MSDN article, the constructor format of Action doesn't do what you're thinking it does. I'll gladly take some correction on that if I didn't search deep enough though. [/quote] Sorry, this doesn't work. It doesn't even compile due to syntax errors. [quote name='Khaiy' timestamp='1355538855' post='5010820'] I would track the mouse position and whether or not it's been clicked in the Window class, and then if the position of the cursor is inside of myButton when a click is dispatched call myButton.OnClick(). [/quote] That was my thought as well. Since you already made a GUI: How did you listen for the mouse? Did you add an own class for this or where did you put it?
  4. Sorry for being absent from this topic so long, but I came around testing all your input just now. :] Everything compiles well enough and I'm almost positive I didn't write anything too stupid, but somehow it just doesn't work. Let me paste some code and tell you what it does (and more importantly, what it does not): This is from my Program.cs - I spared out the parts I don't consider interesting (FillColor and the like). [CODE] Window myWindow = new Window(50, 50, 400, 200); Button myButton = new Button(0, 0, 150, 25); myButton.setFillColor(new Color(255, 0, 0)); myButton.Click += new Action(myButton_Click); myWindow.Add(myButton); myWindow.Draw(); while (MainWindow.IsOpen()) { MainWindow.DispatchEvents(); MainWindow.Display(); } [...] static void myButton_Click() { Console.Write("foo"); } [/CODE] This is my button class [code] public event Action Click; protected virtual void OnClick() { if (Click != null) Click(); } public Button(int x, int y, int w, int h) { this.X = x; this.Y = y; this.Width = w; this.Height = h; } [/code] When I run the program the window with a button inside of it pops up, but wherever I click, the corresponding method just isn't called. It came to me that I don't have anything defined yet that does any mouse handling, so I figured I have to do this first. Here however I'm at a loss again. :/ Right now I have this Class called "GuiItem" from which "Button" and "Window" inheret. Should I add MouseEventHandlers for keeping track of the mouse in there, or rather create something new?
  5. [quote]Gtk# is being used in games as well as other programs.[/quote] Is that so? I figured from a quick overview that it was not. Then I shall look into it some more.
  6. Wow, thanks guys! That's certainly some interesting stuff to work through. @NightCreature83 Thanks for explaining, I think I got it now! If I understood correctly delegates might be exactly what I've been looking for. @Khaiy [quote]I've put together a GUI using SFML 2.0 and C#, so if you'd like more information on what I did (which is functional, if inelegant) let me know.[/quote] Sure thing, hit me up with anything you got. I'd love to see how you did it. [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] @Nypyren [quote]// Standard form button.Click += FunctionName;[/quote] I always did stuff like this. The first time I heard of lambda expressions was from your post and although I read the msdn article about lambda expressions by now I'm still a bit lost. You say I could use any of those forms, but do the prior ones do anything [i]better[/i] than the standard form? @3Ddreamer Thanks for those links, but I was referring to GUIs in games. Although Gtk# looks promising I don't think I could find a use for it within my current project. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  7. Thanks for your fast reply. Although I don't quite understand how I can achieve the wanted functionality using delegates. :| Would you mind elaborating your solution some more?
  8. Hey there, so I've been trying to come up with a GUI (using SFML2.0 and C#) and while it's not really a problem to draw stuff onto the screen (or even checking if the mouse is above a button or if the button is clicked), I can't come up with an idea of how to make the buttons functional. I want to have a class called "Button" with a Property "ButtonFunction". So when I create a button I can also associate an action to be triggered, when I click the button. Can anyone give me a kickstart here? I'd also appreciate any other information regarding creating a useful custom GUI. Thanks in advance!
  9. Thanks everyone for their answers. [quote]Many of this real-time games are server based. That is you have a server running the simulation all the time while the user can interact over a (web-)client with your game.[/quote] That's way out of scale regarding the simplicity of the game I want to create, though. [quote]The problem of simulating the gap, when starting a new game, can be solved by introducing several simulation layers. I.e when dealing with a village and the players did not play for a whole year, you don't need to simulate every single step of your peasants for one year. Start with a hi-level simulation (fred the peasant died this year, larry has been born recently) and go down once you reach the end, i.e. start a physics simulation of every npcs for the last several minutes.[/quote] That's quite an interesting thought, although it also sounds like a lot of work, or at least planning. I'll definitely be looking into it, so thanks for that input. [quote]Just ignore it, if you have a single player environment. If someone want to cheat, let him cheat.[/quote] Well, you're probably right about that. [quote]You need to seperate the simulation from the presentation and need to turn off everything which is only there to communicate the current state of your world to the player (audio,visuals).[/quote] You're of course right here. I shouldn't have put "sound" in there though, but explained what I meant with "events". I was thinking about choices the player could make if he was actually available on day X of the simulation, that would affect the simulation after day X. I'd either have to let these events trigger only when the game is actually running, or let an AI/randomly choose something for the player, I guess.
  10. Hej, so I've been wondering how you do this properly: I want to create a game very similar to the concept of a tamagotchi (I assume you're familiar with these creatures, if not scroll down for a breakdown*). This means you constantly have to track time and let your game character somehow react to it. While the game is running this seems to be no problem, but what happens if it's not? My approach to this would be to simply note the current time when exiting and subtract it from the current time when starting again, then using this difference to re-simulate all the missed events. As simple as this might sound I have some doubts about this being a professional (or at least practical) approach to this problem: 1) What happens if you don't start the game again for a really long time? Depending on the speed of the simulation and the machine it could result in a really long phase of re-simulating (is there a better word, btw?) and, in the worst case, appearing to be broken to the user. 2) The user could simply change the system time and provoke unwanted behaviour. How can you prevent this? 3) There would have to be a special method to re-simulate, since the usual simulation-method would play sounds and other events, that would be unwanted to be started multiple times when you race through the passed time. This could also result in other unwanted behaviour, or at least confusing the user. What's your input on this matter? Is it the right approach? Is there another way? The requirements are as following: - must not need internet access - must be able to shut down completely I'd be happy to read your thoughts and/or suggestions. PS: Sorry for my first post being a question topic. ;) * [url="http://en.wikipedia.org/wiki/Tamagotchi#Life_Cycle"]http://en.wikipedia....tchi#Life_Cycle[/url]