Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cooldog99

Pages: 1 2 3 [4] 5 6 7
46
Window / That annoying little window
« on: April 28, 2011, 01:25:10 am »
Quote from: "Mjonir"
On that subject, does anyone know if it's possible to do the opposite, i.e. forcing the console to appear in GUI Application (through code)?

It would be really nice for me if it was possible to control that through code (even an ugly piece) so that I could avoid making 2 different versions of my program and control that with a bool :P


Why not just have a Console application? ;)

Otherwise you'll have to use some winAPI functions to call the console window, I forget exactly how as I hate using Windows.h heh.

Don't forget you can have multiple build targets in codeblocks (or other IDE's)

47
Window / That annoying little window
« on: April 28, 2011, 01:03:19 am »
You don't need code to remove the console window :)

Project -> Properties -> Build Type -> it SHOULD say Console application, change it to Gui Application.
Make sure to set it to same on Debug AND release (on left) or whichever you prefer :D

Note: May require you to restart codeblocks, sometimes it does for me.

Hope this helps.

48
Graphics / Weird lines being drawn between map tiles
« on: April 27, 2011, 12:09:44 am »
Quote from: "vinicius.ras"
That worked for me!
Thank you for the quick reply!


No problem man, think of it as my way of contributing back to this awesome forum ^_^

I'm always here if you need more too :D

49
Graphics / Weird lines being drawn between map tiles
« on: April 26, 2011, 10:44:55 pm »
Have you tried turning off smoothing?

MyImageName.SetSmooth(false);

50
Network / Quick question, Sending Lists or Vectors through Packets
« on: April 26, 2011, 09:38:56 pm »
Quote from: "Laurent"
SFML packets know how to pack/unpack primitive types and strings, that's all. For anything more complicated, you must tell SFML how to decompose/recompose the complicated things to/from primitive types, like I did above with std::list.

So for your Enemy class, it's the same. Read the "Packets and custom classes" sections of the tutorial, it's explained with an example:
http://www.sfml-dev.org/tutorials/1.6/network-packets.php


Alright I  think I might know what you mean now.
Thanks again, i'll be trying this soon.

51
Network / Quick question, Sending Lists or Vectors through Packets
« on: April 26, 2011, 09:31:39 pm »
Quote from: "Mjonir"
I don't know anything about networking, but the code Laurent seems to unpack and repack a std::list<xxx>. It's a template, it'll work for any kind of data you'll ask it to send. So if you have a std::list<Enemy>, you will be sending your Enemy classes, not just integers.


Oh, maybe that'll work.
If anyone knows a better way(if any) or if they know whether or not this will work, please post, I will be trying this!

Thanks.

52
Network / Quick question, Sending Lists or Vectors through Packets
« on: April 26, 2011, 09:04:43 pm »
Quote from: "Laurent"
Send:
Code: [Select]
packet << static_cast<sf::Uint32>(list.size());
for (std::list<xxx>::const_iterator it = list.begin(); it != list.end(); ++it)
    packet << *it;


Receive:
Code: [Select]
sf::Uint32 size;
packet >> size;
for (sf::Uint32 i = 0; i < size; ++i)
{
    xxx item;
    packet >> item;
    list.push_back(item);
}


:O that was fast, although another dumb question (Sorry!)
What if the list or vector contains a class, instead of an int?
Same method?

for instance, Enemy class, contains health, sprite, damage, speed, etc. and there's roughly 20 in a list, I can just use that method above and dynamically push back a new Enemy into the new list after receiving the packet?

Again, thanks for the fast reply, and sorry for being ignorant, I'm slow today :x

53
Network / Quick question, Sending Lists or Vectors through Packets
« on: April 26, 2011, 08:43:06 pm »
Hey guys, I was just wondering what's the best way to send lists or vectors through a SINGLE packet and have a list = packet contents.

Basically
Server:
Vector of enemies
Send packet of said Vector ^

Client:
Receive Packet
Enemies Vector = Packet Contents

I'm sorta ignorant to Packets, I've used them for single data but not large lists.

SFML 1.6
Windows vista btw.

54
Quote from: "cooldog99"
Quote from: "DevilWithin"
told you, wont work ;D



:O It wont work still???
hmm...I'm currently working on the crafting bug I thought we fixed...it's soo random and hard to track down, that it's frustrating..

on the plus side we added 2 rifles and the text display for picking up items :D



V0.0.53 is out!
Here's the changes:
-Alerted when picked up an item.
-New save/load system!
-Better Item System
-Resources now can be found in multiples!
-More solid engine
-GFX modifications for Inventory
-GFX updates in general! (icon fixes, etc)
-Fixed rifle recipe (and Winchester)
-More debugging stuffs!


See site or post for new download link.

55
Quote from: "DevilWithin"
told you, wont work ;D



:O It wont work still???
hmm...I'm currently working on the crafting bug I thought we fixed...it's soo random and hard to track down, that it's frustrating..

on the plus side we added 2 rifles and the text display for picking up items :D

56
Quote from: "DevilWithin"
http://img850.imageshack.us/i/capturarj.png

Nothing happens when i click craft


umm, bottom right corner needs to be rubber instead of metal ^_-

Try that and see if it works :)

57
Quote from: "DevilWithin"
I SImply can't craft anything :  (


Are you sure you're using the right recipes and clicking the craft button? :O

Send a s/s, maybe I can help.

58
Quote from: "DevilWithin"
Question, how can i save my game? :D


Press Escape, and Escape to Save and Exit or P to unpause :)

Quote from: "Groogy"
Nice with the craft button for weapons. I guess that fixed your bug. But the thing is it makes it harder to find recipes(If you add a way to find them then no worries) and also ammo was freakin annoying to make. I could only make one batch at a time. IF you could allow us to press "Craft" several times and let the ammo stack in the crafting slot.


We're going to add that soon, and we'll let it stack as well!
Quote from: "DevilWithin"
Well, ive put stuff exactly right for the pistol, and nothing happens when i press craft :D

the same for ammo! I put a unit of metal in the right places, and it doesnt work
:)


Guns with rubber grip on images (Pistol/Smg) require rubber now, are you using it? :)

59
Quote from: "cristi121"
Yay, pistol works now!
Thanks.


Woot! I think we nailed the bug!

If you run into any more crafting bugs, please submit them ^_^

60
Quote from: "cristi121"
Wow, that was really fast.
But crafting still isn't working for me ( and yes, I did press the craft button ). I tried to craft ammo and it works, but doesn't work for pistol.


oh, forgot to mention, crafting recipes are now changed.
you need rubber now.
Please read the read_me for the recipe :)

Pages: 1 2 3 [4] 5 6 7
anything