• 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.

vlad2048

Members
  • Content count

    41
  • Joined

  • Last visited

Community Reputation

179 Neutral

About vlad2048

  • Rank
    Member
  1. Cheers, love the animated gif:)   1. 'it randomly chooses to go either left or right of the obstacle' Ok, imagine I look at a bunch of pixels in front of the snake, if I see some becoming non empty, then it chooses to go left or right of the obstacle. This is very fiddly, or at least your explanation would need a lot of work to make it into something programmable. If I look at a line of pixels in front of the snake and detect some pixels as occupied (not necessarily 1 interval, but possibly any combination of those pixels, edit: OK this is probably addressed in your 3.), then how exactly do I decide to go left of them ? Just go completely left/right of its field of vision. Also the turning radius needs to be taken into account, so not only this pixel line need to be taken into account, but also all the pixels in my planned trajectory. Also this algorithm doesn't look at anything after this line. Anyway I think about it, this doesn't sound programmable actually.   2. 'After 2 or more tries of avoidance, it learns by delaying the turning' Maybe this addresses some of the shortcomings in 1. But I'm not exactly sure how   3. Ok this means go in the middle of the obstacles in the front if it can't go left or right. But again this has no knowledge of anything else than the line in front of you so it wouldn't be very smart. Here I included an image (excuse the drawing skills) showing that the snake could go straight into an obstacle in that case. I know it's a very specific example but I'm pretty sure an algorithm like that just wouldn't work in the general case   Again thanks for the input! But I think your approach is too simplistic. I tried a very interesting different approach a few years ago that I'll post here (didn't manage to export the gmail thread today).
  2. Hey Tom thanks! It's a bit hard to understand your grammar but here's my interpretation: 1. You're suggesting that I add a random input when the snake is near obstacles ? That sounds like a bad idea, how could it learn from it ? 2. You're suggesting that I find the direction of the middle of the hole in front of the snake and use that as an input ? The intuition is ok on that one, but this sounds quite fiddly. Also I would think that my smart ray pointing straight ahead already does that.   Of course I'm quite eager for more suggestions, silly or not, thanks!
  3. 1 min 11s Really silly though as that's not what I'm trying to optimize it for, and it's not fun. It'd probably kick a human ass at that game though https://www.youtube.com/watch?v=Y02tXQPjjAY
  4. Cool! thanks for trying. Yes, you're right in your descriptions: - you need to be a bit lucky to make it break from its spiral pattern - it does now evolve hidden neurons and cyclic connections (I got the parameters right) - you can remove the lag by pressing 'E'. And at the end of the current generation, it will pause the evolution algorithm so you can play without lag. Press 'E' again to resume evolution. Also, it does not learn from you playing against it. It just learns by playing against different versions of itself in the background.   I've implemented my first idea of the new inputs. I call them smart rays, it's a bit hard to explain in detail, but basically they do a depth first search on certain paths and it does improve the AI a lot. Here's a vid of me (yellow) playing against it: https://www.youtube.com/watch?v=i9qU-r4COQ8 Notice I've evolved it to about the 30th generation (took a while) before taking the vid. And it even beat me a few times fair and square. These smart rays do give it a bit of an indication about the topology of the playfield. When it gets good at making sense of the smartrays, it seems it forgets a bit how to cut me short when it has the chance though.   I've added an .exe for it (_V2) in the first post. A few notes about it in no particular order: - When you start it, you'll need to wait about 2min for the 1st gen to finish before you can play (quad core intel i5-3570k 3.40GHz). Then press space to play against the AI. - I've disabled multithreading because it causes exceptions I can't explain. So you should have a mostly lag free experience but the evolving is core times slower. - It's again doing the silly spiral pattern at the beginning, but did evolve out of it for me. - The .exe is exactly the same as the one I used for producing the video this time (uses Randoms() based on time seeds, so might be different every time) - It does lag a lot when the smart rays all get blocked, but that doesn't happen too often. Might be a bug on my part. - I had lots of fun playing it    I now think a good AI for it will come from switching between different AIs with a state machine (got some more ideas). Again, if you can try it, I'd love your feedback!
  5. Sure, I've added the .exe in the first post. Let me know how it works for you !   I've not made huge progress really, I've been mostly playing with the parameters. I got some ideas for new inputs, I'll post again when I implement them!
  6. Yes, this sounds fiddly indeed But I appreciate the input and the interest.   I've tuned the AI some more and got something that starts to be a bit decent. Here, I'm playing against it (I'm yellow, the AI is blue). It's actually pretty fun:) I was quite surprised. As you can see, it's still severely lacking in number 4) above (topological analysis) but I do have some ideas for it now. I'll try adding some inputs representing the shape of the topology toward some angles based on the results of some forward search on a grossly discretized state space. It's not yet clear in my mind. I know I need something somewhat continous for the AI to learn from it. Also again it evolves this spiral pattern which is actually not that bad. Surprisingly, as you can see, the evolved neural network has only 2 of the inputs connected (or I don't understand the NEAT algorithm yet) https://www.youtube.com/watch?v=AC-w1xCk-Do I can't wait to get more time on it. If someone wants to play it, I'll be happy to upload an exe (it's very simple to use)
  7. Ah, very interesting article thanks, I'll read it carefully tomorrow for insights. Basic avoidance steering would work to avoid obstacles, but it'd be pretty stupid indeed.   A good player needs to: 1) Avoid walls. Your two suggestions address that. 2) Notice occasions when it can 'cut short' the other one (when next to him a bit ahead). 3) Avoid getting 'cut short'. 4) Also ideally a great player would need an idea of the topology of the current 2d space to try to enclose the other one in a smaller space / safeguard himself a bigger space.   My approach seems to have potential indeed as it starts to exhibit 1), 2) and 3). I wonder what other kind of inputs I could give the neural network though... Also for some reason, my networks do not evolve any hidden neurons so far. I probably need to get more familiar with the NEAT algorithm.
  8. Hi!   I'm trying to evolve an AI for a game of 'continuous' snake. Check this vid to understand the game: https://www.youtube.com/watch?v=sFA6rQM_rsE Basically, the snake drives a bit like a car and the first one of the 2 players to crash into his trail or the other's trail loses the game. What ideas would you have guys to design an AI for this ? The state space is huge: ideally there'd be 60fps per second and every frame, the snake can steer from -1 (left) to +1 (right) including all the values in between. So A* wouldn't cut it.   My current try is to use the NEAT algorithm (http://www.cs.ucf.edu/~kstanley/neat.html). I have the framework working and the AI is starting to show some traces of intelligence. The fitness value doesn't go up much though and it tends to converge toward the spiral pattern. It might be a good strategy though The inputs I've chosen so far are: - the opponent angle relative to us - the opponent distance - the opponent heading relative to us - the eyes: inputs representing how far a certain number of ray casts can go before hitting a wall (represented on the vid)   I've attached the code to this post if anyone wants to try it. You just need to install the SharpDX packages using nuget and hit F5.   Basically I'm interested in knowing what you think, and what other ideas you could give me for coding an AI for this game.   Thanks!   edit: Added the exe Numpad 4 and 6 : turn left and right Space : Restart a game against the new champion E : Pause/Unpause evolution. Useful to get a responsive UI. Pauses after the current iteration (8s on my machine)
  9. I've always wondered, does anyone know the equations for running and jumping behind the first mario game ? I mean, how would I go to recreate a game with the exact same feel ? - capture lots of screenshots and deduce the equations ? - reverse engineer the nes code ? - someone has done it before ? (A quick google search didn't turn up anything)
  10. Thanks very interesting. I will go the route of recording the inputs, it's definitely the easiest. And try to make it as seamless as possible in my code. I need to work within the cocos2d framework though but it should be possible Also the gamasutra article mentions using a stream to avoid having to create data structures. This seems like a brilliant idea, I'll try that
  11. I've already made the beginning of a 2d (4p max) multiplayer game on ipad. I'm using cocos2d. The games last maximum 1 minute. I want to get a replay of the most epic ones and use them to decorate the front menu (kind of sceensaver function) I've already done some replay system (for the same game on PC), but they had some problems/bugs. Mainly from a lack of a consistent interface across all the game objects for replays. I know it's very vague sorry. My question is, do you have any general advice on making a replay system ? Even if it's stupid advice. Like "implement StartRecord() and StopRecord()", any advice from someone who has implemented one. Like a postmortem on gamasutra would be great
  12. Ah yes, thanks guys, I had found the link and contacted the author. He was very helpful, and basically said that I can apply his exact same algorithm if I cut my space in a grid.
  13. Alright, GL_EXT_blend_minmax is supported on the iPad and works like a charm. Here's a screenie. Thanks to both of you guys
  14. karwosts: Your suggestion is interesting and thanks for the drawing. But it wouldn't display properly when 2 lines would be drawn side by side (eg: snake going back along its trail or 2 snakes going close to each other). It wouldn't "blend" properly. osmanb: What extension is that exactly ? I don't think the iPad would have it. For a moment, I thought the logic OR operation would work (kind of returning the max of the incoming fragment and the destination fragment). But it doesn't. I'll also check if I can use OGLES 2.0 in the middle of my cocos2d game or if I can use the experimental OGLES 2.0 build of cocos2d. Any other suggestions ? Thanks
  15. I'm using a circle gradient texture to draw lines with a smooth edge. The texture goes from 255,255,255,255 in the center to 255,255,255,0 on the outside. So to draw a line, I draw the line body using the vertical middle slice of the texture. And I draw a cap on each end to make it look nice. I'm using these lines to draw a snake (tron style but that can turn 360 degrees). I need these caps because sometimes a segment gets removed and I want the surrounding segments to look nice. As you can see in the screenshot, I can't seem to find the correct GLES 1.1 mode to get the lines to draw properly one after the other. The Blend mode uses the classic: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); Which does not draw the lines properly (the alpha is wrong at the intersection). Also I tried a couple of silly logic operations. What I need is to draw the pixel only if its alpha value is higher than what's already displayed. I looked at glAlphaFunc, but it can only compare the incoming alpha to a set value. Is there's any way to do that using the fixed pipeline of OGLES 1.1 ? (It's on the iPad) Thanks ! PS: sorry I mistyped the title, can't seem to correct it.