Posts Tagged ‘C++’
I might get a late start since I have some stuff to tie-up for my actual main project, which is bringing the board game Hive to Xbox. Been working on that for 14 months and it should be released ANY FLIPPING DAY! We’ll see.
Will be streaming here most of the time: http://www.twitch.tv/bluelinegames
Languages: Either HTML5 or C#/XNA. Kinda depends on what comes to mind, based on the theme.
IDE: Visual Studio Express (if C#), or Notepad++ (if HTML5).
I’ll probably do the Jam instead of the contest if we find collaborators at The MADE.
Right, third LD time I guess.
Still going to go with C++ because I love that language. With the help of Visual Studio 2010, SFML, some home-grown libraries and a fair amount of code snippets just wanting their glory.
Let’s hope this one works out better than the last, where I got sick halfways through and was forced to quit it.
Stream will be available at http://twitch.tv/ananace and this time I’ll remember to run a timelapse program in the background, I want a nice video after all.
Good luck to the rest of you people I guess.
I’m in for my 4th Ludum Dare 48. Couldn’t take part in the last one due to Guild Wars 2 launch being on the same weekend but now the stars have aligned properly again and I can join in.
Since my 1st LD (which is the only one I actually finished in) my preparations have been, kindly put, lacking, but this time I’ve cleared the schedule done some quick mock-ups and gotten in to the dev mood, hopefully I can finish something working.
My tool set will be the same as for every LD so far:
- C++ as the language
- GNU (GCC & GDB) as tool chain
- Eclipse as IDE
- GIMP for “art”
- TuxGuitar & SFXR for making ones speakers cry
I’ve tweaked ( == stripped and “streamlined” ) my tiny little frame work which I will use as my base-code, and as the rules demand here’s a link to it: Link.
For “added value” here’s a picture of my desk,which isn’t that fancy (sorry for the bad quality, my phone is ancient):
Lets get ready to rumble!
I’m in barring any sort of emergency or being called in.
- Engine:Aether (my own cross-platform engine that’s been in development for quite some time)
- Art:Sprite editor (soon to be renamed Aether Graphics Editor but the new improved version has a few bugs to work out still)
- Sound: sfxr/atrk/lmms/audacity
- IDE: Code::Blocks
- Livestream: custom scripts (attached lower in this post)
- Target platforms: Linux/Windows/Android (I unfortunately still don’t have a mac to test compile on)
This LD my engine now has all SORTS of new features and enhancements, and I have just launched a kickstarter campaign to try to get some funding to take it even further now that it’s gotten to the point where it’s more than usable for 2d games, you can check that out here
Short version of the most notable engine changes
- moved from GL2 and GLES11 to GL3.3 and GLES2
- VASTLY improved performance on android, mostly due to the GLES2 migration, though the pipeline itself has been cleaned up and the old batch rendering system completley re-written with a far more efficient one.
- huge improvements to the ttf rendering system, it’s faster and now also supports “tabstops” on the screen to make lining up text on non-monospaced fonts very easy
- internal message pump and state manager
- interactive debug console
- built in file and compression handling, path decoding, and configuration objects to manage saving game data and settings
- simple highscore manager object to retrieve and post highscores from a server
So here’s what I have, a small iOS game =)
I call it Puwang
Keeping with the ludum dare tradition, time to do a little analysis on what went right and wrong during my development this time! Before I get started with that though, for one I’d like to apologize, normally i do this at the same time as my “100 games rated” review and best of list but unfortunately so far my review list, though not quite at 100, to be perfectly honest i just dont have that many games that really stand out yet, not enough to make a real list, so expect that some time in the next week or so as i revew more! Secondly, my timelapse is now up, accompanied by a nice track of classical music as always, so please enjoy this.
Get on with it!
Right! postmortem! The point of this post, for starts, here’s the link to the competition page itself
What went right:
- The theme: frankly i was dreading another dreary, artys/emo theme like “abandoned” winning again, those kinds of themes are simply NO FUN for us programmers and it’s horifficly hard to get a decent gameplay idea that’s not just bolting the theme onto the story/background. (I generally rate 1 on theme when people do that myself, as just tacking it on isn’t really “meeting” the theme)
- My engine: my game engine worked BEAUTIFULLY, a few minor fixes were needed after release but having a fully cross-platform engine set up and ready did wonders, so even though my idea made me write a full entity system and isometric renderer from scratch having windowing/input/state management/texture and memory management already taken care of made the task a lot easier
- My tools: the newest version of my sprite editor (available under the “tools” link at the right) worked like a charm, it made animating the modular sprites a breeze even for a crappy artist like me, this time around a lot of people have even said they LIKED my art style!
- Time: for the first time, I was actually able to be HOME on both days of ludum dare! So this was the first competition i technically actually had 48 hours to work in
What went wrong?
- Timing: This ludum dare took place on the first weekend college is in, in the middle of one of the hottest weekends of the year in southern california so of course we had rolling blackouts all day saturday, my UPS tried it’s best to keep my desktop running but i ended up with a few hours of downtime midday, losing a good 4-5 hours of development, I ended up having to cut features due to this
- Mouse control: The game was meant to be controlled entirely by mouse using pathfinding, unfortunately due to being down most of the day saturday i ended up having to cut pathfinding or I wouldn’t have had time to make actual levels and art to play. This made getting around corners somewhat tricky though thankfully still do-able (wasd also works as analternate, it was debug code though and not the way the game was meant to be controlled so it’s a little jumpy)
- No way to restart: Another feature i had to cut due to time was resetting the player after he dies to restart (the levels already reset, only the player needed to reset) so i was forced to put just a simple game over screen when you die
- Lame ending: Another cut feature, I was going to make a better image to show when you get to the end and to thank you for playing but again, due to playing catchup for saturday a lot of art had to be cut, so all you get now is a blurb of text for the temporary ending
- not all evolutions have artwork: my game actually tracks a LOT of statistics when you’re evoloving, over 2000 combinations are actually possible but only a tiny portion make visible changes due to my inexperience in isometric art that’s not geometric in nature and lack of time. There is no distinct skin/leg/ear/or fang graphics for the other features that evolve, only general body type, head type, and back type are actually shown
- needed a statistics readout window: I really needed a window to show your current statistics, the “overall” statistics modified by your current evolution status are attack/defense/speed/flight/poison/and vision, a lot of people had trouble in the caves because they did not kill enemies outside first that would buff their defense before starting to fight the much tougher bats and spiders inside
And to close out, here’s a short gameplay video of how it all turned out!
So many problems this LD, being the first week of the college semester had tons of homework and rolling blackouts in the area (thanks to the fact that a LOT of people are home doing homework, on a super hot day with the AC’s on, worst power outages of the year so far). Actually lost power twice yesterday! Thank god for battery backups and incremental saves though, I pushed through and though i lost a lot of time and didn’t quite do all I planned I managed to release a complete game again, just recorded a bit of it to show off the evolving aspect. The creatures body parts are independant and when you kill anything you “absorb” it’s DNA/traits and it reforms you into some…generally pretty silly looking things. (blob with bat wings and a wolf head, wolf with bird head, etc…basicly any combination of the monsters found in the game) It actually works pretty well and the dynamicly combining sprites don’t look half bad, especially for artwork I did
check it out here, it’s short as i cut straight to the evolving parts, but then the game is pretty short too, there’s only about 7 map areas but they’re all linked and you can freely explore them. (the maps are all done in tiled so you can edit them and link in more maps too if you really want)
I didn’t forget, just procrastinated. I want to consider myself a veteran at Ludum Dare, as this will be my 5th entry.
Let’s just say I’ve graduated from complete newb to novice, and now am just above novice. I don’t make games professionally (yet), more of a hobbyist developer. It’s something I completely love to do, create little fantasies in code and allow people to see them and interact with them.
Ludum Dare is my way of looking back at previous projects, gauging how my skills have improved, enjoying the ride, and letting the community know that I exist. So anyway, there are tools I have used before, and I’m gonna list them:
- language: C++ in MSVC 2008 Express
- library: SFML 1.6
- audio: SFXR, Audacity, PXTone
- ear candy: musicforprogramming.net
- health: good food, smoothies, coffee, some light exercise, and a decent amount of sleep (but seriously not too much)
Everyone, have a blast, and best wishes for your projects.
Plan to use: Unity3D free (C#), FL Studio (well, lets see…), sfxr, InkScape, Paint.NET, jEdit, Fraps
Probably will have more time to think / plan / design than to actually code. Is that a good thing?
Here we go !!
this time with Unity/C#, and for the first time with a artist as a teammate !! for audio we are planning to record using voices, and for 3D stuff blender will be the weapon of destruction !!
for the portuguese speakers we will be online @ http://www.hipchat.com/gWuXOM0PR
[pt] para quem fala portugues vamos estar online em http://www.hipchat.com/gWuXOM0PR, nos vemos por lah !![/pt]
First timer joining, will be trying to complete a game in /compo in 48 hours!
I have a tiny bit of experience in game development, but I’m currently working in a non-gaming related environment. This will be a great way too see if I remember all of the important bits and pieces!
I will be using the following:
- Language: C++
- IDE: Visual Studio 2010 (Express)
- Art: Paint.NET
- Sound: Audacity
- Framework/Base Code: Half-Finished-Framework
- Platform: Windows
So yeah I guess this is it? I still need to add more functionality to the framework, will do this tomorrow and update the content at the end of the link!
Well, let’s see if LD#24 goes better than the last one.
C++ and SFML, with the help of Visual Studio 2010, GIMP, and Blender.
It’s on now.
Hi, I like to introduce to you a new script language: ExecutionCode
I didn’t inted to create a language for games, but of course it can be used for games. It’s inspired by normal assembly, but cutted down to just one parameter. Also there are huge changes to some other things. But look at your own at a small application (it counts to 10):
//All commentars are done c-style
/*so of course these multiline commentars
programs are not splitted up in functions, okay basically they are,
but I call them modules and all the functions imported from C++ have their own name
//a command is splitted up in group name and function name
//those square brackets indicate variables
//first I push a raw numeric value (here 1) on the param stack
/*then the system.set command pops that value from the param stack and copies it to the given
If you put something on the stack, the value! is on the stack so if a command wants to change
a variable it has to require it as param*/
//this is a jump mark, because you have to implement your loops on your own
//first I print the variable to the world
/*a mathematical operation is done by pushing the two values on the stack and give the
target to the command
//and now I want to if [counter] came to 10 so I use the logical.lesser command
//these brackets indicate a ressource
logical.equal [isNowEnd] //so if counter==11 then isNowEnd=1
//and if isNowEnd==1
//don’t forget to free the variables
//a ressource can be like variables a number or a string
//and here is another feature: if you put a ‘#’ in front of a number you can type hexadecimal
//decimal, this is 11
The code might look irritating, if so, delete the commentars and try to understand just the actual code.
The compiler/interpreter application is done in the meaning that this code can compiled in bytecode and this bytecode can be executed by the virtual machine in the same application, but it isn’t enough finished (particularly the error handling procedures), so it won’t be released now, but I hope I’ll get this done before next LudumDare. I’ll also write a full reference of this lanuage, the bytecode, the virtual machine and the compiler.
If you have any questions about it just ask me.
Not quite sure if I should call it a ‘post-mortem‘. There are hundreds of these already there. It’s not about what I think went right or wrong. It just … did. Generally I’m glad the way it turned out. However, since I want to keep working on this game I’ve decided to make a list of changes I want to apply to it. That’s why I called the post ‘The Aftermath‘.
The main purpose is to expand it and make the framework more flexible. Then I will extract it and use in future compos.
So, here it goes:
Level entities’ management. Every object in a level is derived from a CEntity class. The examples are mainly … blobs. The pointers to the entities’ instances are stored in a globally-accessible array, which can be accessed at any time. When an entity is no longer needed – it gets deleted and the array is rearranged, getting rid of an unnecessary pointer ( it’s a C++ vector container ).
What if we want to store the reference to the entity and use it on later occasion? For instance, a blob chasing another blob could save a reference to its target and update its position every tick based on that. Storing a raw pointer to the data in memory is risky – we are not able to check whether the entity has been already deleted and the memory’s been freed. Trying to use such a pointer would result in very pesky and hard to track down bugs.
That’s why I came out with the idea of … IDs. An entity’s ID is an index at which it can be accessed in the main entity array ( the STL vector mentioned earlier ). When an entity is about to get deleted, the memory is freed, but the pointer in the array is set to NULL. That way it never gets overwritten and we can check if the object is available, or not. An ID would be an unsigned integer, so it could range from 0 to over 4 000 000 000! The free IDs will never get depleted and the entities themselves will be getting deleted from memory at a constant rate.
The array itself could be though great in size after a while. Every frame each entity needs to receive a tick. Iterating the entire array will be getting more and more time-consuming with the number of the array members growing in size. So … what about a second array? It would contain the IDs of non-deleted entities – that way only the valid members will receive a tick every frame without iterating through the NULL-ed entries.
Although it looks complicated compared to the previous system, it seems that it’s worth a try. Did anybody run into similar, or other worthy conclusions on that matter?
The level editor. Because of a lack of time, I had a really tough time designing the levels. A level editor and an external level file format could really get in handy in this case. Running a game, writing down coordinates and typing them in manually in a source code doesn’t sound appealing, especially when you’ve got dozens of objects which need to be somehow adjusted. I have really no idea how I’ve managed to put all of these blobs in place manually in 48 hours.
The scenes. The hardest thing to think through than the levels themselves. I’m talking here about an intro and ending scenes. Naturally, when you have an idea, you write it down as following: “It fades in within the first 2 seconds. Then it plays the sound X, waits another 2 seconds, shows a few lines of text slowly and gradually fading in …” etc. Not a tough job. It gets complicated, when you only have a level tick method called every frame to put these things in.
Let’s say you want an entity to play an animation after 2 seconds after the beginning of a scene. In the level you’d have to write an if statement which will be called each frame. It’d have to check, whether the time from the beginning of the scene was greater than 2 seconds and if it hadn’t been already greater that 2 seconds the frame before ( starting playing a sound every frame wouldn’t sound pretty – it must be called once and left alone for it to play along ). If there’s many of such ‘timed events’, we need a lot of variables. And now, if not the static variables available in C++, I’d find myself in the dead end. Although the scenes work pretty well, the code itself is a massacre and I was really confused which if statement was responsible for what event.
The threading system could be excellent here. Unfortunately I did attempt this concept few months ago and failed tremendously. Maybe because I used very unfriendly Windows API, who knows? But what other alternatives do I have?
And that’s when I thought of … Lua. I never had the opportunity to work with Lua and so I don’t know its specifications. Hopefully it allows for such maneuvers. I’ll have to dig into it. Is it possible to use threading in Lua?
That’d be it I suppose. There’s a lot of other points in my list but these are regarding either entities’ classes in particular or their implementations. Anyways, after polishing out the game itself, I will add more enemies and more levels, scenes. Hopefully it will come with a great ease. Greater than previously, that’s for sure. Eventually I will publish it.
If you have any suggestions, I’d appreciate if you shared them! I don’t want to implement a total bummer and base the upcoming code on that
My first Ludum Dare was neither a success or a failure. I managed to “finish” the game enough to submit it in time, but it lacks so many of the things I drew up at the beginning of day one.
Things I learned:
- Plan how to use your time, just as you plan the game. I ended up cutting like crazy in the last two hours just to submit something that felt somewhat finished.
- Start with a pre-made engine. I spent hours in the beginning setting up my core classes that I could’ve really used at the end.
- Use pre-made art. I was more focussed on the code, but I still spent SOME time drawing that could’ve easily been replaced with some (far better) open license stuff.
- Decide before the theme is announced roughly what TYPE of game you want to make and think about it. I had planned out the whole game in the first hour, but I hadn’t really considered how long the code would take for the game from scratch. With more thought beforehand I could’ve planned out the code better and hit the ground running.
I’m IN for my first official Ludum Dare – I did one miniLD earlier (with pre-made/stolen graphics and music). Now I need to do all graphics and stuff by myself – so not aiming very high this time.
Now I need to sleep full (oh, 4 hours left -> short) night, and then to start! Exciting…
This next Ludum Dare is my first one. I have been doing games for years now and I know from experience that you can only achieve so much in two days (in my case, that’s not much). So I’m looking for short cuts wherever I can find them.
I’ll be using C++ for coding since I’ll be using the Proton SDK. I’ve been using it lately a lot for other projects so it’s fresh in the memory. C++ is a great language in many ways (one of them being its portability across platforms) but there are some features that are more a hindrance than an advantage. One of them is the preprocessor which C++ inherited from its C roots. With the help of the preprocessor and the #include directive especially it’s usual to divide classes into a definition and declaration. The definition goes to a file ending with .h and the declaration (or implementation) goes to a .cpp file (the postfixes might vary slightly from case to case but these are the usual ones).
This is useful for example if you are developing a shared library. You compile the .cpp files in to the library. You collect the .h files and submit them with the compiled library to the users of the library. The users can now find the interface of the library from the .h files and code against it. Then they link against the compiled library and everything is good. The users don’t know about the implementation details of the library since they don’t need nor get the .cpp files.
The extra burden delivered to the developer with this file separation is that the interface in the header file must off course always match the implementation in the .cpp file. Change one and the corresponding method signature needs to be changed in the other file too (this .h/.cpp file separation is so badly against the DRY principle that it makes my head hurt – constantly). Miss that and you get a compilation error. Luckily the error messages produced this way are usually so much descriptive that it’s easy to fix them. But it’s still extra work. Tools off course can help a bit in these situations if your IDE happens to have a suitable refactoring feature.
I struggle with this problem every now and then. Now for Ludum Dare I decided to try something different. Since I’m not developing a shared library here and the code I’ll be writing will probably not be used elsewhere (at least without some heavy modifications) I can mess around with it as much as I like. For this purpose I have developed a coding convention that I shall call “only headers”. All of the code that I’ll be writing will reside in C++ header files only. So for each class the definition and the declaration will be bundled together to a single file. This way the signatures of methods are only written to a single place and whenever a method signature needs a change it will be enough to modify it in one place.
All of these header files will be included directly to the main.cpp file. The inclusion order needs to be correct so that the compilation succeeds. This approach is essentially the same that if you would write all the code to a single file. That file would probably grow several thousands of lines long so it gets hard to navigate in it. By separating the code to multiple files the navigation problem should decrease.
Now the obvious problem with this approach is off course that the compiler (and preprocessor) needs to always parse through all the code that there is in the project. But I’m thinking that the amount of code will not grow too big during the 48 hours of the LD event. But I can’t know that for sure right now. I guess I’ll find out during the week end how this works out. I’ll be reporting the experience after the event.
If you have any experience from this kind of approach, any tips or traps to avoid do share them in the comments.
I’m in for the 3rd time, and after the major fail of last LD (didn’t finish anything) I will take my time to prepare properly (less beer, more code should be a good start).
As usual I’ll likely be using C++ and SDL with my own code-base, and BlitzMax will be my fallback.
Rest of my toolset will be GIMP for art, SFXR for sound and TuxGuitar for music (if I have enough time to compose anything that is).
Good luck everyone, and lets have a blast!